add game scene
This commit is contained in:
12
scenes/game.gd
Normal file
12
scenes/game.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Node
|
||||
|
||||
@onready var back_button: Button = $BackButtonContainer/BackButton
|
||||
|
||||
func _ready() -> void:
|
||||
if not back_button.pressed.is_connected(_on_back_button_pressed):
|
||||
back_button.pressed.connect(_on_back_button_pressed)
|
||||
|
||||
func _on_back_button_pressed() -> void:
|
||||
AudioManager.play_ui_click()
|
||||
GameManager.save_game()
|
||||
GameManager.exit_to_main_menu()
|
||||
1
scenes/game.gd.uid
Normal file
1
scenes/game.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bvtr6yhlyuv4v
|
||||
17
scenes/game.tscn
Normal file
17
scenes/game.tscn
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dmwkyeq2l7u04"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvtr6yhlyuv4v" path="res://scenes/game.gd" id="1_uwrxv"]
|
||||
|
||||
[node name="Game" type="Node"]
|
||||
script = ExtResource("1_uwrxv")
|
||||
|
||||
[node name="BackButtonContainer" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="BackButton" type="Button" parent="BackButtonContainer"]
|
||||
offset_right = 45.0
|
||||
offset_bottom = 31.0
|
||||
text = "back"
|
||||
Reference in New Issue
Block a user