feat: Implement the new Stop N Go game mode with dedicated managers, models, and UI.
This commit is contained in:
+1
-1
@@ -106,7 +106,7 @@ current = true
|
|||||||
fov = 35.5
|
fov = 35.5
|
||||||
|
|
||||||
[node name="Camera3D200" type="Camera3D" parent="." unique_id=1763366951]
|
[node name="Camera3D200" type="Camera3D" parent="." unique_id=1763366951]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.5077037, 0.86153173, 0, -0.86153173, 0.5077037, 9, 19.636, 22.5)
|
transform = Transform3D(1, 0, 0, 0, 0.5077037, 0.86153173, 0, -0.86153173, 0.5077037, 7, 32.3, 25.8)
|
||||||
environment = ExtResource("4_ky38j")
|
environment = ExtResource("4_ky38j")
|
||||||
current = true
|
current = true
|
||||||
fov = 21.0
|
fov = 21.0
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ func _update_camera_target():
|
|||||||
|
|
||||||
if LobbyManager.game_mode == "Stop n Go":
|
if LobbyManager.game_mode == "Stop n Go":
|
||||||
_update_stop_n_go_camera(current_row, current_col)
|
_update_stop_n_go_camera(current_row, current_col)
|
||||||
|
elif LobbyManager.game_mode == "Tekton Doors":
|
||||||
|
_update_tekton_doors_camera()
|
||||||
else:
|
else:
|
||||||
_update_freemode_camera(current_row, current_col)
|
_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))
|
_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):
|
func _update_freemode_camera(current_row: int, current_col: int):
|
||||||
# --- FREEMODE: 3x3 Grid ---
|
# --- FREEMODE: 3x3 Grid ---
|
||||||
# Zone thresholds 4, 9
|
# Zone thresholds 4, 9
|
||||||
|
|||||||
@@ -90,22 +90,22 @@ func handle_unhandled_input(event):
|
|||||||
if event is InputEventKey and event.pressed and not event.echo:
|
if event is InputEventKey and event.pressed and not event.echo:
|
||||||
match event.keycode:
|
match event.keycode:
|
||||||
KEY_KP_1, KEY_1, KEY_KP_2, KEY_2, KEY_KP_3, KEY_3, KEY_KP_4, KEY_4:
|
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:
|
match event.keycode:
|
||||||
KEY_KP_1, KEY_1:
|
KEY_KP_1, KEY_1:
|
||||||
player.activate_powerup(0) # FASTER_SPEED
|
player.activate_powerup(0) # FASTER_SPEED
|
||||||
KEY_KP_2, KEY_2:
|
KEY_KP_2, KEY_2:
|
||||||
if is_sng:
|
if is_restricted:
|
||||||
player.activate_powerup(1) # AREA_FREEZE (StopNGo)
|
player.activate_powerup(1) # AREA_FREEZE (Restricted)
|
||||||
else:
|
else:
|
||||||
player.activate_powerup(2) # BLOCK_FLOOR (Free)
|
player.activate_powerup(2) # BLOCK_FLOOR (Free)
|
||||||
KEY_KP_3, KEY_3:
|
KEY_KP_3, KEY_3:
|
||||||
if is_sng:
|
if is_restricted:
|
||||||
player.activate_powerup(3) # INVISIBLE_MODE (StopNGo)
|
player.activate_powerup(3) # INVISIBLE_MODE (Restricted)
|
||||||
else:
|
else:
|
||||||
player.activate_powerup(1) # AREA_FREEZE (Free)
|
player.activate_powerup(1) # AREA_FREEZE (Free)
|
||||||
KEY_KP_4, KEY_4:
|
KEY_KP_4, KEY_4:
|
||||||
if not is_sng:
|
if not is_restricted:
|
||||||
player.activate_powerup(3) # INVISIBLE_MODE (Free)
|
player.activate_powerup(3) # INVISIBLE_MODE (Free)
|
||||||
# KEY_R:
|
# KEY_R:
|
||||||
# player.auto_put_item()
|
# player.auto_put_item()
|
||||||
|
|||||||
@@ -461,8 +461,9 @@ func spawn_powerups_around(center: Vector2i, force_powerups: bool = true):
|
|||||||
if rng.randf() < 0.7:
|
if rng.randf() < 0.7:
|
||||||
item_id = rng.randi_range(7, 10)
|
item_id = rng.randi_range(7, 10)
|
||||||
else:
|
else:
|
||||||
# 30% Chance for PowerUp (Exclude Wall 13 only in Stop n Go)
|
# 30% Chance for PowerUp (Speed 11, Freeze 12, Ghost 14 - Exclude Wall 13 in restricted modes)
|
||||||
if LobbyManager.game_mode == "Stop n Go":
|
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()
|
item_id = [11, 12, 14].pick_random()
|
||||||
else:
|
else:
|
||||||
item_id = rng.randi_range(11, 14)
|
item_id = rng.randi_range(11, 14)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ enum Phase {GO, STOP}
|
|||||||
|
|
||||||
const GO_DURATION: float = 8.0
|
const GO_DURATION: float = 8.0
|
||||||
const STOP_DURATION: float = 4.0
|
const STOP_DURATION: float = 4.0
|
||||||
const REQUIRED_GOALS: int = 1
|
const REQUIRED_GOALS: int = 8
|
||||||
|
|
||||||
var current_phase: Phase = Phase.GO
|
var current_phase: Phase = Phase.GO
|
||||||
var phase_timer: float = GO_DURATION
|
var phase_timer: float = GO_DURATION
|
||||||
|
|||||||
@@ -10,17 +10,17 @@ const TILE_STAR = 9
|
|||||||
const TILE_COIN = 10
|
const TILE_COIN = 10
|
||||||
|
|
||||||
# Special tiles (Holo)
|
# Special tiles (Holo)
|
||||||
const TILE_BURN = 11
|
const TILE_SPEED = 11
|
||||||
const TILE_SPAWN = 12
|
const TILE_FREEZE = 12
|
||||||
const TILE_FREEZE = 13
|
const TILE_WALL = 13
|
||||||
const TILE_BLOCK = 14
|
const TILE_INVISIBLE = 14
|
||||||
|
|
||||||
const STANDARD_TILES = [
|
const STANDARD_TILES = [
|
||||||
TILE_HEART, TILE_DIAMOND, TILE_STAR, TILE_COIN
|
TILE_HEART, TILE_DIAMOND, TILE_STAR, TILE_COIN
|
||||||
]
|
]
|
||||||
|
|
||||||
const SPECIAL_TILES = [
|
const SPECIAL_TILES = [
|
||||||
TILE_BURN, TILE_SPAWN, TILE_FREEZE, TILE_BLOCK
|
TILE_SPEED, TILE_FREEZE, TILE_WALL, TILE_INVISIBLE
|
||||||
]
|
]
|
||||||
|
|
||||||
# Weights (higher = more common)
|
# Weights (higher = more common)
|
||||||
@@ -50,10 +50,10 @@ static func get_tile_weights() -> Dictionary:
|
|||||||
weights[tile] = STANDARD_WEIGHT
|
weights[tile] = STANDARD_WEIGHT
|
||||||
|
|
||||||
# Special tiles
|
# Special tiles
|
||||||
var is_sng = LobbyManager.game_mode == "Stop n Go"
|
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
|
||||||
for tile in SPECIAL_TILES:
|
for tile in SPECIAL_TILES:
|
||||||
if is_sng and tile == TILE_FREEZE:
|
if is_restricted and tile == TILE_WALL:
|
||||||
continue # Hide Wall Block only in Stop n Go
|
continue # Hide Wall Block only in restricted modes
|
||||||
weights[tile] = special_weight
|
weights[tile] = special_weight
|
||||||
|
|
||||||
return weights
|
return weights
|
||||||
|
|||||||
@@ -31,8 +31,10 @@ func _ready():
|
|||||||
_setup_btn(1, container.get_node_or_null("FreezeAreaBtn"))
|
_setup_btn(1, container.get_node_or_null("FreezeAreaBtn"))
|
||||||
var wall_btn = container.get_node_or_null("WallBtn")
|
var wall_btn = container.get_node_or_null("WallBtn")
|
||||||
_setup_btn(2, wall_btn)
|
_setup_btn(2, wall_btn)
|
||||||
if wall_btn and LobbyManager.game_mode == "Stop n Go":
|
|
||||||
wall_btn.visible = false # Hide Wall Power-up only in Stop n Go
|
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
|
||||||
|
if wall_btn and is_restricted:
|
||||||
|
wall_btn.visible = false # Hide Wall Power-up in restricted modes
|
||||||
_setup_btn(3, container.get_node_or_null("GhostBtn"))
|
_setup_btn(3, container.get_node_or_null("GhostBtn"))
|
||||||
|
|
||||||
print("[PowerUpUI] UI Initialization Complete. Mapped %d buttons." % icon_containers.size())
|
print("[PowerUpUI] UI Initialization Complete. Mapped %d buttons." % icon_containers.size())
|
||||||
@@ -107,12 +109,13 @@ func _setup_btn(effect_id: int, btn: Button):
|
|||||||
|
|
||||||
# Determine Label Text based on Effect ID
|
# Determine Label Text based on Effect ID
|
||||||
var key_text = ""
|
var key_text = ""
|
||||||
if LobbyManager.game_mode == "Stop n Go":
|
var is_restricted = LobbyManager.game_mode == "Stop n Go" or LobbyManager.game_mode == "Tekton Doors"
|
||||||
# Stop n Go Mapping: 1, 2, 3 (No Wall)
|
if is_restricted:
|
||||||
|
# Restricted Mapping: 1, 2, 3 (No Wall)
|
||||||
match effect_id:
|
match effect_id:
|
||||||
0: key_text = "1"
|
0: key_text = "1"
|
||||||
1: key_text = "2"
|
1: key_text = "2" # Freeze is now 2
|
||||||
3: key_text = "3"
|
3: key_text = "3" # Ghost is now 3
|
||||||
else:
|
else:
|
||||||
# Free Mode Mapping: 1, 2, 3, 4 (Original)
|
# Free Mode Mapping: 1, 2, 3, 4 (Original)
|
||||||
match effect_id:
|
match effect_id:
|
||||||
|
|||||||
Reference in New Issue
Block a user