scenes/levels: clean up and rename entity interaction codes
This commit is contained in:
parent
7f31230b5e
commit
a5d4dd9b8f
|
@ -105,13 +105,16 @@ function Level:isCollisionLayer(layername)
|
|||
return isCollisionLayer
|
||||
end
|
||||
|
||||
function Level:addPhysicalObject(object, x, y, w, h)
|
||||
return self.world:add(object, x, y, w, h) -- On le rajoute au monde physique
|
||||
function Level:addEntity(entity)
|
||||
return self.world:add(entity, entity.x, entity.y, entity.w, entity.h)
|
||||
end
|
||||
|
||||
function Level:movePhysicalObject(object, x, y, filter)
|
||||
self:addBlock(0,0,1,1)
|
||||
return world:move(object, x, y, filter)
|
||||
function Level:moveEntity(entity, x, y, filter)
|
||||
return self.world:move(entity, x, y, filter)
|
||||
end
|
||||
|
||||
function Level:removeEntity(entity)
|
||||
return self.world:remove(entity)
|
||||
end
|
||||
|
||||
function Level:worldUpdate(dt)
|
||||
|
|
Loading…
Reference in New Issue