modules/world: fix typos
This commit is contained in:
parent
19cdf6c3ab
commit
f9ff7ff122
1 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,7 @@ function BaseWorld:registerActor(actor)
|
||||||
table.insert(self.actors, actor)
|
table.insert(self.actors, actor)
|
||||||
end
|
end
|
||||||
|
|
||||||
function World:removeActor(actor)
|
function BaseWorld:removeActor(actor)
|
||||||
for i,v in ipairs(self.actors) do
|
for i,v in ipairs(self.actors) do
|
||||||
if v == actor then
|
if v == actor then
|
||||||
table.remove(self.actors, i)
|
table.remove(self.actors, i)
|
||||||
|
@ -32,7 +32,7 @@ function World:removeActor(actor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function World:moveActor(actor, x, y, filter)
|
function BaseWorld:moveActor(actor, x, y, filter)
|
||||||
self.actors[actor].x = x
|
self.actors[actor].x = x
|
||||||
self.actors[actor].y = y
|
self.actors[actor].y = y
|
||||||
-- as the baseworld have no collision function, we return empty collision
|
-- as the baseworld have no collision function, we return empty collision
|
||||||
|
@ -40,7 +40,7 @@ function World:moveActor(actor, x, y, filter)
|
||||||
return x, y, {}, 0
|
return x, y, {}, 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function World:queryRect(x, y, w, h)
|
function BaseWorld:queryRect(x, y, w, h)
|
||||||
local query = {}
|
local query = {}
|
||||||
local x2, y2 = x + w, y + h
|
local x2, y2 = x + w, y + h
|
||||||
for i,v in ipairs(self.actors) do
|
for i,v in ipairs(self.actors) do
|
||||||
|
@ -58,7 +58,7 @@ function BaseWorld:countActors()
|
||||||
return #self.actors
|
return #self.actors
|
||||||
end
|
end
|
||||||
|
|
||||||
function World:getActors()
|
function BaseWorld:getActors()
|
||||||
return self.actors
|
return self.actors
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue