module/world: add a function to destroy actor

This commit is contained in:
Kazhnuz 2019-05-05 19:45:57 +02:00
parent 146cfbed54
commit dfc71eaebd

View file

@ -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