scenes/level: use the new functions names whenever possible

This commit is contained in:
Kazhnuz 2019-05-30 20:16:32 +02:00
parent 2e70067303
commit 7385207f95
2 changed files with 6 additions and 6 deletions

View File

@ -45,11 +45,11 @@ function Entity:update(dt)
end
function Entity:register()
self.world:addEntity(self, self.x, self.y, self.w, self.h)
self.world:registerActor(self)
end
function Entity:destroy()
self.world:removeEntity(self)
self.world:removeActor(self)
end
function Entity:canBounce(bounce)
@ -105,7 +105,7 @@ function Entity:getCenter()
end
function Entity:purge()
self.world:removeEntity(self)
self.world:removeActor(self)
end
function Entity:setFilter()
@ -124,7 +124,7 @@ function Entity:move(dt)
self.onGround = false
local xsp, ysp = self.xsp * dt, self.ysp * dt
local cols, cols_len
self.x, self.y, cols, cols_len = self.world:moveEntity(self, self.x + xsp, self.y + ysp, self.filter)
self.x, self.y, cols, cols_len = self.world:moveActor(self, self.x + xsp, self.y + ysp, self.filter)
for i=1, cols_len do
local col = cols[i]

View File

@ -43,7 +43,7 @@ function PlayerManager:spawnPlayer(playerID)
end
function PlayerManager:getPlayers()
local itemList = self.scene.world:getEntities()
local itemList = self.scene.world:getActors()
local playerList = {}
for i,v in ipairs(itemList) do
@ -56,7 +56,7 @@ function PlayerManager:getPlayers()
end
function PlayerManager:getPlayerByID(id)
local itemList = self.scene.world:getEntities()
local itemList = self.scene.world:getActors()
local player
if (id == nil) then