[gd_scene load_steps=15 format=2] [ext_resource path="res://main.gd" type="Script" id=1] [ext_resource path="res://backgroubd.tscn" type="PackedScene" id=2] [ext_resource path="res://player.tscn" type="PackedScene" id=3] [ext_resource path="res://Music/portalen1 - 08.09.2019, 10.21.wav" type="AudioStream" id=4] [ext_resource path="res://Music.gd" type="Script" id=5] [ext_resource path="res://Music/Dripping Water.wav" type="AudioStream" id=6] [ext_resource path="res://spawner.tscn" type="PackedScene" id=7] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 526.378, 10 ) [sub_resource type="RectangleShape2D" id=2] extents = Vector2( 10, 320.544 ) [sub_resource type="Animation" id=3] resource_name = "Fade to black" length = 2.0 tracks/0/type = "value" tracks/0/path = NodePath("Control/Black:modulate") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 2 ), "transitions": PoolRealArray( 1, 1 ), "update": 0, "values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ] } tracks/1/type = "value" tracks/1/path = NodePath("Control/Restart:visible") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false tracks/1/enabled = true tracks/1/keys = { "times": PoolRealArray( 0, 2 ), "transitions": PoolRealArray( 1, 1 ), "update": 1, "values": [ false, true ] } tracks/2/type = "value" tracks/2/path = NodePath("Control/Credits:visible") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/imported = false tracks/2/enabled = true tracks/2/keys = { "times": PoolRealArray( 0, 2 ), "transitions": PoolRealArray( 1, 1 ), "update": 1, "values": [ false, true ] } [sub_resource type="GDScript" id=4] script/source = "extends Control # Declare member variables here. Examples: # var a = 2 # var b = \"text\" # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass func _on_Restart_pressed(): get_tree().change_scene(\"res://main.tscn\") func _on_Player__on_visibilty_exit(): get_node(\"../animations\").play(\"Fade to black\") " [sub_resource type="Gradient" id=5] colors = PoolColorArray( 0, 0, 0, 1, 0, 0, 0, 1 ) [sub_resource type="GradientTexture" id=6] gradient = SubResource( 5 ) width = 1 [sub_resource type="GDScript" id=7] script/source = "extends Button # Declare member variables here. Examples: # var a = 2 # var b = \"text\" # Called when the node enters the scene tree for the first time. func _ready(): pass # Replace with function body. # Called every frame. 'delta' is the elapsed time since the previous frame. #func _process(delta): # pass func _on_Credits_pressed(): get_tree().change_scene(\"res://Credits.tscn\") " [node name="Node2D" type="Node2D"] script = ExtResource( 1 ) [node name="bg" parent="." instance=ExtResource( 2 )] [node name="Player" parent="." instance=ExtResource( 3 )] position = Vector2( 299, 300 ) [node name="Limits" type="Node2D" parent="."] editor/display_folded = true [node name="Roof" type="StaticBody2D" parent="Limits"] position = Vector2( 4.28688, -2.57212 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Limits/Roof"] position = Vector2( 509.253, -4.68107 ) shape = SubResource( 1 ) [node name="Floor" type="StaticBody2D" parent="Limits"] position = Vector2( 4.28688, -2.57212 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Limits/Floor"] position = Vector2( 503.734, 604.869 ) shape = SubResource( 1 ) [node name="L_Wall" type="StaticBody2D" parent="Limits"] position = Vector2( 4.28688, -2.57212 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Limits/L_Wall"] position = Vector2( -15.3186, 303.243 ) shape = SubResource( 2 ) [node name="R_Wall" type="StaticBody2D" parent="Limits"] position = Vector2( 4.28688, -2.57212 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="Limits/R_Wall"] position = Vector2( 1036.27, 300.623 ) shape = SubResource( 2 ) [node name="Music" type="AudioStreamPlayer" parent="."] stream = ExtResource( 4 ) autoplay = true bus = "Music" script = ExtResource( 5 ) [node name="Effects" type="AudioStreamPlayer" parent="."] stream = ExtResource( 6 ) bus = "Effects" [node name="Timer" type="Timer" parent="."] wait_time = 8.0 one_shot = true [node name="Spawner" parent="." instance=ExtResource( 7 )] position = Vector2( 1062.29, 0 ) [node name="animations" type="AnimationPlayer" parent="."] "anims/Fade to black" = SubResource( 3 ) [node name="Control" type="Control" parent="."] margin_left = 321.81 margin_top = 248.75 margin_right = 362.21 margin_bottom = 288.75 script = SubResource( 4 ) [node name="Black" type="Sprite" parent="Control"] modulate = Color( 1, 1, 1, 0 ) position = Vector2( -498.902, -268.086 ) scale = Vector2( 1.19103, 1.21131 ) texture = SubResource( 6 ) centered = false region_enabled = true region_rect = Rect2( 0, 0, 1026.28, 601.39 ) [node name="Restart" type="Button" parent="Control"] visible = false margin_left = 87.0656 margin_top = 4.13315 margin_right = 295.066 margin_bottom = 53.1331 text = "Restart" [node name="Credits" type="Button" parent="Control"] visible = false margin_left = 86.4808 margin_top = 95.472 margin_right = 294.481 margin_bottom = 144.472 text = "Credits" script = SubResource( 7 ) [connection signal="_on_death" from="Player" to="Music" method="_on_Player__on_death"] [connection signal="_on_visibilty_exit" from="Player" to="Music" method="_play_death_music"] [connection signal="_on_visibilty_exit" from="Player" to="Control" method="_on_Player__on_visibilty_exit"] [connection signal="finished" from="Music" to="Music" method="_on_Music_finished"] [connection signal="collide" from="Spawner" to="Player" method="_on_collide"] [connection signal="pressed" from="Control/Restart" to="Control" method="_on_Restart_pressed"] [connection signal="pressed" from="Control/Credits" to="Control/Credits" method="_on_Credits_pressed"]