feat: introduce Stop N Go game mode with phase management, dynamic arena setup, and goal tracking.
This commit is contained in:
@@ -93,7 +93,7 @@ func _process(delta):
|
||||
# Global Match Control
|
||||
# =============================================================================
|
||||
|
||||
func start_match(duration_seconds: float):
|
||||
func start_match(duration_seconds: float, start_cycles: bool = true):
|
||||
"""Start the global match timer. Called by server when game starts."""
|
||||
match_duration = duration_seconds
|
||||
global_match_timer = duration_seconds
|
||||
@@ -103,8 +103,9 @@ func start_match(duration_seconds: float):
|
||||
|
||||
if multiplayer.is_server():
|
||||
rpc("sync_match_start", duration_seconds)
|
||||
# Also start the first cycle
|
||||
start_cycle()
|
||||
# Only start the first cycle if requested
|
||||
if start_cycles:
|
||||
start_cycle()
|
||||
|
||||
func _on_match_end():
|
||||
"""Called when global match timer reaches zero - game over!"""
|
||||
|
||||
@@ -9,8 +9,8 @@ signal player_penalized(player_id: int)
|
||||
|
||||
enum Phase {GO, STOP}
|
||||
|
||||
const GO_DURATION: float = 12.0
|
||||
const STOP_DURATION: float = 6.0
|
||||
const GO_DURATION: float = 8.0
|
||||
const STOP_DURATION: float = 4.0
|
||||
const REQUIRED_GOALS: int = 2
|
||||
|
||||
var current_phase: Phase = Phase.GO
|
||||
|
||||
Reference in New Issue
Block a user