summaryrefslogtreecommitdiff
path: root/config.lua
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-02-20 16:39:45 +0800
committerEltrac <hi@guhub.cn>2025-02-20 16:39:45 +0800
commit6fac71363024403c8bc5e92d286153dbe48b389a (patch)
treea469c152cdfbb882b323dacd1447c7bcd0bc0124 /config.lua
parent13a208ec28b21279a20438800f5b0acac43eaf1b (diff)
refactor: use Body object
- Body defines an object's size and shape - Body provides a universal function to detect collision
Diffstat (limited to 'config.lua')
-rw-r--r--config.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.lua b/config.lua
index df9b95d..6b32c63 100644
--- a/config.lua
+++ b/config.lua
@@ -15,6 +15,7 @@ config = {
defaultRoomH = 0.8,
bulletSpeed = 300,
+ bulletSize = 5
}
-- game default states
@@ -23,8 +24,8 @@ function initGame()
player = {
x = love.graphics.getWidth() / 2,
y = love.graphics.getHeight() / 2,
+ body = Body:new("circle", 20),
speed = 100,
- r = 20,
shieldedTill = 0,
hearts = { "redheart", "redheart", "redheart" }
},