Fixed Player Animation
This commit is contained in:
parent
b30465742f
commit
a3d119294f
2 changed files with 7 additions and 1 deletions
|
|
@ -166,6 +166,10 @@ func die():
|
||||||
player_died.emit()
|
player_died.emit()
|
||||||
dead = true
|
dead = true
|
||||||
|
|
||||||
|
func _on_attack_end():
|
||||||
|
if($AnimatedSprite2D.animation != "idle"):
|
||||||
|
$AnimatedSprite2D.play("idle")
|
||||||
|
$AnimatedSprite2D.stop()
|
||||||
|
|
||||||
func _on_death_screen_visibility_changed() -> void:
|
func _on_death_screen_visibility_changed() -> void:
|
||||||
handle_input = !handle_input
|
handle_input = !handle_input
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ animations = [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("2_hg6s5")
|
"texture": ExtResource("2_hg6s5")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": false,
|
||||||
"name": &"idle",
|
"name": &"idle",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -103,3 +103,5 @@ volume_db = 15.0
|
||||||
stream = ExtResource("12_ebec5")
|
stream = ExtResource("12_ebec5")
|
||||||
volume_db = -6.0
|
volume_db = -6.0
|
||||||
pitch_scale = 1.62
|
pitch_scale = 1.62
|
||||||
|
|
||||||
|
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_attack_end"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue