From aa3d4e377fddf077e2b8cc77f17c1eefd5f97b5e Mon Sep 17 00:00:00 2001 From: Eltrac Date: Thu, 13 Mar 2025 10:55:24 +0800 Subject: refactor: remove body:draw method --- objects/Obstacle.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'objects/Obstacle.lua') 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) -- cgit v1.2.3