modules/world: add a function to add Actor from index

This commit is contained in:
Kazhnuz 2019-04-07 13:46:08 +02:00
parent 3bd7203e59
commit 63238c4ec6

View file

@ -20,6 +20,10 @@ end
-- ACTOR MANAGEMENT FUNCTIONS
-- Basic function to handle actors
function BaseWorld:newActor(name, x, y)
self.obj.index[name](self, x, y)
end
function BaseWorld:registerActor(actor)
table.insert(self.actors, actor)
end