diff options
| author | Eric R. Monson | 2015-08-28 11:15:31 -0700 |
|---|---|---|
| committer | Eric R. Monson | 2015-08-28 11:15:31 -0700 |
| commit | f0119c2e3c0ddb19cef1fdf6cfebb6697dabd14d (patch) | |
| tree | 7073b8e9ed8809cdde3a269cdd1d0ca11becc25d /demos | |
| parent | b0be30d9efb11aba10fd97c71fec47e34ea88ca1 (diff) | |
| download | godot-f0119c2e3c0ddb19cef1fdf6cfebb6697dabd14d.tar.gz godot-f0119c2e3c0ddb19cef1fdf6cfebb6697dabd14d.tar.zst godot-f0119c2e3c0ddb19cef1fdf6cfebb6697dabd14d.zip | |
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.
Diffstat (limited to 'demos')
| -rw-r--r-- | demos/3d/platformer/enemy.gd | 3 | ||||
| -rw-r--r-- | demos/3d/platformer/enemy.scn | bin | 37784 -> 38594 bytes |
2 files changed, 2 insertions, 1 deletions
diff --git a/demos/3d/platformer/enemy.gd b/demos/3d/platformer/enemy.gd index cbbb2fe72..9b2e95a96 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 Binary files differindex 06d725061..083582a85 100644 --- a/demos/3d/platformer/enemy.scn +++ b/demos/3d/platformer/enemy.scn |
