From f0119c2e3c0ddb19cef1fdf6cfebb6697dabd14d Mon Sep 17 00:00:00 2001 From: "Eric R. Monson" Date: Fri, 28 Aug 2015 11:15:31 -0700 Subject: Properly free enemies after death in 3d platformer demo. Previously, they stuck around as invisible physics objects. This fix is much cleaner than my previous attempts, as it uses the ability to call a function from an animation as is done in the 2d platformer demo. --- demos/3d/platformer/enemy.gd | 3 ++- demos/3d/platformer/enemy.scn | Bin 37784 -> 38594 bytes 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'demos/3d/platformer') diff --git a/demos/3d/platformer/enemy.gd b/demos/3d/platformer/enemy.gd index cbbb2fe725..9b2e95a96d 100644 --- a/demos/3d/platformer/enemy.gd +++ b/demos/3d/platformer/enemy.gd @@ -91,4 +91,5 @@ func _ready(): # Initalization here pass - +func _die(): + queue_free() diff --git a/demos/3d/platformer/enemy.scn b/demos/3d/platformer/enemy.scn index 06d725061d..083582a85a 100644 Binary files a/demos/3d/platformer/enemy.scn and b/demos/3d/platformer/enemy.scn differ -- cgit v1.2.3