diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-04 12:03:23 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-04 12:03:23 +0800 |
| commit | e7b8b3c3113cbdb652a27dce888e6b5a1c97f9a4 (patch) | |
| tree | bf04bc1d612cd8c69e49ad079ba535f1834f1689 /objects/Obstacle.lua | |
| parent | b7ae36440273848353efe7b7d6327c2fc046f7c3 (diff) | |
perf: localize all objects module
Diffstat (limited to 'objects/Obstacle.lua')
| -rw-r--r-- | objects/Obstacle.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/objects/Obstacle.lua b/objects/Obstacle.lua index 86f889c..ee0e818 100644 --- a/objects/Obstacle.lua +++ b/objects/Obstacle.lua @@ -1,6 +1,8 @@ +require "data.directions" + local Body = require "objects.Body" -Obstacle = {} +local Obstacle = {} Obstacle.__index = Obstacle function Obstacle:new(name, location, body) @@ -40,3 +42,5 @@ function Obstacle:isMet(body, currentX, currentY, dv, dir) return self.body:collide(body, self.x, self.y, x, y) end + +return Obstacle |
