From 5777d9463bc0f3cdd3a185212a8ed05ca59aeffe Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 28 Apr 2019 11:12:54 +0200 Subject: [PATCH] modules/world: add a way to simply set bounceFactor in the Actor2D --- gamecore/modules/world/actors/actor2D.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamecore/modules/world/actors/actor2D.lua b/gamecore/modules/world/actors/actor2D.lua index a8e79c2..a49252a 100644 --- a/gamecore/modules/world/actors/actor2D.lua +++ b/gamecore/modules/world/actors/actor2D.lua @@ -75,6 +75,10 @@ function Actor2D:register() self.world:registerActor(self) end +function Actor2D:setBounceFactor(newBounceFactor) + self.bounceFactor = newBounceFactor or 0 +end + -- INPUT FUNCTIONS -- get input from the world object