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=24 format=3 uid="uid://b5x35v3w2u8dx"]
|
||||
[gd_scene load_steps=26 format=3 uid="uid://b5x35v3w2u8dx"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_dj7ul"]
|
||||
[ext_resource type="Texture2D" uid="uid://c77o6ba0mw7a3" path="res://assets/sprites/atlases/plants/potato_mine.png" id="2_sneas"]
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
[ext_resource type="AudioStream" uid="uid://dltjtpyfr1so0" path="res://assets/audio/sfx/potato_mine.mp3" id="8_3vqdc"]
|
||||
[ext_resource type="AudioStream" uid="uid://b27om1bw1x04e" path="res://assets/audio/sfx/dirt_rise.mp3" id="9_3vqdc"]
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_3vqdc"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_6uutc"]
|
||||
animation = &"potato_mine/explode"
|
||||
|
||||
|
|
@ -55,6 +57,14 @@ states/potato_mine_prime/position = Vector2(490.656, 75.168)
|
|||
transitions = ["Start", "potato_mine_idle_unprimed", SubResource("AnimationNodeStateMachineTransition_ttnxb"), "potato_mine_idle_unprimed", "potato_mine_prime", SubResource("AnimationNodeStateMachineTransition_8nvnf"), "potato_mine_explode", "End", SubResource("AnimationNodeStateMachineTransition_q0arb"), "potato_mine_prime", "potato_mine_idle_primed", SubResource("AnimationNodeStateMachineTransition_dikhn"), "potato_mine_idle_primed", "potato_mine_explode", SubResource("AnimationNodeStateMachineTransition_lqd1d")]
|
||||
graph_offset = Vector2(-16.3438, -67.832)
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_824aq"]
|
||||
graph_offset = Vector2(-427, 79)
|
||||
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_3vqdc")
|
||||
nodes/TimeScale/position = Vector2(100, 120)
|
||||
nodes/Tree/node = SubResource("AnimationNodeStateMachine_nfn7b")
|
||||
nodes/Tree/position = Vector2(-260, 140)
|
||||
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_v0g5b"]
|
||||
radius = 19.0263
|
||||
|
||||
|
|
@ -69,13 +79,12 @@ size = Vector2(34, 19)
|
|||
|
||||
[node name="Potato mine" instance=ExtResource("1_dj7ul")]
|
||||
MaxHP = 20.0
|
||||
_effectImmunities = Array[Resource]([])
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
texture = ExtResource("2_sneas")
|
||||
hframes = 7
|
||||
vframes = 4
|
||||
frame = 7
|
||||
frame = 14
|
||||
|
||||
[node name="AnimationPlayer" parent="." index="1"]
|
||||
libraries = {
|
||||
|
|
@ -84,9 +93,10 @@ libraries = {
|
|||
autoplay = "idle_unprimed"
|
||||
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeStateMachine_nfn7b")
|
||||
parameters/conditions/explode = false
|
||||
parameters/conditions/primed = false
|
||||
tree_root = SubResource("AnimationNodeBlendTree_824aq")
|
||||
parameters/TimeScale/scale = 1.0
|
||||
parameters/Tree/conditions/explode = false
|
||||
parameters/Tree/conditions/primed = false
|
||||
|
||||
[node name="Detectionbox" type="Area2D" parent="." index="3"]
|
||||
collision_layer = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue