Skip to content

@ue-too/board-game-engine / index / HexGridSystem

類別: HexGridSystem ​

定義於: grid-system/hex-grid.ts:100

實作 ​

  • System

建構函式 ​

建構函式 ​

new HexGridSystem(coordinator): HexGridSystem

定義於: grid-system/hex-grid.ts:104

參數 ​

coordinator ​

Coordinator

回傳 ​

HexGridSystem

屬性 ​

entities ​

entities: Set<number>

定義於: grid-system/hex-grid.ts:101

實作了 ​

System.entities

方法 ​

addEntityToGridCell() ​

addEntityToGridCell(grid, q, r, entity, direction, displace): void

定義於: grid-system/hex-grid.ts:138

參數 ​

grid ​

number

q ​

number

r ​

number

entity ​

number

direction ​

"top" | "bottom"

displace ​

boolean = false

回傳 ​

void


getCellEntityAt() ​

getCellEntityAt(grid, q, r): number | null

定義於: grid-system/hex-grid.ts:240

參數 ​

grid ​

number

q ​

number

r ​

number

回傳 ​

number | null


getEntireGridEntities() ​

getEntireGridEntities(grid): { entities: (number | null)[][]; hasHole: boolean; } | null

定義於: grid-system/hex-grid.ts:192

參數 ​

grid ​

number

回傳 ​

{ entities: (number | null)[][]; hasHole: boolean; } | null