update BG, tile
This commit is contained in:
@@ -46,6 +46,7 @@ const TILE_START = 3 # Start Line
|
||||
const TILE_FINISH = 3 # Finish Line
|
||||
const TILE_SAFE = 2 # Green Safe Zone
|
||||
const TILE_OBSTACLE = 4 # Wall
|
||||
const TILE_LIGHTNING_STONE = 15 # Ancient Rock with Lightning Symbol
|
||||
|
||||
var hud_layer: CanvasLayer
|
||||
var mission_label: Label
|
||||
@@ -709,8 +710,8 @@ func _spawn_powerup_tiles():
|
||||
for i in range(PERMANENT_POWERUP_LOCATIONS.size()):
|
||||
var pos = PERMANENT_POWERUP_LOCATIONS[i]
|
||||
|
||||
# Set Floor 0 beneath power-up to ID 1 (Hover pattern) - Static PADS
|
||||
gridmap.set_cell_item(Vector3i(pos.x, 0, pos.y), 1)
|
||||
# Set Floor 0 beneath power-up to ID 15 (Ancient Lightning Stone)
|
||||
gridmap.set_cell_item(Vector3i(pos.x, 0, pos.y), TILE_LIGHTNING_STONE)
|
||||
|
||||
# Cycle through the available power-up types
|
||||
var tile_id = POWERUP_TILES[i % POWERUP_TILES.size()]
|
||||
@@ -720,7 +721,7 @@ func _spawn_powerup_tiles():
|
||||
|
||||
# Sync both floor and tile to all clients and host
|
||||
if can_rpc():
|
||||
main.rpc("sync_grid_item", pos.x, 0, pos.y, 1) # Sync floor change (Pad on)
|
||||
main.rpc("sync_grid_item", pos.x, 0, pos.y, TILE_LIGHTNING_STONE) # Sync floor change (Stone on)
|
||||
main.rpc("sync_grid_item", pos.x, 1, pos.y, tile_id) # Sync power-up
|
||||
|
||||
powerups_spawned = true
|
||||
|
||||
Reference in New Issue
Block a user