diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-13 10:55:24 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-13 10:55:24 +0800 |
| commit | aa3d4e377fddf077e2b8cc77f17c1eefd5f97b5e (patch) | |
| tree | f13c7b5caedb666c696e3cf91a1b36295b85f0c6 /objects/Obstacle.lua | |
| parent | 7a48e0303241ff30572028d3c8cc303c09b04fa3 (diff) | |
refactor: remove body:draw method
Diffstat (limited to 'objects/Obstacle.lua')
| -rw-r--r-- | objects/Obstacle.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/objects/Obstacle.lua b/objects/Obstacle.lua index 51a1ee6..74297cd 100644 --- a/objects/Obstacle.lua +++ b/objects/Obstacle.lua @@ -13,7 +13,9 @@ function Obstacle:new(name, location, body) presetLocation = (type(location) == "string" and location) or nil, x = (type(location) == "table" and location.x) or nil, y = (type(location) == "table" and location.y) or nil, - body = body or Body:new("rectangle", 50, 50) + body = body or Body:new("rectangle", 50, 50), + w = 50, + h = 50, } setmetatable(obj, Obstacle) |
