Add build directory to .gitignore, create export presets for Web and Windows Desktop, adjust z-index and mouse filter in level_1.tscn, add update_game_state function in level.gd, change main_scene path in project.godot, set rendering method to "gl_compatibility", add LevelSelect and related nodes in main_menu.tscn, create scene_manager.tscn with MainMenu node, implement functionality for menu button selection in main_menu.gd.
This commit is contained in:
parent
ca4788ce6f
commit
b6cdb68b4e
21 changed files with 499 additions and 10 deletions
|
|
@ -4,9 +4,13 @@ extends Control
|
|||
@onready var drones_label = get_node("%DronesUsed")
|
||||
@onready var points_label = get_node("%TotalPoints")
|
||||
|
||||
@onready var main_menu_button = get_node("%MainMenu")
|
||||
|
||||
func _ready():
|
||||
visible = false
|
||||
|
||||
main_menu_button.connect("pressed", Callable(self, "on_main_menu_pressed"))
|
||||
|
||||
func _process(_delta):
|
||||
if GameState.level_complete == true:
|
||||
update_points()
|
||||
|
|
@ -15,4 +19,8 @@ func _process(_delta):
|
|||
func update_points():
|
||||
time_label.text = "Time Spent: " + Str.seconds_to_hms(GameState.level_timer)
|
||||
drones_label.text = "Drones Used: " + str(GameState.drones_used)
|
||||
points_label.text = "Total Points: " + Str.format_number(GameState.level_points)
|
||||
points_label.text = "Total Points: " + Str.format_number(GameState.level_points)
|
||||
|
||||
func on_main_menu_pressed():
|
||||
GameState.reset()
|
||||
SceneMgr.load_scene("MAINMENU")
|
||||
Loading…
Add table
Add a link
Reference in a new issue