diff --git a/gamecore/modules/world/actors/actor2D.lua b/gamecore/modules/world/actors/actor2D.lua index 27685f9..c58f759 100644 --- a/gamecore/modules/world/actors/actor2D.lua +++ b/gamecore/modules/world/actors/actor2D.lua @@ -82,6 +82,10 @@ function Actor2D:setBounceFactor(newBounceFactor) self.bounceFactor = newBounceFactor or 0 end +function Actor2D:destroy() + self.world:removeActor(self) +end + -- INPUT FUNCTIONS -- get input from the world object