modules/world: add a function to add Actor from index
This commit is contained in:
parent
3bd7203e59
commit
63238c4ec6
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,10 @@ end
|
||||||
-- ACTOR MANAGEMENT FUNCTIONS
|
-- ACTOR MANAGEMENT FUNCTIONS
|
||||||
-- Basic function to handle actors
|
-- Basic function to handle actors
|
||||||
|
|
||||||
|
function BaseWorld:newActor(name, x, y)
|
||||||
|
self.obj.index[name](self, x, y)
|
||||||
|
end
|
||||||
|
|
||||||
function BaseWorld:registerActor(actor)
|
function BaseWorld:registerActor(actor)
|
||||||
table.insert(self.actors, actor)
|
table.insert(self.actors, actor)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue