[gd_scene load_steps=15 format=3 uid="uid://bpekho7leatr5"]

[ext_resource type="Shader" uid="uid://bk8uy5se3fo0" path="res://assets/shaders/shared_outline.gdshader" id="1_jcu1f"]
[ext_resource type="Script" uid="uid://qgeovvluk8yj" path="res://scripts/Sun.cs" id="2_m8xcj"]
[ext_resource type="Texture2D" uid="uid://bkmphus5wjadi" path="res://assets/sprites/atlases/sun_atlas.png" id="2_phn3y"]
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="4_t1pnj"]
[ext_resource type="AudioStream" uid="uid://c0cq80nvld37p" path="res://assets/audio/sfx/sun.mp3" id="5_i8fpp"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_u0o5k"]
shader = ExtResource("1_jcu1f")
shader_parameter/line_colour = Color(1, 0.568627, 0.4, 1)
shader_parameter/line_thickness = 3

[sub_resource type="ShaderMaterial" id="ShaderMaterial_n4y82"]
shader = ExtResource("1_jcu1f")
shader_parameter/line_colour = Color(1, 0.568627, 0.4, 1)
shader_parameter/line_thickness = 3

[sub_resource type="Animation" id="Animation_jfrge"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasGroup/DownerStar:rotation")
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("CanvasGroup/UpperStar:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}

[sub_resource type="Animation" id="Animation_rvj0j"]
resource_name = "main"
length = 10.0
loop_mode = 1
step = 0.5
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasGroup/DownerStar:rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 5, 10),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 6.28319, 12.5664]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CanvasGroup/UpperStar:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 10),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, -6.28319]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_juv2v"]
_data = {
&"RESET": SubResource("Animation_jfrge"),
&"main": SubResource("Animation_rvj0j")
}

[sub_resource type="Animation" id="Animation_t53pt"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasGroup:modulate:a")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}

[sub_resource type="Animation" id="Animation_xyill"]
resource_name = "main"
loop_mode = 1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("CanvasGroup:modulate:a")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0, 0),
"points": PackedFloat32Array(1, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0, 1, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 0.5, 0.986673)
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_p7c0n"]
_data = {
&"RESET": SubResource("Animation_t53pt"),
&"main": SubResource("Animation_xyill")
}

[sub_resource type="CircleShape2D" id="CircleShape2D_7hl7x"]
radius = 19.0

[node name="Sun" type="Area2D" node_paths=PackedStringArray("_deathTimer", "_rotation", "_fade")]
material = SubResource("ShaderMaterial_u0o5k")
script = ExtResource("2_m8xcj")
_deathTimer = NodePath("DeathTimer")
_rotation = NodePath("RotationAnimation")
_fade = NodePath("FadeAnimation")

[node name="CanvasGroup" type="CanvasGroup" parent="."]
material = SubResource("ShaderMaterial_n4y82")

[node name="DownerStar" type="Sprite2D" parent="CanvasGroup"]
show_behind_parent = true
texture = ExtResource("2_phn3y")
vframes = 3

[node name="UpperStar" type="Sprite2D" parent="CanvasGroup"]
show_behind_parent = true
texture = ExtResource("2_phn3y")
vframes = 3
frame = 1

[node name="Circle" type="Sprite2D" parent="CanvasGroup"]
show_behind_parent = true
texture = ExtResource("2_phn3y")
vframes = 3
frame = 2

[node name="RotationAnimation" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_juv2v")
}
autoplay = "main"

[node name="FadeAnimation" type="AnimationPlayer" parent="."]
libraries = {
&"": SubResource("AnimationLibrary_p7c0n")
}

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_7hl7x")

[node name="DeathTimer" type="Timer" parent="."]
wait_time = 22.0
one_shot = true
autostart = true

[node name="CursorControl" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_left = -19.0
offset_top = -19.0
offset_right = 19.0
offset_bottom = 19.0
mouse_filter = 1
mouse_default_cursor_shape = 2

[node name="SunPlayer" type="Node" parent="."]
script = ExtResource("4_t1pnj")
audioStream = ExtResource("5_i8fpp")
channel = "sun"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"

[connection signal="timeout" from="DeathTimer" to="." method="queue_free"]
