feat(duel): allow swapping main view to opponent's board
- Add a toggle on the picture-in-picture window to swap the big board with the mini view of the opponent's field - Color-coded frame and badge identify whose board is currently shown (blue = player 1, orange = player 2) - Block building and rushing while spectating the opponent's board; the PiP then shows your own field instead - Clarify duel-mode descriptions in lobby and start screen, add hints in the multiplayer bar - Replace previous announcement banners so only one shows at a time
This commit is contained in:
parent
4ec0e483aa
commit
ef75203db7
12 changed files with 130 additions and 15 deletions
|
|
@ -15,6 +15,13 @@ export const OBSTACLE_COST: Record<'tree' | 'rock', number> = {
|
|||
rock: 40,
|
||||
}
|
||||
|
||||
/** multiplayer player identity colors (blue = player 1, orange = player 2) */
|
||||
export const PLAYER_COLORS: [string, string] = ['#4da3ff', '#ffb14d']
|
||||
|
||||
export function playerColor(playerId: number | null): string {
|
||||
return playerId === null || playerId === 0 ? PLAYER_COLORS[0] : PLAYER_COLORS[1]
|
||||
}
|
||||
|
||||
/** ground path in tile coords; -1/20 are outside the grid (spawn/exit) */
|
||||
export const MAP_WAYPOINTS: [number, number][] = [
|
||||
[-1, 5],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue