Plants animation now supports timescale
This commit is contained in:
parent
5fe7cb7d68
commit
e7a9860a54
18 changed files with 141 additions and 60 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=18 format=3 uid="uid://bw1w8jp0yeypy"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://bw1w8jp0yeypy"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_n25yi"]
|
||||
[ext_resource type="Texture2D" uid="uid://b6tyoa5htapir" path="res://assets/sprites/atlases/plants/aloe.png" id="2_iup5p"]
|
||||
|
|
@ -22,7 +22,7 @@ tracks/0/keys = {
|
|||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimationTree:parameters/conditions/heal")
|
||||
tracks/1/path = NodePath("AnimationTree:parameters/Tree/conditions/heal")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
|
|
@ -37,6 +37,8 @@ _data = {
|
|||
&"RESET": SubResource("Animation_vknky")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_qtb3p"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_c25ew"]
|
||||
animation = &"aloe/heal"
|
||||
|
||||
|
|
@ -80,12 +82,19 @@ states/aloe_recharge/position = Vector2(530, 171)
|
|||
transitions = ["Start", "aloe_idle", SubResource("AnimationNodeStateMachineTransition_gi6e0"), "aloe_heal", "aloe_idle_used", SubResource("AnimationNodeStateMachineTransition_l1t7h"), "aloe_recharge", "aloe_idle", SubResource("AnimationNodeStateMachineTransition_cut4s"), "aloe_idle", "aloe_heal", SubResource("AnimationNodeStateMachineTransition_um4ov"), "aloe_idle_used", "aloe_recharge", SubResource("AnimationNodeStateMachineTransition_4kdc0")]
|
||||
graph_offset = Vector2(-78.082, -71.7578)
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_gfy6j"]
|
||||
graph_offset = Vector2(-383, 84)
|
||||
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_qtb3p")
|
||||
nodes/TimeScale/position = Vector2(120, 120)
|
||||
nodes/Tree/node = SubResource("AnimationNodeStateMachine_bldox")
|
||||
nodes/Tree/position = Vector2(-140, 160)
|
||||
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oe0dc"]
|
||||
size = Vector2(22, 32)
|
||||
|
||||
[node name="Aloe" instance=ExtResource("1_n25yi")]
|
||||
MaxHP = 30.0
|
||||
_effectImmunities = Array[Resource]([])
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
position = Vector2(9, -14)
|
||||
|
|
@ -100,9 +109,10 @@ libraries = {
|
|||
}
|
||||
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_bldox")
|
||||
parameters/conditions/charged = false
|
||||
parameters/conditions/heal = false
|
||||
tree_root = SubResource("AnimationNodeBlendTree_gfy6j")
|
||||
parameters/TimeScale/scale = 1.0
|
||||
parameters/Tree/conditions/charged = false
|
||||
parameters/Tree/conditions/heal = false
|
||||
|
||||
[node name="Behaviour" type="Node" parent="." index="3"]
|
||||
script = ExtResource("4_55asm")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue