diff options
| author | Eltrac <hi@guhub.cn> | 2025-03-04 11:53:58 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-03-04 11:53:58 +0800 |
| commit | b7ae36440273848353efe7b7d6327c2fc046f7c3 (patch) | |
| tree | cf8632f25b3109052e2c6a9ba9b0253f9ab99a03 /objects/Body.lua | |
| parent | ff9be4ad80564c085a49d3a3f4bfbb95669dc594 (diff) | |
refactor: make Body object local
Diffstat (limited to 'objects/Body.lua')
| -rw-r--r-- | objects/Body.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/objects/Body.lua b/objects/Body.lua index 87f9733..c473c69 100644 --- a/objects/Body.lua +++ b/objects/Body.lua @@ -1,4 +1,4 @@ -Body = {} +local Body = {} Body.__index = Body function Body:new(shape, sizeA, sizeB, zoom) @@ -68,3 +68,5 @@ function Body:drawQuad(sheet, index, x, y, angle) sprite.drawQuad(sheet, index, x - w/2, y - h/2, graphicW, graphicH, angle or 0) end end + +return Body |
