feat: Implement the new Stop N Go game mode with dedicated managers, models, and UI.
This commit is contained in:
@@ -70,6 +70,8 @@ func _update_camera_target():
|
||||
|
||||
if LobbyManager.game_mode == "Stop n Go":
|
||||
_update_stop_n_go_camera(current_row, current_col)
|
||||
elif LobbyManager.game_mode == "Tekton Doors":
|
||||
_update_tekton_doors_camera()
|
||||
else:
|
||||
_update_freemode_camera(current_row, current_col)
|
||||
|
||||
@@ -122,6 +124,12 @@ func _update_stop_n_go_camera(current_row: int, current_col: int):
|
||||
|
||||
_apply_camera_tween(Vector3(target_x, target_y, target_z))
|
||||
|
||||
func _update_tekton_doors_camera():
|
||||
# --- TEKTON DOORS: Static Overlook ---
|
||||
# Grid is 14x14, center is approx (7, 7)
|
||||
# User requested position: Vector3(7.0, 31.0, 25.5)
|
||||
_apply_camera_tween(Vector3(7.0, 32.3, 25.8))
|
||||
|
||||
func _update_freemode_camera(current_row: int, current_col: int):
|
||||
# --- FREEMODE: 3x3 Grid ---
|
||||
# Zone thresholds 4, 9
|
||||
|
||||
@@ -90,22 +90,22 @@ func handle_unhandled_input(event):
|
||||
if event is InputEventKey and event.pressed and not event.echo:
|
||||
match event.keycode:
|
||||
KEY_KP_1, KEY_1, KEY_KP_2, KEY_2, KEY_KP_3, KEY_3, KEY_KP_4, KEY_4:
|
||||
var is_sng = LobbyManager.game_mode == "Stop n Go"
|
||||
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
|
||||
match event.keycode:
|
||||
KEY_KP_1, KEY_1:
|
||||
player.activate_powerup(0) # FASTER_SPEED
|
||||
KEY_KP_2, KEY_2:
|
||||
if is_sng:
|
||||
player.activate_powerup(1) # AREA_FREEZE (StopNGo)
|
||||
if is_restricted:
|
||||
player.activate_powerup(1) # AREA_FREEZE (Restricted)
|
||||
else:
|
||||
player.activate_powerup(2) # BLOCK_FLOOR (Free)
|
||||
KEY_KP_3, KEY_3:
|
||||
if is_sng:
|
||||
player.activate_powerup(3) # INVISIBLE_MODE (StopNGo)
|
||||
if is_restricted:
|
||||
player.activate_powerup(3) # INVISIBLE_MODE (Restricted)
|
||||
else:
|
||||
player.activate_powerup(1) # AREA_FREEZE (Free)
|
||||
KEY_KP_4, KEY_4:
|
||||
if not is_sng:
|
||||
if not is_restricted:
|
||||
player.activate_powerup(3) # INVISIBLE_MODE (Free)
|
||||
# KEY_R:
|
||||
# player.auto_put_item()
|
||||
|
||||
@@ -461,8 +461,9 @@ func spawn_powerups_around(center: Vector2i, force_powerups: bool = true):
|
||||
if rng.randf() < 0.7:
|
||||
item_id = rng.randi_range(7, 10)
|
||||
else:
|
||||
# 30% Chance for PowerUp (Exclude Wall 13 only in Stop n Go)
|
||||
if LobbyManager.game_mode == "Stop n Go":
|
||||
# 30% Chance for PowerUp (Speed 11, Freeze 12, Ghost 14 - Exclude Wall 13 in restricted modes)
|
||||
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
|
||||
if is_restricted:
|
||||
item_id = [11, 12, 14].pick_random()
|
||||
else:
|
||||
item_id = rng.randi_range(11, 14)
|
||||
|
||||
@@ -11,7 +11,7 @@ enum Phase {GO, STOP}
|
||||
|
||||
const GO_DURATION: float = 8.0
|
||||
const STOP_DURATION: float = 4.0
|
||||
const REQUIRED_GOALS: int = 1
|
||||
const REQUIRED_GOALS: int = 8
|
||||
|
||||
var current_phase: Phase = Phase.GO
|
||||
var phase_timer: float = GO_DURATION
|
||||
|
||||
Reference in New Issue
Block a user