[gd_scene load_steps=16 format=3 uid="uid://b7innrovtmf5u"]

[ext_resource type="PackedScene" uid="uid://dy41q1kxray5t" path="res://scenes/entities/plants/peashooter.tscn" id="1_lp85e"]
[ext_resource type="Texture2D" uid="uid://cu0651pvvkmvm" path="res://assets/sprites/atlases/plants/snow_pea.png" id="2_ytrm0"]
[ext_resource type="AnimationLibrary" uid="uid://cke5wmmrvevbs" path="res://resources/animations/plants/snowpea.res" id="4_jvx5y"]
[ext_resource type="PackedScene" uid="uid://domeukw4ucmyr" path="res://scenes/projectiles/snowpea_projectile.tscn" id="5_bv86m"]

[sub_resource type="Animation" id="Animation_pephc"]
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_djmlc"]
_data = {
&"RESET": SubResource("Animation_pephc")
}

[sub_resource type="AnimationNodeTimeScale" id="AnimationNodeTimeScale_mbbd7"]

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_dv2ad"]
animation = &"snowpea/idle"

[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_ptach"]
animation = &"snowpea/shoot"

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_8spty"]
switch_mode = 2
advance_mode = 2

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_lshcr"]
advance_mode = 2

[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_ihul0"]
advance_mode = 2
advance_condition = &"ready"

[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_qdmro"]
states/snowpea_idle/node = SubResource("AnimationNodeAnimation_dv2ad")
states/snowpea_idle/position = Vector2(408, 100)
states/snowpea_shoot/node = SubResource("AnimationNodeAnimation_ptach")
states/snowpea_shoot/position = Vector2(682, 100)
transitions = ["snowpea_shoot", "snowpea_idle", SubResource("AnimationNodeStateMachineTransition_8spty"), "Start", "snowpea_idle", SubResource("AnimationNodeStateMachineTransition_lshcr"), "snowpea_idle", "snowpea_shoot", SubResource("AnimationNodeStateMachineTransition_ihul0")]

[sub_resource type="AnimationNodeBlendTree" id="AnimationNodeBlendTree_3oyhk"]
graph_offset = Vector2(-518.8, 27.8)
nodes/TimeScale/node = SubResource("AnimationNodeTimeScale_mbbd7")
nodes/TimeScale/position = Vector2(0, 120)
nodes/Tree/node = SubResource("AnimationNodeStateMachine_qdmro")
nodes/Tree/position = Vector2(-320, 100)
node_connections = [&"TimeScale", 0, &"Tree", &"output", 0, &"TimeScale"]

[sub_resource type="SegmentShape2D" id="SegmentShape2D_3oyhk"]
resource_local_to_scene = true

[node name="Snowpea" instance=ExtResource("1_lp85e")]

[node name="Sprite2D" parent="." index="0"]
texture = ExtResource("2_ytrm0")

[node name="AnimationPlayer" parent="." index="1"]
libraries = {
&"": SubResource("AnimationLibrary_djmlc"),
&"snowpea": ExtResource("4_jvx5y")
}
autoplay = "snowpea/idle"

[node name="AnimationTree" parent="." index="2"]
tree_root = SubResource("AnimationNodeBlendTree_3oyhk")

[node name="Shooter" parent="." index="3"]
_projectile = ExtResource("5_bv86m")

[node name="CollisionShape2D" parent="Eysight" index="0"]
shape = SubResource("SegmentShape2D_3oyhk")
