automatically gets bouif pull = true then
This commit is contained in:
parent
747a7b7b58
commit
214758388e
14 changed files with 143 additions and 81 deletions
|
|
@ -2,6 +2,7 @@ Entity = class("Entity")
|
|||
|
||||
function Entity:initialize(t)
|
||||
self.x, self.y = t.x, t.y
|
||||
self.name = t.name
|
||||
self.spriteSize = {w = t.sprite:getWidth(), h = t.sprite:getHeight()}
|
||||
self.size = {w = self.spriteSize.w / 16, h = self.spriteSize.h / 16}
|
||||
self.cellShape = t.cellShape or self:cellShapeFromBox(self.size)
|
||||
|
|
@ -52,10 +53,8 @@ function Entity:cellShapeFromBox(box)
|
|||
for i = 1, box.w do
|
||||
for j = 1, box.h do
|
||||
table.insert(cells, {x = i, y = j})
|
||||
io.write(" boop: " .. i .. ", " .. j)
|
||||
end
|
||||
end
|
||||
io.write("\n")
|
||||
return cells
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue