Animations improved
This commit is contained in:
parent
c89d93cf24
commit
ad18793543
35 changed files with 430 additions and 465 deletions
|
|
@ -1,117 +1,54 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://dh6rm7o3taaek"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://bq7imkpr2yqyr"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dstqh1wc5dvmo" path="res://assets/sprites/atlases/plants/wallnut.png" id="1_571nl"]
|
||||
[ext_resource type="Script" path="res://scripts/components/plants/RuntimePlantData.cs" id="1_mt5mt"]
|
||||
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/WallnutBehaviour.cs" id="3_tu4pm"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_fluxn"]
|
||||
[ext_resource type="Texture2D" uid="uid://dstqh1wc5dvmo" path="res://assets/sprites/atlases/plants/wallnut.png" id="2_o5tda"]
|
||||
[ext_resource type="AnimationLibrary" uid="uid://0bdesb8j2mbo" path="res://resources/animations/plants/wallnut.res" id="3_xl65q"]
|
||||
[ext_resource type="Script" path="res://scripts/components/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_s4r5j"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [0]
|
||||
}
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ds5ry"]
|
||||
animation = &"wallnut/idle_full"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_lfaj3"]
|
||||
resource_name = "idle_full"
|
||||
length = 8.50002
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 2.25, 2.5, 2.75, 3, 3.25, 4.25, 4.5, 6.75, 7, 7.25, 7.5, 9.75),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [0, 3, 6, 9, 12, 15, 12, 9, 6, 3, 27, 30, 3]
|
||||
}
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_frsxy"]
|
||||
animation = &"wallnut/idle_mid"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_u73od"]
|
||||
resource_name = "idle_low"
|
||||
length = 3.00003
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32]
|
||||
}
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_7avgo"]
|
||||
animation = &"wallnut/idle_low"
|
||||
|
||||
[sub_resource type="Animation" id="Animation_c8ofx"]
|
||||
resource_name = "idle_mid"
|
||||
length = 3.50005
|
||||
loop_mode = 1
|
||||
step = 0.25
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Sprite:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
|
||||
"update": 1,
|
||||
"values": [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34]
|
||||
}
|
||||
[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_nij8v"]
|
||||
blend_point_0/node = SubResource("AnimationNodeAnimation_ds5ry")
|
||||
blend_point_0/pos = 1.0
|
||||
blend_point_1/node = SubResource("AnimationNodeAnimation_frsxy")
|
||||
blend_point_1/pos = 0.7
|
||||
blend_point_2/node = SubResource("AnimationNodeAnimation_7avgo")
|
||||
blend_point_2/pos = 0.3
|
||||
min_space = 0.0
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_7mgid"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_s4r5j"),
|
||||
"idle_full": SubResource("Animation_lfaj3"),
|
||||
"idle_low": SubResource("Animation_u73od"),
|
||||
"idle_mid": SubResource("Animation_c8ofx")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ytjo1"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_523ui"]
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_khltr"]
|
||||
size = Vector2(33, 46)
|
||||
|
||||
[node name="Wallnut" type="Node2D"]
|
||||
script = ExtResource("1_mt5mt")
|
||||
[node name="Wallnut" instance=ExtResource("1_fluxn")]
|
||||
_maxHP = 1000
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
texture = ExtResource("2_o5tda")
|
||||
hframes = 12
|
||||
vframes = 3
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_7mgid"),
|
||||
"wallnut": SubResource("AnimationLibrary_ytjo1")
|
||||
"wallnut": ExtResource("3_xl65q")
|
||||
}
|
||||
autoplay = "idle_full"
|
||||
|
||||
[node name="Sprite" type="Sprite2D" parent="."]
|
||||
use_parent_material = true
|
||||
texture = ExtResource("1_571nl")
|
||||
hframes = 3
|
||||
vframes = 12
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeBlendSpace1D_nij8v")
|
||||
parameters/blend_position = 1.0
|
||||
|
||||
[node name="Behaviour" type="Node" parent="."]
|
||||
script = ExtResource("3_tu4pm")
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="."]
|
||||
collision_layer = 2
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2(3.5, 5)
|
||||
shape = SubResource("RectangleShape2D_523ui")
|
||||
shape = SubResource("RectangleShape2D_khltr")
|
||||
|
||||
[node name="Behaviour" type="Node" parent="." index="4"]
|
||||
script = ExtResource("4_cjtyy")
|
||||
|
||||
[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue