[gd_scene load_steps=25 format=3 uid="uid://dh0lvt4eb1x5s"]

[ext_resource type="Texture2D" uid="uid://cuv6yxysv620e" path="res://planets/background/space-seamless.png" id="1_pfjy3"]
[ext_resource type="Script" uid="uid://d4crfwu1s5wm1" path="res://planets/background/textureRotate.gd" id="2_tvkms"]
[ext_resource type="Texture2D" uid="uid://btgsbvc7gidjq" path="res://planets/sprites/planet.png" id="3_6eyof"]
[ext_resource type="Script" uid="uid://b8kcef36xwy7k" path="res://planets/planetOne/planet_sprite.gd" id="4_1nrd0"]
[ext_resource type="Script" uid="uid://bxsyec5gcnavv" path="res://planets/planetOne/caveEntranceOne.gd" id="5_a476e"]
[ext_resource type="Texture2D" uid="uid://cw30f2tjaigg4" path="res://planets/sprites/caveEntrance.png" id="6_qiaui"]
[ext_resource type="Texture2D" uid="uid://dimdd34ldpix5" path="res://player/smallPlayer/playerSprites/playerSprite_0001.png" id="7_7l4lm"]
[ext_resource type="Texture2D" uid="uid://cmga6fl4uer1m" path="res://player/smallPlayer/playerSprites/playerSprite_0002.png" id="8_nnmca"]
[ext_resource type="Texture2D" uid="uid://cw0ntcoynkr0w" path="res://player/smallPlayer/playerSprites/playerSprite_0003.png" id="9_mofbo"]
[ext_resource type="Texture2D" uid="uid://dt3rv4x30n4ru" path="res://player/smallPlayer/playerSprites/playerSprite_0004.png" id="10_8w80w"]
[ext_resource type="Texture2D" uid="uid://bvnodga8epycb" path="res://player/smallPlayer/playerSprites/playerSprite_0005.png" id="11_j1p6g"]
[ext_resource type="Texture2D" uid="uid://d5qpoa8wadrp" path="res://player/smallPlayer/playerSprites/playerSprite_0006.png" id="12_8xbhm"]
[ext_resource type="Texture2D" uid="uid://jfhpkm78lqyx" path="res://player/smallPlayer/playerSprites/playerSprite_0007.png" id="13_da24w"]
[ext_resource type="Texture2D" uid="uid://jssqmb4832pr" path="res://player/smallPlayer/playerSprites/playerSprite_0008.png" id="14_lept3"]
[ext_resource type="Texture2D" uid="uid://dxeg6715vly1v" path="res://player/smallPlayer/playerSprites/playerSprite_0009.png" id="15_4smcn"]
[ext_resource type="Texture2D" uid="uid://b8eut6fnru722" path="res://player/smallPlayer/playerSprites/playerSprite_0010.png" id="16_r40ym"]
[ext_resource type="Script" uid="uid://jeddvfkorpxu" path="res://levels/animation_player.gd" id="17_njh3w"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_3xb1h"]
size = Vector2(40, 36.5)

[sub_resource type="SpriteFrames" id="SpriteFrames_i6oun"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_7l4lm")
}, {
"duration": 1.0,
"texture": ExtResource("8_nnmca")
}, {
"duration": 1.0,
"texture": ExtResource("9_mofbo")
}, {
"duration": 1.0,
"texture": ExtResource("10_8w80w")
}, {
"duration": 1.0,
"texture": ExtResource("11_j1p6g")
}, {
"duration": 1.0,
"texture": ExtResource("12_8xbhm")
}, {
"duration": 1.0,
"texture": ExtResource("13_da24w")
}, {
"duration": 1.0,
"texture": ExtResource("14_lept3")
}, {
"duration": 1.0,
"texture": ExtResource("15_4smcn")
}, {
"duration": 1.0,
"texture": ExtResource("16_r40ym")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_dp0ko"]

[sub_resource type="Animation" id="Animation_h31ej"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ColorRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0, 0, 0, 1)]
}

[sub_resource type="Animation" id="Animation_a6hc6"]
resource_name = "fadeIn"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ColorRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
}

[sub_resource type="Animation" id="Animation_e5775"]
resource_name = "fadeOut"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("ColorRect:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
_data = {
&"RESET": SubResource("Animation_h31ej"),
&"fadeIn": SubResource("Animation_a6hc6"),
&"fadeOut": SubResource("Animation_e5775")
}

[node name="planetScene" type="Node2D"]

[node name="TextureRect" type="TextureRect" parent="."]
offset_left = -835.0
offset_top = -538.0
offset_right = 2088.0
offset_bottom = 2077.0
pivot_offset = Vector2(1411, 1294)
texture = ExtResource("1_pfjy3")
stretch_mode = 1
script = ExtResource("2_tvkms")

[node name="planetSprite" type="Sprite2D" parent="."]
position = Vector2(575, 786)
scale = Vector2(4.53252, 4.53252)
texture = ExtResource("3_6eyof")
offset = Vector2(0.2, 0.23)
script = ExtResource("4_1nrd0")

[node name="caveEntrance" type="Area2D" parent="planetSprite"]
position = Vector2(-126.861, -173.413)
scale = Vector2(0.220628, 0.220628)
script = ExtResource("5_a476e")

[node name="Sprite2D" type="Sprite2D" parent="planetSprite/caveEntrance"]
position = Vector2(88, 652)
rotation = -1.36127
scale = Vector2(0.528808, 0.528808)
texture = ExtResource("6_qiaui")

[node name="CollisionShape2D" type="CollisionShape2D" parent="planetSprite/caveEntrance"]
position = Vector2(99, 653)
shape = SubResource("RectangleShape2D_3xb1h")

[node name="caveExit" type="Sprite2D" parent="planetSprite"]
position = Vector2(-0.220625, -110.976)
scale = Vector2(0.105828, 0.105828)
texture = ExtResource("6_qiaui")

[node name="playerModel" type="StaticBody2D" parent="."]
position = Vector2(573, 300)

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="playerModel"]
sprite_frames = SubResource("SpriteFrames_i6oun")
autoplay = "default"

[node name="CollisionShape2D" type="CollisionShape2D" parent="playerModel"]
shape = SubResource("RectangleShape2D_dp0ko")

[node name="fadeOut" type="CanvasLayer" parent="."]

[node name="AnimationPlayer" type="AnimationPlayer" parent="fadeOut"]
physics_interpolation_mode = 1
libraries = {
&"": SubResource("AnimationLibrary_h31ej")
}
autoplay = "fadeIn"
script = ExtResource("17_njh3w")

[node name="ColorRect" type="ColorRect" parent="fadeOut"]
modulate = Color(0, 0, 0, 1)
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0, 0, 0, 1)
metadata/_edit_use_anchors_ = true

[connection signal="body_entered" from="planetSprite/caveEntrance" to="planetSprite/caveEntrance" method="_on_body_entered"]
[connection signal="playerExit" from="planetSprite/caveEntrance" to="fadeOut/AnimationPlayer" method="_on_exit_zone_player_exit"]
