diff --git a/src/models/enemies/trash_can/sprites/trash_can.png b/src/models/enemies/trash_can/sprites/trash_can.png deleted file mode 100644 index 722a164..0000000 Binary files a/src/models/enemies/trash_can/sprites/trash_can.png and /dev/null differ diff --git a/src/models/enemies/trash_can/sprites/trash_can.png.import b/src/models/enemies/trash_can/sprites/trash_can.png.import deleted file mode 100644 index 7026c89..0000000 --- a/src/models/enemies/trash_can/sprites/trash_can.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/trash_can.png-0987d8f67e93f5b32fac39729f87305a.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://src/models/enemies/trash_can/sprites/trash_can.png" -dest_files=[ "res://.import/trash_can.png-0987d8f67e93f5b32fac39729f87305a.stex" ] - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/bptc_ldr=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=false -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -process/invert_color=false -process/normal_map_invert_y=false -stream=false -size_limit=0 -detect_3d=false -svg/scale=1.0 diff --git a/src/models/player/Player.tscn b/src/models/player/Player.tscn index 7094e34..d68ab9c 100644 --- a/src/models/player/Player.tscn +++ b/src/models/player/Player.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=8 format=2] -[ext_resource path="res://src/models/player/sprite.png" type="Texture" id=1] +[ext_resource path="res://src/models/player/sprites/player_spriteframes.tres" type="SpriteFrames" id=1] [ext_resource path="res://src/models/player/player.gd" type="Script" id=2] [ext_resource path="res://res/shaders/colorize.tres" type="Material" id=3] @@ -69,9 +69,12 @@ tracks/1/keys = { [node name="Player" type="KinematicBody2D" groups=["player"]] script = ExtResource( 2 ) -[node name="Sprite" type="Sprite" parent="."] +[node name="Sprite" type="AnimatedSprite" parent="."] material = ExtResource( 3 ) -texture = ExtResource( 1 ) +frames = ExtResource( 1 ) +animation = "run" +frame = 2 +playing = true centered = false [node name="WallCollision" type="CollisionShape2D" parent="."] diff --git a/src/models/player/sprite.png b/src/models/player/sprite.png deleted file mode 100644 index ae4a661..0000000 Binary files a/src/models/player/sprite.png and /dev/null differ diff --git a/src/models/player/sprites/player_spriteframes.tres b/src/models/player/sprites/player_spriteframes.tres new file mode 100644 index 0000000..7214716 --- /dev/null +++ b/src/models/player/sprites/player_spriteframes.tres @@ -0,0 +1,35 @@ +[gd_resource type="SpriteFrames" load_steps=8 format=2] + +[ext_resource path="res://src/models/player/sprites/run.png" type="Texture" id=1] + +[sub_resource type="AtlasTexture" id=1] +atlas = ExtResource( 1 ) +region = Rect2( 0, 0, 22, 25 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 1 ) +region = Rect2( 22, 0, 22, 25 ) + +[sub_resource type="AtlasTexture" id=3] +atlas = ExtResource( 1 ) +region = Rect2( 44, 0, 22, 25 ) + +[sub_resource type="AtlasTexture" id=4] +atlas = ExtResource( 1 ) +region = Rect2( 66, 0, 22, 25 ) + +[sub_resource type="AtlasTexture" id=5] +atlas = ExtResource( 1 ) +region = Rect2( 88, 0, 22, 25 ) + +[sub_resource type="AtlasTexture" id=6] +atlas = ExtResource( 1 ) +region = Rect2( 110, 0, 22, 25 ) + +[resource] +animations = [ { +"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ], +"loop": true, +"name": "run", +"speed": 12.0 +} ] diff --git a/src/models/player/sprites/run.png b/src/models/player/sprites/run.png new file mode 100644 index 0000000..bafe64e Binary files /dev/null and b/src/models/player/sprites/run.png differ diff --git a/src/models/player/sprite.png.import b/src/models/player/sprites/run.png.import similarity index 71% rename from src/models/player/sprite.png.import rename to src/models/player/sprites/run.png.import index 878c8db..0f3acc1 100644 --- a/src/models/player/sprite.png.import +++ b/src/models/player/sprites/run.png.import @@ -2,15 +2,15 @@ importer="texture" type="StreamTexture" -path="res://.import/sprite.png-d1a953a55fa409c61c2d0834450a9346.stex" +path="res://.import/run.png-345781115512817e4a25318657a4c97e.stex" metadata={ "vram_texture": false } [deps] -source_file="res://src/models/player/sprite.png" -dest_files=[ "res://.import/sprite.png-d1a953a55fa409c61c2d0834450a9346.stex" ] +source_file="res://src/models/player/sprites/run.png" +dest_files=[ "res://.import/run.png-345781115512817e4a25318657a4c97e.stex" ] [params]