-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matvey Sivachinski
authored and
Matvey Sivachinski
committed
Feb 5, 2024
1 parent
0e27737
commit c3de157
Showing
10 changed files
with
123 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extends Node2D | ||
|
||
func _on_quit_pressed(): | ||
get_tree().quit() | ||
|
||
func _on_restart_pressed(): | ||
get_tree().change_scene_to_file("res://prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://c8uokctk4c37g"] | ||
|
||
[ext_resource type="Script" path="res://Restart.gd" id="1_b05ab"] | ||
[ext_resource type="Texture2D" uid="uid://bauf77n1ppfno" path="res://background.png" id="2_yuasr"] | ||
|
||
[sub_resource type="SystemFont" id="SystemFont_vi34g"] | ||
|
||
[node name="MainMenu" type="Node2D"] | ||
script = ExtResource("1_b05ab") | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
position = Vector2(594, 325) | ||
scale = Vector2(0.662946, 0.632139) | ||
texture = ExtResource("2_yuasr") | ||
|
||
[node name="MarginContainer" type="MarginContainer" parent="."] | ||
offset_left = 464.0 | ||
offset_top = 210.0 | ||
offset_right = 802.0 | ||
offset_bottom = 455.0 | ||
|
||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] | ||
layout_mode = 2 | ||
alignment = 1 | ||
|
||
[node name="Restart" type="Button" parent="MarginContainer/VBoxContainer"] | ||
layout_mode = 2 | ||
theme_override_fonts/font = SubResource("SystemFont_vi34g") | ||
text = "Restart" | ||
|
||
[node name="Quit" type="Button" parent="MarginContainer/VBoxContainer"] | ||
layout_mode = 2 | ||
text = "Quit" | ||
|
||
[connection signal="pressed" from="MarginContainer/VBoxContainer/Restart" to="." method="_on_restart_pressed"] | ||
[connection signal="pressed" from="MarginContainer/VBoxContainer/Restart" to="." method="_on_play_pressed"] | ||
[connection signal="pressed" from="MarginContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extends Node2D | ||
|
||
var player | ||
# 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): | ||
player = get_node("Player1") | ||
if player: | ||
if player.global_position.y > 1000: | ||
player.queue_free() | ||
get_tree().change_scene_to_file("res://Restart.tscn") | ||
|
Oops, something went wrong.