Compare commits
2 Commits
80f2860ba1
...
de01511619
| Author | SHA1 | Date | |
|---|---|---|---|
| de01511619 | |||
| aae15b0b50 |
@@ -5,6 +5,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://jynlgkm41y8d" path="res://Levels/space_move.tscn" id="3_lquwl"]
|
||||
[ext_resource type="PackedScene" uid="uid://caj5t8q1fii5m" path="res://Levels/pid_test.tscn" id="4_7mycd"]
|
||||
[ext_resource type="PackedScene" uid="uid://cycayd4l7k7s4" path="res://Levels/Recuration.tscn" id="5_lquwl"]
|
||||
[ext_resource type="Script" uid="uid://lh1hhx4q8nlu" path="res://quit_game_component.gd" id="6_7mycd"]
|
||||
|
||||
[node name="Main" type="Control" unique_id=834120395]
|
||||
layout_mode = 3
|
||||
@@ -62,3 +63,11 @@ text = "Recuration"
|
||||
script = ExtResource("1_ig7tw")
|
||||
level = ExtResource("5_lquwl")
|
||||
metadata/_custom_type_script = "uid://bel5yfuiqithe"
|
||||
|
||||
[node name="Button5" type="Button" parent="VBoxContainer" unique_id=630288499]
|
||||
layout_mode = 2
|
||||
text = "Exit Experements"
|
||||
|
||||
[node name="QuitGame" type="Node" parent="VBoxContainer/Button5" unique_id=1111277542]
|
||||
script = ExtResource("6_7mycd")
|
||||
metadata/_custom_type_script = "uid://lh1hhx4q8nlu"
|
||||
|
||||
14
quit_game_component.gd
Normal file
14
quit_game_component.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends Node
|
||||
|
||||
class_name QuitGame
|
||||
|
||||
@onready var button: Button = get_parent() as Button
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
button.pressed.connect(_on_button_pressed)
|
||||
button.name = button.text
|
||||
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
get_tree().quit(0)
|
||||
1
quit_game_component.gd.uid
Normal file
1
quit_game_component.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://lh1hhx4q8nlu
|
||||
Reference in New Issue
Block a user