feat: implement main scene initialization and add screen shake and stop-n-go game managers

This commit is contained in:
Yogi Wiguna
2026-03-31 20:55:15 +08:00
parent ad695292dc
commit 193aae94ba
3 changed files with 9 additions and 4 deletions
+6
View File
@@ -171,6 +171,11 @@ func _hide_ground_tiles():
func _setup_effect_elevation(): func _setup_effect_elevation():
var em = get_node_or_null("EnhancedGridMap") var em = get_node_or_null("EnhancedGridMap")
if em and em.mesh_library: if em and em.mesh_library:
# USER REQUEST: Do not apply visual Y-elevation for walls in Stop n Go mode
if LobbyManager.game_mode == "Stop n Go":
print("[Main] Stop n Go mode detected: Skipping effect elevation for walls.")
return
var ml = em.mesh_library.duplicate() var ml = em.mesh_library.duplicate()
# Height 0.8: Above 3D arena, but below pickups (Y=1.0) # Height 0.8: Above 3D arena, but below pickups (Y=1.0)
@@ -183,6 +188,7 @@ func _setup_effect_elevation():
em.mesh_library = ml em.mesh_library = ml
print("[Main] MeshLibrary elevation applied: Wall(4) and Freeze(5) at Y=0.8") print("[Main] MeshLibrary elevation applied: Wall(4) and Freeze(5) at Y=0.8")
@rpc("any_peer", "call_local", "reliable") @rpc("any_peer", "call_local", "reliable")
func sync_portal_configs(configs: Array): func sync_portal_configs(configs: Array):
if portal_mode_manager: if portal_mode_manager:
-1
View File
@@ -30,4 +30,3 @@ func set_target_position(new_pos: Vector3, duration: float = 1.0):
# Tween the target position # Tween the target position
var tween = create_tween() var tween = create_tween()
tween.tween_property(self, "target_position", new_pos, duration).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN_OUT) tween.tween_property(self, "target_position", new_pos, duration).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN_OUT)
+3 -3
View File
@@ -360,8 +360,8 @@ func _apply_arena_setup():
for z in range(gridmap.rows): for z in range(gridmap.rows):
var current_pos = Vector2i(x, z) var current_pos = Vector2i(x, z)
if current_pos in non_walkable_coords: if current_pos in non_walkable_coords:
gridmap.set_cell_item(Vector3i(x, 0, z), -1) # empty space / void gridmap.set_cell_item(Vector3i(x, 0, z), TILE_OBSTACLE) # wall block on Floor 0
gridmap.set_cell_item(Vector3i(x, 1, z), TILE_OBSTACLE) # wall block gridmap.set_cell_item(Vector3i(x, 1, z), -1)
continue continue
var tile_id = TILE_WALKABLE var tile_id = TILE_WALKABLE
@@ -379,7 +379,7 @@ func _apply_arena_setup():
_create_room_with_edge_walls(gridmap, 7, 6, 11, 9, r1_entrances) _create_room_with_edge_walls(gridmap, 7, 6, 11, 9, r1_entrances)
# Non-walkable obstacle inside Room 1 # Non-walkable obstacle inside Room 1
gridmap.set_cell_item(Vector3i(9, 1, 8), TILE_OBSTACLE) gridmap.set_cell_item(Vector3i(9, 0, 8), TILE_OBSTACLE)
# Room 2: (15,1) to (19,5) - 5x5 Area. Boundaries: X[15..19], Z[1..5] # Room 2: (15,1) to (19,5) - 5x5 Area. Boundaries: X[15..19], Z[1..5]
var r2_entrances = [Vector2i(15, 2), Vector2i(17, 1), Vector2i(19, 2), Vector2i(18, 5)] var r2_entrances = [Vector2i(15, 2), Vector2i(17, 1), Vector2i(19, 2), Vector2i(18, 5)]