Split Color Game into digit and color modes with up to 16 pods.
Add menu entries for both variants, use eight high-contrast colors with allowed duplicates, and turn wrong-guess pods off after a red blink until the next round. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+15
-2
@@ -5,11 +5,13 @@ const CONFIG_SCENE := "res://scenes/config.tscn"
|
||||
const PONG_SCENE := "res://scenes/pong.tscn"
|
||||
const COLOR_GAME_SCENE := "res://scenes/color_game.tscn"
|
||||
const SPACE_SHOOTER_SCENE := "res://scenes/space_shooter.tscn"
|
||||
const ColorGameScript = preload("res://scripts/color_game.gd")
|
||||
|
||||
@onready var demo_button: Button = $CenterBox/DemoButton
|
||||
@onready var config_button: Button = $CenterBox/ConfigButton
|
||||
@onready var pong_button: Button = $CenterBox/PongButton
|
||||
@onready var color_game_button: Button = $CenterBox/ColorGameButton
|
||||
@onready var digits_game_button: Button = $CenterBox/DigitsGameButton
|
||||
@onready var colors_game_button: Button = $CenterBox/ColorsGameButton
|
||||
@onready var space_shooter_button: Button = $CenterBox/SpaceShooterButton
|
||||
@onready var exit_button: Button = $CenterBox/ExitButton
|
||||
|
||||
@@ -18,11 +20,22 @@ func _ready() -> void:
|
||||
demo_button.pressed.connect(func(): _open_scene(DEMO_SCENE))
|
||||
config_button.pressed.connect(func(): _open_scene(CONFIG_SCENE))
|
||||
pong_button.pressed.connect(func(): _open_scene(PONG_SCENE))
|
||||
color_game_button.pressed.connect(func(): _open_scene(COLOR_GAME_SCENE))
|
||||
digits_game_button.pressed.connect(_open_digits_game)
|
||||
colors_game_button.pressed.connect(_open_colors_game)
|
||||
space_shooter_button.pressed.connect(func(): _open_scene(SPACE_SHOOTER_SCENE))
|
||||
exit_button.pressed.connect(_exit_game)
|
||||
|
||||
|
||||
func _open_digits_game() -> void:
|
||||
ColorGameScript.start_mode = ColorGameScript.GameMode.DIGITS
|
||||
_open_scene(COLOR_GAME_SCENE)
|
||||
|
||||
|
||||
func _open_colors_game() -> void:
|
||||
ColorGameScript.start_mode = ColorGameScript.GameMode.COLORS
|
||||
_open_scene(COLOR_GAME_SCENE)
|
||||
|
||||
|
||||
func _open_scene(path: String) -> void:
|
||||
get_tree().change_scene_to_file(path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user