wild jam prototype

This commit is contained in:
2024-02-24 08:35:47 -06:00
parent e6d1f5a8df
commit bd0e9e21cd
28 changed files with 606 additions and 19 deletions

19
scripts/main_menu.gd Normal file
View File

@@ -0,0 +1,19 @@
extends Control
class_name MainMenu
var mazes = ["res://scene/maze_1.tscn"]
@onready var win_loss_label: Label = $HBoxContainer/MarginContainer/VBoxContainer/WinLossLabel
func _on_quit_button_pressed() -> void:
get_tree().quit()
func _on_play_button_pressed() -> void:
get_tree().change_scene_to_file(mazes.pick_random())
func _ready() -> void:
if not HasWon.inital_load:
var won_text = ["YOU WON!!!" if HasWon.won else "You Lost..."]
won_text.append_array(HasWon.escaped.values())
win_loss_label.text = "%s Escaped counts: %s Red, %s Green, %s Blue" % won_text