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=21 format=3 uid="uid://dy41q1kxray5t"]
|
||||
[gd_scene load_steps=23 format=3 uid="uid://dy41q1kxray5t"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_pyk3o"]
|
||||
[ext_resource type="Texture2D" uid="uid://cksryh4w5dbbx" path="res://assets/sprites/atlases/plants/peashooter.png" id="2_14qlx"]
|
||||
|
|
@ -31,6 +31,8 @@ _data = {
|
|||
&"RESET": SubResource("Animation_a2y0j")
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_mbbd7"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_34v85"]
|
||||
animation = &"peashooter/idle"
|
||||
|
||||
|
|
@ -55,6 +57,14 @@ states/peashooter_shoot/node = SubResource("AnimationNodeAnimation_u4o2k")
|
|||
states/peashooter_shoot/position = Vector2(674, 82)
|
||||
transitions = ["Start", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_70n3m"), "peashooter_idle", "peashooter_shoot", SubResource("AnimationNodeStateMachineTransition_2lwpg"), "peashooter_shoot", "peashooter_idle", SubResource("AnimationNodeStateMachineTransition_k61yr")]
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_q58jr"]
|
||||
graph_offset = Vector2(-518.8, 27.8)
|
||||
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_mbbd7")
|
||||
nodes/TimeScale/position = Vector2(0, 120)
|
||||
nodes/Tree/node = SubResource("AnimationNodeStateMachine_13o7y")
|
||||
nodes/Tree/position = Vector2(-300, 120)
|
||||
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
|
||||
|
||||
[sub_resource type="SegmentShape2D" id="SegmentShape2D_8iovl"]
|
||||
resource_local_to_scene = true
|
||||
|
||||
|
|
@ -77,8 +87,9 @@ libraries = {
|
|||
autoplay = "peashooter/idle"
|
||||
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_13o7y")
|
||||
parameters/conditions/ready = false
|
||||
tree_root = SubResource("AnimationNodeBlendTree_q58jr")
|
||||
parameters/TimeScale/scale = 1.0
|
||||
parameters/Tree/conditions/ready = false
|
||||
|
||||
[node name="Shooter" type="Marker2D" parent="." index="3" node_paths=PackedStringArray("_timer")]
|
||||
position = Vector2(12, -4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue