module/world: add a function to destroy actor
This commit is contained in:
parent
146cfbed54
commit
dfc71eaebd
1 changed files with 4 additions and 0 deletions
|
@ -82,6 +82,10 @@ function Actor2D:setBounceFactor(newBounceFactor)
|
||||||
self.bounceFactor = newBounceFactor or 0
|
self.bounceFactor = newBounceFactor or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Actor2D:destroy()
|
||||||
|
self.world:removeActor(self)
|
||||||
|
end
|
||||||
|
|
||||||
-- INPUT FUNCTIONS
|
-- INPUT FUNCTIONS
|
||||||
-- get input from the world object
|
-- get input from the world object
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue