forked from team-sg/hero-mark-2
invincibility code
This commit is contained in:
parent
318aed4560
commit
c8e5291b6b
2 changed files with 8 additions and 0 deletions
|
@ -126,3 +126,6 @@ func _enter_code():
|
||||||
cfox_mode = true
|
cfox_mode = true
|
||||||
"BANDANA":
|
"BANDANA":
|
||||||
infinite_arrows = true
|
infinite_arrows = true
|
||||||
|
"ESCARGOD":
|
||||||
|
var player = get_tree().get_nodes_in_group("player").pop_back()
|
||||||
|
player.state_chart.send_event("become_invulnerable")
|
||||||
|
|
|
@ -1210,6 +1210,11 @@ script = ExtResource( 10 )
|
||||||
to = NodePath("../../Dead")
|
to = NodePath("../../Dead")
|
||||||
event = "hurt"
|
event = "hurt"
|
||||||
|
|
||||||
|
[node name="On BecomeInvulnerable" type="Node" parent="StateChart/Root/Health/Vulnerable"]
|
||||||
|
script = ExtResource( 10 )
|
||||||
|
to = NodePath("../../Invulnerable")
|
||||||
|
event = "become_invulnerable"
|
||||||
|
|
||||||
[node name="Invulnerable" type="Node" parent="StateChart/Root/Health"]
|
[node name="Invulnerable" type="Node" parent="StateChart/Root/Health"]
|
||||||
script = ExtResource( 11 )
|
script = ExtResource( 11 )
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue