[gd_scene load_steps=11 format=3 uid="uid://bttust5ohud8e"]

[ext_resource type="Script" uid="uid://1oup50bp0pwd" path="res://src/world/mechanics/relay/gunk_relay.gd" id="1_rdv5j"]
[ext_resource type="Script" uid="uid://bukihqt1lybnx" path="res://src/util/frame_skipper.gd" id="2_ipm58"]
[ext_resource type="PackedScene" uid="uid://ghdsr1b4hpr8" path="res://src/util/editor_arrow/editor_arrow.tscn" id="2_nfkbq"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_gk1l0"]
resource_local_to_scene = true
albedo_color = Color(0, 0.0313726, 0.101961, 1)
emission_enabled = true
emission = Color(1, 0, 0, 1)
emission_energy_multiplier = 0.0

[sub_resource type="SphereMesh" id="SphereMesh_hsruj"]
resource_local_to_scene = true
material = SubResource("StandardMaterial3D_gk1l0")
radius = 0.1
height = 0.2

[sub_resource type="SphereShape3D" id="SphereShape3D_gk1l0"]
radius = 0.1

[sub_resource type="Animation" id="Animation_ipm58"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:mesh:material:emission_energy_multiplier")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:mesh:material:emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0, 0, 1)]
}

[sub_resource type="Animation" id="Animation_nfkbq"]
resource_name = "pulse"
step = 0.1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:mesh:material:emission_energy_multiplier")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.166667, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 2.0, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:mesh:material:emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.25098, 0.878431, 1, 1)]
}

[sub_resource type="Animation" id="Animation_rdv5j"]
resource_name = "trigger"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:mesh:material:emission_energy_multiplier")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.166667, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 2.0, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:mesh:material:emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0, 0, 1)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_ipm58"]
_data = {
&"RESET": SubResource("Animation_ipm58"),
&"pulse": SubResource("Animation_nfkbq"),
&"trigger": SubResource("Animation_rdv5j")
}

[node name="GunkRelay" type="StaticBody3D"]
collision_layer = 36
collision_mask = 0
script = ExtResource("1_rdv5j")
editor_arrow_scene = ExtResource("2_nfkbq")
value = 800.0

[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
mesh = SubResource("SphereMesh_hsruj")

[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_gk1l0")

[node name="TriggerDelay" type="Timer" parent="."]
unique_name_in_owner = true
wait_time = 0.2
one_shot = true

[node name="PulseDelay" type="Timer" parent="."]
unique_name_in_owner = true
wait_time = 0.4
one_shot = true

[node name="FrameSkipper" type="Node" parent="."]
script = ExtResource("2_ipm58")
frame_skip = 3
metadata/_custom_type_script = "uid://bukihqt1lybnx"

[node name="AnimationPlayer" type="AnimationPlayer" parent="FrameSkipper"]
unique_name_in_owner = true
root_node = NodePath("../..")
libraries = {
&"": SubResource("AnimationLibrary_ipm58")
}
speed_scale = 4.0

[node name="EditorConnections" type="Node3D" parent="."]
unique_name_in_owner = true

[connection signal="timeout" from="TriggerDelay" to="." method="_on_trigger_delay_timeout"]
[connection signal="timeout" from="PulseDelay" to="." method="_on_pulse_delay_timeout"]
