Owns all visual representation of the game board. Manages terrain and entity rendering, ghost overlay, tile highlights, pathfinding display, and pointer event translation. Drives BoardGhostSystem, BoardHighlightSystem, and BoardVfxSystem in response to scene events and engine effects.
Draws the board, populates initial entities, and wires up pointer listeners.
Draws the inset panel background behind the board.
Creates the rexBoard hex grid and populates it with TerrainObject tiles.
Renders all entities present at game start.
Wires up rexBoard pointer events and maps them to internal handlers.
rexBoard event quirks to be aware of:
Implementation notes:
Emits a POINTER_LEFT_DOWN event with the tile coordinates.
Emits a POINTER_RIGHT_DOWN event with the tile coordinates.
Moves the ghost to the hovered tile and updates the path display if a pathfinder is active.
Fires on tile exit. Reserved for future per-tile hover-out logic.
Marks the pointer as on the board and shows the ghost if no pathfinder is active.
Marks the pointer as off the board, hides the ghost, and clears any active path.
Returns the EntityObject chess piece at the given tile position, or null if nothing is there. All entities share the unit layer for chess lookups.
Returns the TerrainObject at the given tile coordinates, or null for off-board positions. Used as the primary existence check before handling any tile event, since some positions on the hex grid are intentionally empty.
Render the given entity on to the board as a "chess" piece.
Tweens the entity's visual from its current board position to the new tile. Updates rexBoard tracking to the destination before animating so subsequent lookups use the correct position immediately.
Plays the attack animation between two entities.
Updates the entity's health bar and queues a floating text notification. Negative amount shows a damage label, positive shows a regen label.
Plays the death animation then removes the entity from the board and destroys its game object.
Attaches the particle effect for the given status to the entity's game object.
Removes the particle effect for the given status from the entity's game object.
Switches the active ghost mode and immediately triggers a toggle to re-snap it into position at the current pointer location.
Shows the ghost if the pointer is on the board, then re-emits tileover at the current pointer position over a short interval. This ensures the ghost snaps into place without requiring a manual hover out/over, and the interval smooths the transition when toggling during the right-click cancel race condition.
Public so PlayScene can call it directly to re-establish the ghost after a menu overlay or other UI state that may have hidden or replaced it.
Converts TileData to TerrainObjects and applies the highlight set.
Clears all highlights of the given type.
Activates the pathfinder for the given entity with the available move points.
Deactivates and destroys the current pathfinder, clearing any displayed path.