added blackout timer

This commit is contained in:
2026-10-24 21:16:18 +02:00
parent 471dc33f0e
commit 0fb223cdee
135 changed files with 68 additions and 1418 deletions
+2
View File
@@ -1,6 +1,7 @@
import { memo } from 'react';
import type { PlayerState } from '../net/types';
import type { ItemFlash } from '../net/useGameConnection';
import { BlackoutTimer } from './BlackoutTimer';
import { BoardCanvas } from './BoardCanvas';
import { ItemBar } from './ItemBar';
import { ItemFlashOverlay } from './ItemFlashOverlay';
@@ -29,6 +30,7 @@ export const MiniBoard = memo(function MiniBoard({ state, width, height, slot, s
</div>
<BoardCanvas state={state} width={width} height={height} cell={cell} highlighted={selected}>
<ItemFlashOverlay flashes={flashes} small />
<BlackoutTimer remaining={state.alive ? state.invisibleRemaining : 0} small />
</BoardCanvas>
<div className={styles.items} style={{ width: width * cell + 6 }}>
<ItemBar items={state.inventory} size={Math.max(10, cell)} />