Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FlowField

Hierarchy

  • FlowField

Index

Constructors

constructor

  • new FlowField(size: number, tileX: number, tileY: number, moveType: MoveType): FlowField
  • Parameters

    • size: number
    • tileX: number
    • tileY: number
    • moveType: MoveType

    Returns FlowField

Properties

flowField

flowField: ByteGrid

Private moveType

moveType: MoveType

Private offsetX

offsetX: number

Private offsetY

offsetY: number

Private penaltyField

penaltyField: ByteGrid

Private size

size: number

Private tileX

tileX: number

Private tileY

tileY: number

Private updateQueue

updateQueue: Queue<number>

Methods

updateField

  • updateField(tileX: number, tileY: number, offsetX: number, offsetY: number): void
  • Parameters

    • tileX: number
    • tileY: number
    • offsetX: number
    • offsetY: number

    Returns void

updatePenaltyField

  • updatePenaltyField(): void
  • Returns void

updateTile

  • updateTile(gridIndex: number, tile: ITile): void
  • Parameters

    • gridIndex: number
    • tile: ITile

    Returns void

Generated using TypeDoc