Files
GGJ26/scenes/managers/game_manager.gd
minimata 6640ccace8
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 7s
Create tag and build when new code gets to main / Export (push) Successful in 1m11s
basic game manager
2026-01-31 11:48:13 +01:00

56 lines
1.5 KiB
GDScript

@tool
extends Node
class_name GameManager
@export_category("Complete rosters")
@export var character_roster: Array[CharacterResource]
@export var mask_roster: Array[MaskResource]
@export_category("Predetermined levels")
@export_group("Level 1")
@export var lvl1_guest_1: MaskedChara
@export var lvl1_guest_2: MaskedChara
@export_group("Level 2")
@export var lvl2_guest_1: MaskedChara
@export var lvl2_guest_2: MaskedChara
@export_category("Random levels")
@export var max_roster_size: int = 3;
@export_tool_button("Create chara roster") var create_roster_action = create_new_roster
var current_chara_roster: Array[MaskedChara]
enum GameState {
READY,
GUEST_REVIEW,
FINISHED
}
enum Levels {
LVL1,
LVL2,
RANDOM
}
var current_game_state = GameState.READY
var current_level = Levels.LVL1
func create_new_roster() -> void:
print("Create new roster")
var already_picked_charas: Array[String] = []
for i in range(max_roster_size):
var chara: CharacterResource = character_roster.pick_random()
var mask: MaskResource = mask_roster.pick_random()
var all_masks: Array[MaskResource] = [mask]
var masked_chara = MaskedChara.new(chara, all_masks)
current_chara_roster.append(masked_chara)
print("Added %s to roster" % chara.name)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass