Added helpful comments, reordered some code in kill()

remotes/1705382094874458415/tmp_refs/heads/godot4-port
unfa 2020-09-26 01:24:53 +02:00
parent eb1751fb06
commit 3bda9b8cff
1 changed files with 5 additions and 3 deletions

View File

@ -173,14 +173,16 @@ remote func blood_splatter(location):
master func kill():
health = 0
$CollisionShapeBody.disabled = true
$CollisionShapeFeet.disabled = true
# spawn gibs
var gibs = $Player/Gibs.duplicate()
get_tree().root.add_child(gibs)
gibs.global_transform = global_transform
gibs.show()
$CollisionShapeBody.disabled = true
$CollisionShapeFeet.disabled = true
# enable the ragdoll colliders
for i in gibs.get_children():
i.get_child(1).disabled = false