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=10 format=3 uid="uid://bdhod5c6o53ha"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://bdhod5c6o53ha"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b1hjjbdwf1rtc" path="res://scenes/templates/plant_template.tscn" id="1_vmbvr"]
|
||||
[ext_resource type="Texture2D" uid="uid://coafh3mjharxo" path="res://assets/sprites/atlases/plants/spikeweed.png" id="2_ffrjr"]
|
||||
|
|
@ -6,6 +6,8 @@
|
|||
[ext_resource type="AnimationLibrary" uid="uid://cen6ku4y01dyg" path="res://resources/animations/plants/spikeweed.res" id="3_nwshn"]
|
||||
[ext_resource type="Script" uid="uid://dqquodxaijmem" path="res://scripts/components/plants/behaviours/SpikeweedBehaviour.cs" id="3_uhpn7"]
|
||||
|
||||
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_jleqa"]
|
||||
|
||||
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_lmfqg"]
|
||||
animation = &"spikeweed/idle"
|
||||
|
||||
|
|
@ -22,12 +24,19 @@ snap = 1.0
|
|||
value_label = "attack"
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_63okc"]
|
||||
graph_offset = Vector2(-318, 108)
|
||||
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_jleqa")
|
||||
nodes/TimeScale/position = Vector2(140, 140)
|
||||
nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_1y7y3")
|
||||
nodes/Tree/position = Vector2(-120, 180)
|
||||
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1di76"]
|
||||
size = Vector2(49, 38)
|
||||
|
||||
[node name="Spikeweed" instance=ExtResource("1_vmbvr")]
|
||||
MaxHP = 30.0
|
||||
_effectImmunities = Array[Resource]([])
|
||||
|
||||
[node name="Sprite2D" parent="." index="0"]
|
||||
texture = ExtResource("2_ffrjr")
|
||||
|
|
@ -41,8 +50,9 @@ libraries = {
|
|||
}
|
||||
|
||||
[node name="AnimationTree" parent="." index="2"]
|
||||
tree_root = SubResource("AnimationNodeBlendSpace1D_1y7y3")
|
||||
parameters/blend_position = 0.0
|
||||
tree_root = SubResource("AnimationNodeBlendTree_63okc")
|
||||
parameters/TimeScale/scale = 1.0
|
||||
parameters/Tree/blend_position = 0
|
||||
|
||||
[node name="Behaviour" type="Node" parent="." index="3" node_paths=PackedStringArray("_tree")]
|
||||
script = ExtResource("3_uhpn7")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue