Files
tekton/scripts/game_mode.gd
T
god 528e22875d rename gauntlet→candy_survival + rewrite Candy Survival per boss design
- Rename enum GAUNTLET→CANDY_SURVIVAL, all gauntlet_*→candy_survival_*
- Rename files: gauntlet_manager→candy_survival_manager, candy_cannon→candy_survival_npc, gauntlet.tscn→candy_survival.tscn
- Rewrite candy_survival_manager.gd: blueprints, candy stack, Mekton delivery, Sugar Rush, knock/ghost charges, sticky-as-wall
- Update player_movement_manager.gd: smack→knock system, ghost integration
- All Candy Survival issues (#54-57, #65-70) retitled per boss design
- Shared managers (goals_cycle, goal, player_race, playerboard, turn) untouched
2026-07-06 01:28:39 +08:00

32 lines
740 B
GDScript

extends RefCounted
class_name GameMode
enum Mode { FREEMODE = 0, STOP_N_GO = 1, CANDY_SURVIVAL = 2 }
static func from_string(mode: String) -> Mode:
match mode:
"Freemode":
return Mode.FREEMODE
"Stop n Go":
return Mode.STOP_N_GO
"Candy Survival":
return Mode.CANDY_SURVIVAL
return Mode.FREEMODE
static func mode_to_string(mode: Mode) -> String:
match mode:
Mode.FREEMODE:
return "Freemode"
Mode.STOP_N_GO:
return "Stop n Go"
Mode.CANDY_SURVIVAL:
return "Candy Survival"
_:
return "Freemode"
static func is_restricted(mode: Mode) -> bool:
return mode == Mode.STOP_N_GO or mode == Mode.CANDY_SURVIVAL
static func get_all_modes() -> Array[String]:
return ["Freemode", "Stop n Go", "Candy Survival"]