Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FlowFieldManager

Hierarchy

  • FlowFieldManager

Index

Constructors

constructor

Properties

delegate

flowFields

flowFields: object

Type declaration

Private offsetX

offsetX: number

Private offsetY

offsetY: number

Private size

size: number

Private tileX

tileX: number

Private tileY

tileY: number

Static blockedPenalty

blockedPenalty: number = 50

Methods

Private flowFieldFromMoveType

  • Parameters

    Returns ByteGrid | undefined

fullUpdate

  • fullUpdate(): void
  • Returns void

Private getDirection

  • Parameters

    • field: ByteGrid | undefined
    • localX: number
    • localY: number
    • toward: boolean

    Returns FacingDirection

getHeight

  • getHeight(): number
  • Returns number

getMoveDirection

getOpposingMoveDirection

getWidth

  • getWidth(): number
  • Returns number

isInFlowField

  • isInFlowField(worldX: number, worldY: number): boolean
  • Parameters

    • worldX: number
    • worldY: number

    Returns boolean

setCenter

  • setCenter(worldX: number, worldY: number): void
  • Parameters

    • worldX: number
    • worldY: number

    Returns void

setDelegate

update

  • update(): void
  • Returns void

updateTile

  • updateTile(tileX: number, tileY: number): void
  • Parameters

    • tileX: number
    • tileY: number

    Returns void

Private updateTileInternal

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

    • gridIndex: number
    • tile: ITile

    Returns void

Generated using TypeDoc