Added helpful comments, reordered some code in kill()
This commit is contained in:
parent
eb1751fb06
commit
3bda9b8cff
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Reference in a new issue