feat: Implemented animation

This commit is contained in:
Gerard Gascón 2024-02-24 19:06:01 +01:00
parent 07fbba64f1
commit 764f19228d
2 changed files with 63 additions and 1 deletions

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ct4q346efqc2x"
path="res://.godot/imported/descansando-Sheet.png-b9be3574090c429e021c70660be71d15.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://resources/sprites/descansando-Sheet.png"
dest_files=["res://.godot/imported/descansando-Sheet.png-b9be3574090c429e021c70660be71d15.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -1,6 +1,29 @@
[gd_scene load_steps=2 format=3 uid="uid://cclomuvgqtu2"]
[gd_scene load_steps=6 format=3 uid="uid://cclomuvgqtu2"]
[ext_resource type="Texture2D" uid="uid://csafdelp4mlxy" path="res://resources/backgrounds/slide40.png" id="1_pmjrr"]
[ext_resource type="Texture2D" uid="uid://ct4q346efqc2x" path="res://resources/sprites/descansando-Sheet.png" id="2_4ugxt"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ht5kj"]
atlas = ExtResource("2_4ugxt")
region = Rect2(0, 0, 407, 260)
[sub_resource type="AtlasTexture" id="AtlasTexture_ex113"]
atlas = ExtResource("2_4ugxt")
region = Rect2(407, 0, 407, 260)
[sub_resource type="SpriteFrames" id="SpriteFrames_pn670"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ht5kj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ex113")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[node name="slide40" type="Control"]
layout_mode = 3
@ -21,3 +44,8 @@ offset_right = 40.0
offset_bottom = 40.0
scale = Vector2(0.5, 0.5)
texture = ExtResource("1_pmjrr")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(480, 360)
sprite_frames = SubResource("SpriteFrames_pn670")
autoplay = "default"