Skip to content

Commit

Permalink
Fix evil boy
Browse files Browse the repository at this point in the history
  • Loading branch information
Znurre committed Oct 5, 2020
1 parent f6d81b2 commit 5031b62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions scenes/Boy_Evil.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,6 @@ anims/OnHit = SubResource( 5 )

[node name="Timer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true
[connection signal="body_entered" from="AggroArea" to="." method="_on_AggroArea_body_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
2 changes: 1 addition & 1 deletion scripts/Boy_Evil.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var originalPos
var _normal_scene = load("res://scenes/Boy.tscn")

func damage(amount : int):
$Timer.start()
if vulnerable:
$Timer.start()
vulnerable = false
$OnTakeDamage.play()
$DamageAnimation.play("OnHit")
Expand Down

0 comments on commit 5031b62

Please sign in to comment.