Added helpful comments, reordered some code in kill()

This commit is contained in:
unfa 2020-09-26 01:24:53 +02:00
parent eb1751fb06
commit 3bda9b8cff

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