Class ClockworkFlowField

A flow field for a single room that stores multiple directions per tile.

Constructors

Methods

  • Add a direction to the list of valid directions for a given coordinate.

    Parameters

    • x: number
    • y: number
    • direction: DirectionConstant

    Returns void

  • Get the internal value for a given coordinate.

    Parameters

    • x: number
    • y: number

    Returns number

  • Get the list of valid directions for a given coordinate.

    Parameters

    • x: number
    • y: number

    Returns DirectionConstant[]

  • Given a flow field (for a single room), find the path from a given position to the origin. Never paths through other rooms.

    Parameters

    • start: RoomPosition

    Returns ClockworkPath

  • Set the internal value for a given coordinate.

    Parameters

    • x: number
    • y: number
    • value: number

    Returns void

  • Set the list of valid directions for a given coordinate.

    Parameters

    • x: number
    • y: number
    • directions: DirectionConstant[]

    Returns void