feat: dragon animated sprite flipping
This commit is contained in:
parent
8e93ec5db9
commit
dab0545d26
3 changed files with 7 additions and 3 deletions
|
@ -15,7 +15,9 @@ func dress(hat: Texture2D, shirt: Texture2D, shoes: Texture2D):
|
|||
|
||||
func walk_left():
|
||||
$Sprite.scale.x = 1
|
||||
$DragonBody.scale.x = 1
|
||||
|
||||
|
||||
func walk_right():
|
||||
$Sprite.scale.x = -1
|
||||
$DragonBody.scale.x = -1
|
||||
|
|
|
@ -35,12 +35,12 @@ texture = ExtResource("4_oaoux")
|
|||
[node name="Shoes" type="Sprite2D" parent="Sprite"]
|
||||
texture = ExtResource("5_stf6f")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
[node name="DragonBody" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(36, 34)
|
||||
sprite_frames = ExtResource("6_yf7bj")
|
||||
animation = &"idle"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.467887
|
||||
frame_progress = 0.10072
|
||||
|
||||
[connection signal="mouse_entered" from="Area2D" to="." method="_on_area_2d_mouse_entered"]
|
||||
[connection signal="mouse_exited" from="Area2D" to="." method="_on_area_2d_mouse_exited"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue