newlon/scenes/entities/plants/wallnut.tscn
2025-07-30 02:21:11 +05:00

86 lines
3.6 KiB
Text

[gd_scene load_steps=15 format=3 uid="uid://bq7imkpr2yqyr"]
[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_mnh2m"]
[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_mnh2m"]
[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://assets/animations/plants/wallnut.res" id="3_xl65q"]
[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="4_cjtyy"]
[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="5_2hmhw"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="7_frxj2"]
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_y3tlf"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ds5ry"]
animation = &"wallnut/idle_full"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_frsxy"]
animation = &"wallnut/idle_mid"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_7avgo"]
animation = &"wallnut/idle_low"
[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.5
blend_point_2/node = SubResource("AnimationNodeAnimation_7avgo")
blend_point_2/pos = 0.0
min_space = 0.0
blend_mode = 1
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_bi7an"]
graph_offset = Vector2(-338.2, 175.4)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_y3tlf")
nodes/TimeScale/position = Vector2(60, 140)
nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_nij8v")
nodes/Tree/position = Vector2(-180, 180)
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_khltr"]
size = Vector2(33, 46)
[node name="Wallnut" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
script = ExtResource("1_mnh2m")
MaxHP = 600.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" type="Sprite2D" parent="."]
material = ExtResource("2_mnh2m")
texture = ExtResource("2_o5tda")
hframes = 12
vframes = 3
frame = 10
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"wallnut": ExtResource("3_xl65q")
}
[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")]
tree_root = SubResource("AnimationNodeBlendTree_bi7an")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0
parameters/Tree/blend_position = 1.0
script = ExtResource("5_2hmhw")
entity = NodePath("..")
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 2
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(3.5, 5)
shape = SubResource("RectangleShape2D_khltr")
[node name="Behaviour" type="Node" parent="."]
script = ExtResource("4_cjtyy")
parameters = Array[String](["parameters/Tree/blend_position"])
[node name="FlashController" type="Node" parent="."]
script = ExtResource("7_frxj2")
shaderMaterial = ExtResource("2_mnh2m")
[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"]
[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"]