4 way animation handler for new actors

This commit is contained in:
Marco 2025-02-23 17:32:36 +01:00
commit 335f4d5430
8 changed files with 260 additions and 117 deletions

View file

@ -1,119 +1,12 @@
[gd_scene load_steps=24 format=3 uid="uid://clxx2ytg3qkcr"]
[gd_scene load_steps=11 format=3 uid="uid://clxx2ytg3qkcr"]
[ext_resource type="Script" path="res://Scripts/Enemy.cs" id="1_d31cy"]
[ext_resource type="Texture2D" uid="uid://xhwfgbv0fjbr" path="res://Sprites/Actors/FairyGuard.png" id="2_dhwsn"]
[ext_resource type="SpriteFrames" uid="uid://ch2ll1on8im2p" path="res://Resources/Sprites/FairyGuard.tres" id="2_vh71w"]
[ext_resource type="Script" path="res://Scripts/Components/ProximityPlayerDetection.cs" id="3_i7ey1"]
[ext_resource type="PackedScene" uid="uid://crry0rgk7a8sm" path="res://Scenes/Weapons/BaseWeapon.tscn" id="4_p0lt3"]
[ext_resource type="Resource" uid="uid://cdfmedtgp2rcn" path="res://Resources/Weapons/EnemyWeapon.tres" id="5_s8k35"]
[ext_resource type="PackedScene" uid="uid://cuixq5ex0j40h" path="res://Scenes/enemyBullet.tscn" id="6_vxjxr"]
[sub_resource type="AtlasTexture" id="AtlasTexture_42a57"]
atlas = ExtResource("2_dhwsn")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_gl2o5"]
atlas = ExtResource("2_dhwsn")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ad5n8"]
atlas = ExtResource("2_dhwsn")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_hfqok"]
atlas = ExtResource("2_dhwsn")
region = Rect2(0, 32, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_47idc"]
atlas = ExtResource("2_dhwsn")
region = Rect2(32, 32, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_gquu4"]
atlas = ExtResource("2_dhwsn")
region = Rect2(16, 32, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_2ftnw"]
atlas = ExtResource("2_dhwsn")
region = Rect2(0, 48, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_o4btr"]
atlas = ExtResource("2_dhwsn")
region = Rect2(16, 48, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ue8y7"]
atlas = ExtResource("2_dhwsn")
region = Rect2(32, 48, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_n8dp2"]
atlas = ExtResource("2_dhwsn")
region = Rect2(0, 16, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_6p57w"]
atlas = ExtResource("2_dhwsn")
region = Rect2(16, 16, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_gpakj"]
atlas = ExtResource("2_dhwsn")
region = Rect2(32, 16, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_0g5m3"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_42a57")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gl2o5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ad5n8")
}],
"loop": true,
"name": &"down",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_hfqok")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_47idc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gquu4")
}],
"loop": true,
"name": &"left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2ftnw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o4btr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ue8y7")
}],
"loop": true,
"name": &"right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_n8dp2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6p57w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gpakj")
}],
"loop": true,
"name": &"up",
"speed": 5.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_8gtts"]
radius = 7.0
@ -136,7 +29,7 @@ _navigationEnabled = true
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_0g5m3")
sprite_frames = ExtResource("2_vh71w")
animation = &"left"
frame = 2
frame_progress = 0.309308