[gd_scene load_steps=24 format=3 uid="uid://dhn7yt46fyac8"] [ext_resource type="PackedScene" uid="uid://bhulqhxesd5gc" path="res://prefabs/player.tscn" id="1_65a7v"] [ext_resource type="AudioStream" uid="uid://bsy2d0bl3lgg0" path="res://sounds/crank.ogg" id="1_cweq4"] [ext_resource type="Script" path="res://scripts/GameManager.cs" id="1_ij566"] [ext_resource type="Texture2D" uid="uid://dlbl6d4yghvht" path="res://sprites/mask.png" id="3_8o315"] [ext_resource type="Script" path="res://scripts/Flashlight.cs" id="3_cylxo"] [ext_resource type="PackedScene" uid="uid://bdtjnmjopi5h2" path="res://prefabs/play_zone.tscn" id="4_5sggf"] [ext_resource type="Material" uid="uid://xuvxq5hy1dt" path="res://shaders/light_shader_material.tres" id="4_ro05e"] [ext_resource type="Shader" path="res://shaders/dithering.gdshader" id="5_64d71"] [ext_resource type="PackedScene" uid="uid://cn0rwyjern2vx" path="res://scenes/level.tscn" id="5_skctj"] [ext_resource type="Script" path="res://scripts/GameCamera.cs" id="6_quua3"] [ext_resource type="Script" path="res://scripts/PointLight2DWorkaround.cs" id="6_slohe"] [ext_resource type="PackedScene" uid="uid://4d6fhm87mn55" path="res://prefabs/virtual_cursor.tscn" id="11_xqdcm"] [ext_resource type="Script" path="res://scripts/WinScreen.cs" id="13_prax6"] [ext_resource type="Theme" uid="uid://daxgxg7c8v0ih" path="res://themes/zx_theme.tres" id="14_g1c0r"] [ext_resource type="Script" path="res://scripts/DeathScreen.cs" id="15_12mhe"] [sub_resource type="Curve" id="Curve_o5byr"] _data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0] point_count = 2 [sub_resource type="ShaderMaterial" id="ShaderMaterial_m680d"] shader = ExtResource("5_64d71") [sub_resource type="ViewportTexture" id="ViewportTexture_meb87"] viewport_path = NodePath("FlashlightViewport") [sub_resource type="CircleShape2D" id="CircleShape2D_prnh4"] radius = 16.0 [sub_resource type="CircleShape2D" id="CircleShape2D_qcayn"] [sub_resource type="ViewportTexture" id="ViewportTexture_nnmvo"] viewport_path = NodePath("FlashlightViewport") [sub_resource type="Gradient" id="Gradient_cy0nu"] interpolation_mode = 1 offsets = PackedFloat32Array(0) colors = PackedColorArray(0, 0, 0, 1) [sub_resource type="GradientTexture2D" id="GradientTexture2D_2sbp3"] gradient = SubResource("Gradient_cy0nu") width = 256 height = 192 [node name="Root" type="Node2D"] y_sort_enabled = true [node name="VirtualCursor" parent="." instance=ExtResource("11_xqdcm")] position = Vector2(169.203, 958.57) [node name="GameManager" type="Node" parent="." node_paths=PackedStringArray("FirstZone", "Player")] script = ExtResource("1_ij566") FirstZone = NodePath("../Zones/PlayZone1") Player = NodePath("../Player") [node name="Sounds" type="Node" parent="."] [node name="CrankSound" type="AudioStreamPlayer" parent="Sounds"] stream = ExtResource("1_cweq4") [node name="FlashlightController" type="Node" parent="." node_paths=PackedStringArray("Player", "Camera", "Circle", "PlayerCircle", "Polygon", "CollisionCircle", "CollisionPlayerCircle", "CollisionPolygon", "FlashlightGroup", "CrankSoundPlayer")] script = ExtResource("3_cylxo") Player = NodePath("../Player") Camera = NodePath("../PlayerCamera") Circle = NodePath("../FlashlightViewport/CanvasGroup/Circle") PlayerCircle = NodePath("../FlashlightViewport/PlayerCircle") Polygon = NodePath("../FlashlightViewport/CanvasGroup/Triangle") CollisionCircle = NodePath("../PlayerCamera/FlashlightCollision/Circle") CollisionPlayerCircle = NodePath("../PlayerCamera/FlashlightCollision/PlayerCircle") CollisionPolygon = NodePath("../PlayerCamera/FlashlightCollision/CollisionPolygon2D") FlashlightGroup = NodePath("../FlashlightViewport/CanvasGroup") BrightnessCurve = SubResource("Curve_o5byr") CrankSoundPlayer = NodePath("../Sounds/CrankSound") [node name="Zones" type="Node" parent="."] [node name="PlayZone1" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(25, -1) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone1"] position = Vector2(9, 95) [node name="BR" type="Node2D" parent="Zones/PlayZone1"] position = Vector2(166, 256) [node name="PS" type="Node2D" parent="Zones/PlayZone1"] position = Vector2(55, 127) [node name="PlayZone2" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(33, 416) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone2"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone2"] position = Vector2(477, 94) [node name="PS" type="Node2D" parent="Zones/PlayZone2"] position = Vector2(48, 22) [node name="PlayZone3" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(609, 354) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone3"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone3"] position = Vector2(283, 187) [node name="PS" type="Node2D" parent="Zones/PlayZone3"] position = Vector2(23, 110) [node name="PlayZone4" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(997, -889) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone4"] position = Vector2(0, 4) [node name="BR" type="Node2D" parent="Zones/PlayZone4"] position = Vector2(1129, 1709) [node name="PS" type="Node2D" parent="Zones/PlayZone4"] position = Vector2(51, 1290) [node name="PlayZone5" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(608, -106) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone5"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone5"] position = Vector2(291, 238) [node name="PS" type="Node2D" parent="Zones/PlayZone5"] position = Vector2(143, 214) [node name="PlayZone6" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(605, -515) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone6"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone6"] position = Vector2(289, 224) [node name="PS" type="Node2D" parent="Zones/PlayZone6"] position = Vector2(153, 209) [node name="PlayZone7" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(610, -930) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone7"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone7"] position = Vector2(289, 224) [node name="PS" type="Node2D" parent="Zones/PlayZone7"] position = Vector2(153, 209) [node name="PlayZone8" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(-435, -1211) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone8"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone8"] position = Vector2(931, 1085) [node name="PS" type="Node2D" parent="Zones/PlayZone8"] position = Vector2(738, 1016) [node name="PlayZone9" parent="Zones" node_paths=PackedStringArray("TopLeftCorner", "BottomRightCorner", "PlayerSpawnPoint") instance=ExtResource("4_5sggf")] position = Vector2(449, 833) TopLeftCorner = NodePath("TL") BottomRightCorner = NodePath("BR") PlayerSpawnPoint = NodePath("PS") [node name="TL" type="Node2D" parent="Zones/PlayZone9"] position = Vector2(1, 0) [node name="BR" type="Node2D" parent="Zones/PlayZone9"] position = Vector2(413, 317) [node name="PS" type="Node2D" parent="Zones/PlayZone9"] position = Vector2(209, 304) [node name="Player" parent="." instance=ExtResource("1_65a7v")] position = Vector2(74, 147) [node name="level" parent="." instance=ExtResource("5_skctj")] [node name="FlashlightViewport" type="SubViewport" parent="."] disable_3d = true transparent_bg = true snap_2d_transforms_to_pixel = true snap_2d_vertices_to_pixel = true canvas_item_default_texture_filter = 0 size = Vector2i(256, 192) render_target_update_mode = 4 [node name="PlayerCircle" type="Sprite2D" parent="FlashlightViewport"] position = Vector2(13.61, 14.405) scale = Vector2(0.5, 0.5) texture = ExtResource("3_8o315") [node name="CanvasGroup" type="CanvasGroup" parent="FlashlightViewport"] material = SubResource("ShaderMaterial_m680d") [node name="Circle" type="Sprite2D" parent="FlashlightViewport/CanvasGroup"] texture = ExtResource("3_8o315") [node name="Triangle" type="Polygon2D" parent="FlashlightViewport/CanvasGroup"] polygon = PackedVector2Array(-21, -25, 31, 29, -42, 31) [node name="PlayerCamera" type="Camera2D" parent="." node_paths=PackedStringArray("Player", "Cursor")] script = ExtResource("6_quua3") Player = NodePath("../Player") CameraBounds = Vector2(30, 20) Cursor = NodePath("../VirtualCursor") [node name="PointLight2D" type="PointLight2D" parent="PlayerCamera" node_paths=PackedStringArray("LightViewport")] blend_mode = 2 range_item_cull_mask = 2 texture = SubResource("ViewportTexture_meb87") script = ExtResource("6_slohe") LightViewport = NodePath("../../FlashlightViewport") [node name="FlashlightCollision" type="Area2D" parent="PlayerCamera"] position = Vector2(-128, -96) collision_layer = 2 collision_mask = 2 monitoring = false [node name="PlayerCircle" type="CollisionShape2D" parent="PlayerCamera/FlashlightCollision"] shape = SubResource("CircleShape2D_prnh4") [node name="Circle" type="CollisionShape2D" parent="PlayerCamera/FlashlightCollision"] shape = SubResource("CircleShape2D_qcayn") [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlayerCamera/FlashlightCollision"] polygon = PackedVector2Array(0, 0, 0, 0, 0, 0) [node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="FlashlightUI" type="TextureRect" parent="CanvasLayer"] clip_children = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 texture = SubResource("ViewportTexture_nnmvo") [node name="InvertRect" type="ColorRect" parent="CanvasLayer/FlashlightUI"] material = ExtResource("4_ro05e") layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 [node name="DeathScreen" type="TextureRect" parent="CanvasLayer" node_paths=PackedStringArray("Camera")] visible = false z_index = 10 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 texture = SubResource("GradientTexture2D_2sbp3") script = ExtResource("15_12mhe") Camera = NodePath("../../PlayerCamera") [node name="Timer" type="Timer" parent="CanvasLayer/DeathScreen"] wait_time = 3.0 [node name="PlayerSprite" type="TextureRect" parent="CanvasLayer/DeathScreen"] layout_mode = 0 [node name="MonsterSprite" type="TextureRect" parent="CanvasLayer/DeathScreen"] layout_mode = 0 [node name="WinScreen" type="TextureRect" parent="CanvasLayer" node_paths=PackedStringArray("Manager", "TextLabel")] visible = false z_index = 15 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 texture = SubResource("GradientTexture2D_2sbp3") script = ExtResource("13_prax6") Manager = NodePath("../../GameManager") TextLabel = NodePath("Label2") [node name="Label" type="Label" parent="CanvasLayer/WinScreen"] layout_mode = 1 anchors_preset = 10 anchor_right = 1.0 offset_bottom = 81.0 grow_horizontal = 2 theme = ExtResource("14_g1c0r") theme_override_font_sizes/font_size = 20 text = "CONGRATULATIONS!" horizontal_alignment = 1 vertical_alignment = 1 [node name="Label2" type="Label" parent="CanvasLayer/WinScreen"] layout_mode = 1 anchors_preset = 14 anchor_top = 0.5 anchor_right = 1.0 anchor_bottom = 0.5 offset_top = -11.5 offset_bottom = 11.5 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("14_g1c0r") text = "It took you {} attempts and {} to finish the game." horizontal_alignment = 1 vertical_alignment = 1 [node name="Label3" type="Label" parent="CanvasLayer/WinScreen"] layout_mode = 1 anchors_preset = 12 anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 offset_top = -52.0 grow_horizontal = 2 grow_vertical = 0 theme = ExtResource("14_g1c0r") text = "Thank you for playing! :)" horizontal_alignment = 1 vertical_alignment = 1 [connection signal="GameOver" from="GameManager" to="CanvasLayer/WinScreen" method="Open"] [connection signal="ZoneEntered" from="Zones/PlayZone1" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone2" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone3" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone4" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone5" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone6" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone7" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone8" to="GameManager" method="SetCurrentZone"] [connection signal="ZoneEntered" from="Zones/PlayZone9" to="GameManager" method="SetCurrentZone"] [connection signal="Killed" from="Player" to="GameManager" method="OnPlayerDied"] [connection signal="BossKilled" from="level" to="GameManager" method="EndGame"] [connection signal="timeout" from="CanvasLayer/DeathScreen/Timer" to="CanvasLayer/DeathScreen" method="Timeout"]