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

113 lines
4.5 KiB
Text

[gd_scene load_steps=19 format=3 uid="uid://qq0cw8xtcoj3"]
[ext_resource type="Script" uid="uid://dli2i6albvugt" path="res://scripts/entities/plants/RuntimePlantData.cs" id="1_gu3kj"]
[ext_resource type="Material" uid="uid://cn7ac4meka1hc" path="res://assets/GenericFlashMaterial.tres" id="2_1angc"]
[ext_resource type="Texture2D" uid="uid://dff73m8ahamaa" path="res://assets/sprites/atlases/plants/garlic.png" id="2_w2jbi"]
[ext_resource type="AnimationLibrary" uid="uid://cjl81f61gdlvi" path="res://assets/animations/plants/garlic.res" id="3_jkb3q"]
[ext_resource type="Script" uid="uid://dwlwi42smgxkb" path="res://scripts/TimeScalableAnimationTree.cs" id="4_1angc"]
[ext_resource type="Script" uid="uid://btkmd86pn828y" path="res://scripts/entities/plants/behaviours/HpBasedBehaviour.cs" id="4_bv44h"]
[ext_resource type="Script" uid="uid://bmtukcq10m8wo" path="res://scripts/entities/plants/ReturnEffect.cs" id="5_oob20"]
[ext_resource type="Resource" uid="uid://dsg1vjx76ifgu" path="res://assets/effects/GarlicEffect.tres" id="6_gho1l"]
[ext_resource type="Script" uid="uid://30pbgasu64aw" path="res://scripts/entities/FlashShaderController.cs" id="8_6iwlp"]
[sub_resource type="Animation" id="Animation_k0cex"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_v4l78"]
_data = {
&"RESET": SubResource("Animation_k0cex")
}
[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_2d3xk"]
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_mdv0r"]
animation = &"garlic/full_hp"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_j5xqj"]
animation = &"garlic/half_hp"
[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_tlgpl"]
animation = &"garlic/low_hp"
[sub_resource type="AnimationNodeBlendSpace1D" id="AnimationNodeBlendSpace1D_8mvpm"]
blend_point_0/node = SubResource("AnimationNodeAnimation_mdv0r")
blend_point_0/pos = 1.0
blend_point_1/node = SubResource("AnimationNodeAnimation_j5xqj")
blend_point_1/pos = 0.5
blend_point_2/node = SubResource("AnimationNodeAnimation_tlgpl")
blend_point_2/pos = 0.0
min_space = 0.0
blend_mode = 1
[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_2o7sr"]
graph_offset = Vector2(-389, 166)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_2d3xk")
nodes/TimeScale/position = Vector2(100, 160)
nodes/Tree/node = SubResource("AnimationNodeBlendSpace1D_8mvpm")
nodes/Tree/position = Vector2(-160, 200)
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_thlvs"]
size = Vector2(32, 29)
[node name="Garlic" type="Node2D" node_paths=PackedStringArray("_player", "_tree")]
script = ExtResource("1_gu3kj")
MaxHP = 200.0
_player = NodePath("AnimationPlayer")
_tree = NodePath("AnimationTree")
[node name="Sprite2D" type="Sprite2D" parent="."]
material = ExtResource("2_1angc")
texture = ExtResource("2_w2jbi")
hframes = 8
vframes = 3
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_v4l78"),
&"garlic": ExtResource("3_jkb3q")
}
[node name="AnimationTree" type="AnimationTree" parent="." node_paths=PackedStringArray("entity")]
tree_root = SubResource("AnimationNodeBlendTree_2o7sr")
anim_player = NodePath("../AnimationPlayer")
parameters/TimeScale/scale = 1.0
parameters/Tree/blend_position = 1.0
script = ExtResource("4_1angc")
entity = NodePath("..")
[node name="Hitbox" type="Area2D" parent="."]
collision_layer = 2
collision_mask = 0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
position = Vector2(1, 11.5)
shape = SubResource("RectangleShape2D_thlvs")
[node name="Behaviour" type="Node" parent="."]
script = ExtResource("4_bv44h")
parameters = Array[String](["parameters/Tree/blend_position"])
[node name="ReturnEffect" type="Node" parent="."]
script = ExtResource("5_oob20")
_effectToReturn = ExtResource("6_gho1l")
[node name="FlashController" type="Node" parent="."]
script = ExtResource("8_6iwlp")
shaderMaterial = ExtResource("2_1angc")
[connection signal="OnDamaged" from="." to="FlashController" method="DamageFlash"]
[connection signal="OnHPChanged" from="." to="Behaviour" method="OnHPChanged"]
[connection signal="OnHPChanged" from="." to="ReturnEffect" method="OnDamageRecieved"]