[gd_scene load_steps=48 format=4 uid="uid://ckbyiwy0dxbsd"]

[ext_resource type="Script" uid="uid://dqyddqx8xm0gw" path="res://games/platformer/player.gd" id="1_1wj3w"]
[ext_resource type="Script" uid="uid://bs4keltwfbrrn" path="res://games/platformer/platformer.gd" id="1_mauky"]
[ext_resource type="Texture2D" uid="uid://baf30tscdkl0i" path="res://sprites/tv_remote.png" id="2_7eu3u"]
[ext_resource type="Texture2D" uid="uid://g5arxk4po7kw" path="res://sprites/platformer_lab_tile.png" id="3_84mot"]
[ext_resource type="Texture2D" uid="uid://d1mo5ecyjgngw" path="res://sprites/platformer_stone_tile.png" id="4_86tx6"]
[ext_resource type="Texture2D" uid="uid://t4vhpibk2yb5" path="res://sprites/neko.png" id="4_g0mja"]
[ext_resource type="PackedScene" uid="uid://q3wdnawp7n63" path="res://games/platformer/lab_platform.tscn" id="4_w58m1"]
[ext_resource type="Script" uid="uid://43jxroyergh0" path="res://games/platformer/platformerCam.gd" id="5_x2rtd"]
[ext_resource type="Texture2D" uid="uid://dyjxtuapxfiip" path="res://sprites/box.png" id="6_02uuf"]
[ext_resource type="PackedScene" uid="uid://bgpoql6pt8pph" path="res://games/platformer/event.tscn" id="8_gqvfi"]
[ext_resource type="Texture2D" uid="uid://b2girwlk6ijy5" path="res://sprites/bigRemote.png" id="10_cpnel"]
[ext_resource type="Script" uid="uid://bs0xmxrplimpf" path="res://games/platformer/trip_animation.gd" id="10_vuxiy"]
[ext_resource type="Texture2D" uid="uid://r71wb0u4bsxw" path="res://sprites/broken_tv_remote.png" id="11_vuxiy"]
[ext_resource type="Script" uid="uid://iqb36fx2bj38" path="res://games/platformer/animation_props.gd" id="12_4fc0x"]
[ext_resource type="Script" uid="uid://bl7sx7fl7ye4a" path="res://games/platformer/tv_remote.gd" id="13_7gl5q"]
[ext_resource type="PackedScene" uid="uid://dv4ex5tshavff" path="res://games/platformer/door.tscn" id="14_yphhh"]
[ext_resource type="Script" uid="uid://bnprbj4be8n7j" path="res://games/platformer/existWhenGaming.gd" id="16_g0mja"]
[ext_resource type="Texture2D" uid="uid://dwwqsaepieo3c" path="res://sprites/batteryEmpty.png" id="16_p7238"]
[ext_resource type="Texture2D" uid="uid://bvnudttaiaab5" path="res://sprites/platformer_lab_laser.png" id="16_wtveo"]
[ext_resource type="Texture2D" uid="uid://bm6lkjpvfdqn3" path="res://sprites/batteryFull.png" id="17_g0mja"]
[ext_resource type="Texture2D" uid="uid://dyfubdnvunea2" path="res://sprites/whiteSqaure.png" id="17_x1jr7"]
[ext_resource type="Script" uid="uid://bvldm4nv0g3" path="res://games/platformer/flasher.gd" id="18_x1jr7"]

[sub_resource type="Gradient" id="Gradient_1wj3w"]
offsets = PackedFloat32Array(0.0209205, 1)
colors = PackedColorArray(0.241156, 0.241156, 0.241156, 1, 0.462291, 0.462291, 0.462291, 1)

[sub_resource type="GradientTexture2D" id="GradientTexture2D_84mot"]
gradient = SubResource("Gradient_1wj3w")
width = 300
height = 180
fill_from = Vector2(1, 1)

[sub_resource type="AtlasTexture" id="AtlasTexture_4fc0x"]
atlas = ExtResource("4_g0mja")
region = Rect2(16, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_1i68h"]
atlas = ExtResource("4_g0mja")
region = Rect2(32, 16, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_ftlpv"]
atlas = ExtResource("4_g0mja")
region = Rect2(16, 48, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_7hkwn"]
atlas = ExtResource("4_g0mja")
region = Rect2(16, 32, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_pj7n8"]
atlas = ExtResource("4_g0mja")
region = Rect2(32, 32, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_3wy10"]
atlas = ExtResource("4_g0mja")
region = Rect2(48, 32, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_we8k4"]
atlas = ExtResource("4_g0mja")
region = Rect2(64, 32, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_i6xil"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_4fc0x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1i68h")
}],
"loop": true,
"name": &"idle",
"speed": 2.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ftlpv")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_7hkwn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pj7n8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3wy10")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_we8k4")
}],
"loop": true,
"name": &"run",
"speed": 5.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_oyf6i"]
size = Vector2(32, 32)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_02uuf"]
size = Vector2(32, 32)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_1wj3w"]
size = Vector2(608, 46)

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_w58m1"]
texture = ExtResource("3_84mot")
0:0/0 = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gqvfi"]
texture = ExtResource("4_86tx6")
0:0/0 = 0
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)

[sub_resource type="TileSet" id="TileSet_x2rtd"]
physics_layer_0/collision_layer = 1
sources/0 = SubResource("TileSetAtlasSource_w58m1")
sources/1 = SubResource("TileSetAtlasSource_gqvfi")

[sub_resource type="RectangleShape2D" id="RectangleShape2D_86tx6"]
size = Vector2(32, 32)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_7eu3u"]
size = Vector2(20, 150)

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

[sub_resource type="Animation" id="Animation_yphhh"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimationProps/TVRemote:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(40, 272)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AnimationProps/TVRemote:frame")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [1]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AnimationProps/TVRemote:rotation")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [0.0]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("AnimationProps/TVRemote:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}

[sub_resource type="Animation" id="Animation_7gl5q"]
resource_name = "trip"
length = 0.8
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimationProps/TVRemote:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.133333, 0.266667, 0.4, 0.533333, 0.666667),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1),
"update": 0,
"values": [Vector2(40, 272), Vector2(112, 208), Vector2(152, 184), Vector2(200, 208), Vector2(240, 248), Vector2(256.09, 281.105)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("AnimationProps/TVRemote:rotation")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 0.666667),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 18.8496]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AnimationProps/TVRemote:frame")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.666667),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [0, 1]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("AnimationProps/TVRemote:visible")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0, 0.0333333),
"transitions": PackedFloat32Array(1, 1),
"update": 1,
"values": [false, true]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_mauky"]
_data = {
&"RESET": SubResource("Animation_yphhh"),
&"trip": SubResource("Animation_7gl5q")
}

[sub_resource type="SpriteFrames" id="SpriteFrames_mwuuv"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("10_cpnel")
}, {
"duration": 1.0,
"texture": ExtResource("11_vuxiy")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

[sub_resource type="LabelSettings" id="LabelSettings_yphhh"]
font_size = 86
font_color = Color(1, 1, 1, 0.439216)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_gyyvr"]
size = Vector2(576, 64)

[node name="Platformer" type="Node" node_paths=PackedStringArray("score_label", "player", "skip_location", "timer", "warning_areas", "laser_areas", "lifebar")]
script = ExtResource("1_mauky")
score_label = NodePath("Score")
player = NodePath("Player")
skip_location = NodePath("IntroSkipLocation")
timer = NodePath("Timer")
warning_areas = [NodePath("Warnings/WarningNode"), NodePath("Warnings/WarningNode2"), NodePath("Warnings/WarningNode3")]
laser_areas = [NodePath("Lasers/LaserSet"), NodePath("Lasers/LaserSet2"), NodePath("Lasers/LaserSet3")]
lifebar = NodePath("Lifebar")

[node name="Parallax2D" type="Parallax2D" parent="."]
scroll_scale = Vector2(0, 0)

[node name="TextureRect" type="TextureRect" parent="Parallax2D"]
z_index = -6
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 320.0
offset_bottom = 180.0
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(2, 2)
texture = SubResource("GradientTexture2D_84mot")

[node name="Player" type="CharacterBody2D" parent="." node_paths=PackedStringArray("player_sprite")]
position = Vector2(-1552, -504)
script = ExtResource("1_1wj3w")
remote_sprite = ExtResource("2_7eu3u")
player_sprite = NodePath("Sprite2D")

[node name="Sprite2D" type="AnimatedSprite2D" parent="Player"]
scale = Vector2(2, 2)
sprite_frames = SubResource("SpriteFrames_i6xil")
animation = &"idle"

[node name="CollisionShape2D" type="CollisionShape2D" parent="Player"]
shape = SubResource("RectangleShape2D_oyf6i")

[node name="hitbox" type="Area2D" parent="Player"]

[node name="CollisionShape2D" type="CollisionShape2D" parent="Player/hitbox"]
shape = SubResource("RectangleShape2D_02uuf")
debug_color = Color(5.29438e-07, 0.629247, 0.48448, 0.42)

[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(319, 344)

[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("RectangleShape2D_1wj3w")

[node name="TileMapLayer" type="TileMapLayer" parent="."]
scale = Vector2(2, 2)
tile_map_data = PackedByteArray("[encoded data, 47284 characters]")
tile_set = SubResource("TileSet_x2rtd")

[node name="LabPlatformer" parent="." instance=ExtResource("4_w58m1")]
position = Vector2(128, 208)

[node name="LabPlatformer2" parent="." instance=ExtResource("4_w58m1")]
position = Vector2(512, 208)

[node name="LabPlatformer3" parent="." instance=ExtResource("4_w58m1")]
position = Vector2(400, 112)

[node name="LabPlatformer4" parent="." instance=ExtResource("4_w58m1")]
position = Vector2(240, 112)

[node name="Camera2D" type="Camera2D" parent="." node_paths=PackedStringArray("target")]
position = Vector2(-1552, -504)
position_smoothing_enabled = true
script = ExtResource("5_x2rtd")
target = NodePath("../Player")

[node name="Box" type="Area2D" parent="."]
position = Vector2(-624, 112)

[node name="Sprite2D" type="Sprite2D" parent="Box"]
texture = ExtResource("6_02uuf")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Box"]
shape = SubResource("RectangleShape2D_86tx6")

[node name="Event" parent="." instance=ExtResource("8_gqvfi")]
position = Vector2(-1552, -472)
text = "Aha, I've finally found a way in! Now time to find some treasure from this abandoned lab..."

[node name="Event2" parent="." instance=ExtResource("8_gqvfi")]
position = Vector2(-856, 240)
rotation = 1.57079
text = "Ooh that looks interesting..."

[node name="Zoomer" type="Area2D" parent="."]
position = Vector2(-368, 208)

[node name="CollisionShape2D" type="CollisionShape2D" parent="Zoomer"]
shape = SubResource("RectangleShape2D_7eu3u")

[node name="TheBitWhereYouTrip" type="Area2D" parent="."]
position = Vector2(32, 248)

[node name="CollisionShape2D" type="CollisionShape2D" parent="TheBitWhereYouTrip"]
shape = SubResource("RectangleShape2D_7eu3u")

[node name="BrokenRemote" type="Area2D" parent="."]
position = Vector2(256, 280)

[node name="CollisionShape2D" type="CollisionShape2D" parent="BrokenRemote"]
shape = SubResource("RectangleShape2D_cpnel")

[node name="TripAnimation" type="AnimationPlayer" parent="." node_paths=PackedStringArray("tv_remote")]
libraries = {
&"": SubResource("AnimationLibrary_mauky")
}
script = ExtResource("10_vuxiy")
tv_remote = NodePath("../AnimationProps/TVRemote")

[node name="AnimationProps" type="Node2D" parent="."]
visible = false
script = ExtResource("12_4fc0x")

[node name="TVRemote" type="AnimatedSprite2D" parent="AnimationProps"]
visible = false
position = Vector2(40, 272)
scale = Vector2(0.1, 0.1)
sprite_frames = SubResource("SpriteFrames_mwuuv")
frame = 1
script = ExtResource("13_7gl5q")

[node name="Door" parent="." instance=ExtResource("14_yphhh")]
position = Vector2(16, 152)
open_pos_y = 152.0
close_pos_y = 240.0
move_speed = 1000.0

[node name="Door2" parent="." instance=ExtResource("14_yphhh")]
position = Vector2(624, 152)
open_pos_y = 152.0
close_pos_y = 240.0
open = false
move_speed = 1000.0

[node name="Score" type="Label" parent="."]
z_index = -1
offset_left = 208.0
offset_top = 176.0
offset_right = 432.0
offset_bottom = 295.0
text = "0"
label_settings = SubResource("LabelSettings_yphhh")
horizontal_alignment = 1
script = ExtResource("16_g0mja")

[node name="Lifebar" type="TextureProgressBar" parent="."]
modulate = Color(1, 1, 1, 0.678431)
z_index = -1
offset_left = 248.0
offset_top = 144.0
offset_right = 296.0
offset_bottom = 160.0
scale = Vector2(3, 3)
max_value = 3.0
value = 3.0
texture_under = ExtResource("16_p7238")
texture_progress = ExtResource("17_g0mja")
script = ExtResource("16_g0mja")

[node name="IntroSkipLocation" type="Marker2D" parent="."]
position = Vector2(-40, 256)

[node name="Timer" type="Timer" parent="."]

[node name="Lasers" type="Node2D" parent="."]

[node name="LaserSet" type="Area2D" parent="Lasers"]
visible = false
position = Vector2(40, 40)

[node name="Sprite2D" type="Sprite2D" parent="Lasers/LaserSet"]
position = Vector2(280, 8)
rotation = 1.57079
scale = Vector2(2.003, 36)
texture = ExtResource("16_wtveo")

[node name="Sprite2D2" type="Sprite2D" parent="Lasers/LaserSet"]
position = Vector2(280, 40)
rotation = 1.57079
scale = Vector2(2.003, 36)
texture = ExtResource("16_wtveo")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Lasers/LaserSet"]
position = Vector2(280, 24)
shape = SubResource("RectangleShape2D_gyyvr")
debug_color = Color(0.977603, 0, 0.402823, 0.42)

[node name="LaserSet2" type="Area2D" parent="Lasers"]
visible = false
position = Vector2(40, 136)

[node name="Sprite2D" type="Sprite2D" parent="Lasers/LaserSet2"]
position = Vector2(280, 8)
rotation = 1.57079
scale = Vector2(2.003, 36)
texture = ExtResource("16_wtveo")

[node name="Sprite2D2" type="Sprite2D" parent="Lasers/LaserSet2"]
position = Vector2(280, 40)
rotation = 1.57079
scale = Vector2(2.003, 36)
texture = ExtResource("16_wtveo")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Lasers/LaserSet2"]
position = Vector2(280, 24)
shape = SubResource("RectangleShape2D_gyyvr")
debug_color = Color(0.977603, 0, 0.402823, 0.42)

[node name="LaserSet3" type="Area2D" parent="Lasers"]
visible = false
position = Vector2(40, 232)

[node name="Sprite2D" type="Sprite2D" parent="Lasers/LaserSet3"]
position = Vector2(280, 8)
rotation = 1.57079
scale = Vector2(2.003, 36)
texture = ExtResource("16_wtveo")

[node name="Sprite2D2" type="Sprite2D" parent="Lasers/LaserSet3"]
position = Vector2(280, 40)
rotation = 1.57079
scale = Vector2(2.003, 36)
texture = ExtResource("16_wtveo")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Lasers/LaserSet3"]
position = Vector2(280, 24)
shape = SubResource("RectangleShape2D_gyyvr")
debug_color = Color(0.977603, 0, 0.402823, 0.42)

[node name="Warnings" type="Node2D" parent="."]

[node name="WarningNode" type="Node2D" parent="Warnings"]
visible = false
z_index = -1
position = Vector2(320, 64)

[node name="Sprite2D" type="Sprite2D" parent="Warnings/WarningNode"]
modulate = Color(1, 0, 0, 0.482353)
scale = Vector2(18, 2)
texture = ExtResource("17_x1jr7")
script = ExtResource("18_x1jr7")

[node name="WarningNode2" type="Node2D" parent="Warnings"]
visible = false
z_index = -1
position = Vector2(320, 160)

[node name="Sprite2D" type="Sprite2D" parent="Warnings/WarningNode2"]
modulate = Color(1, 0, 0, 0.482353)
scale = Vector2(18, 2)
texture = ExtResource("17_x1jr7")
script = ExtResource("18_x1jr7")

[node name="WarningNode3" type="Node2D" parent="Warnings"]
visible = false
z_index = -1
position = Vector2(320, 256)

[node name="Sprite2D" type="Sprite2D" parent="Warnings/WarningNode3"]
modulate = Color(1, 0, 0, 0.482353)
scale = Vector2(18, 2)
texture = ExtResource("17_x1jr7")
script = ExtResource("18_x1jr7")

[connection signal="area_entered" from="Player/hitbox" to="Player" method="_on_hitbox_area_entered"]
[connection signal="area_entered" from="TheBitWhereYouTrip" to="TripAnimation" method="_on_the_bit_where_you_trip_area_entered"]
[connection signal="area_entered" from="TheBitWhereYouTrip" to="AnimationProps" method="_on_the_bit_where_you_trip_area_entered"]
[connection signal="area_entered" from="BrokenRemote" to="AnimationProps/TVRemote" method="_on_broken_remote_area_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]
