feat: dragon animated sprite flipping
This commit is contained in:
parent
8e93ec5db9
commit
dab0545d26
3 changed files with 7 additions and 3 deletions
|
@ -10,9 +10,10 @@ config_version=5
|
|||
|
||||
[application]
|
||||
|
||||
config/name="SantJordiJam25"
|
||||
config/name="La Placeta del Drac"
|
||||
run/main_scene="uid://ctytpqaed0yqx"
|
||||
config/features=PackedStringArray("4.4", "GL Compatibility")
|
||||
boot_splash/bg_color=Color(0.14, 0.14, 0.14, 0)
|
||||
boot_splash/show_image=false
|
||||
config/icon="res://assets/sprites/icon.svg"
|
||||
|
||||
|
@ -20,6 +21,7 @@ config/icon="res://assets/sprites/icon.svg"
|
|||
|
||||
window/size/viewport_width=600
|
||||
window/size/viewport_height=300
|
||||
window/size/resizable=false
|
||||
window/size/borderless=true
|
||||
window/size/always_on_top=true
|
||||
window/size/transparent=true
|
||||
|
|
|
@ -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