Options
All
  • Public
  • Public/Protected
  • All
Menu

PathfindingRuntimeBehavior represents a behavior allowing objects to follow a path computed to avoid obstacles.

Hierarchy

Index

Methods

  • activate(enable: boolean): void
  • activated(): boolean
  • allowDiagonals(allow: boolean): void
  • destinationReached(): boolean
  • diagonalsAllowed(): boolean
  • euclideanDistance(a: FloatPoint, b: FloatPoint): number
  • getAcceleration(): number
  • getAngleOffset(): number
  • getAngularMaxSpeed(): number
  • getCellHeight(): number
  • getCellWidth(): number
  • getDestinationX(): number
  • getDestinationY(): number
  • getExtraBorder(): number
  • getGridOffsetX(): number
  • getGridOffsetY(): number
  • getLastNodeX(): number
  • getLastNodeY(): number
  • getMaxSpeed(): number
  • getMovementAngle(): number
  • getName(): string
  • getNameId(): number
  • getNextNodeIndex(): number
  • getNextNodeX(): number
  • getNextNodeY(): number
  • getNodeCount(): number
  • getNodeX(index: number): number
  • getNodeY(index: number): number
  • getSpeed(): number
  • isObjectRotated(): boolean
  • manhattanDistance(a: FloatPoint, b: FloatPoint): number
  • moveTo(runtimeScene: RuntimeScene, x: number, y: number): void
  • movementAngleIsAround(degreeAngle: number, tolerance: number): boolean
  • onActivate(): void
  • onCreated(): void
  • onDeActivate(): void
  • onDestroy(): void
  • This method is called when the owner of the behavior is being removed from the scene and is about to be destroyed/reused later or when the behavior is removed from an object (can happen in case of hot-reloading only. Otherwise, behaviors are just de-activated, not removed. See onDeActivate).

    Returns void

  • onObjectHotReloaded(): void
  • pathFound(): boolean
  • setAcceleration(acceleration: number): void
  • setAngleOffset(angleOffset: number): void
  • setAngularMaxSpeed(angularMaxSpeed: number): void
  • setCellHeight(height: number): void
  • setCellWidth(width: number): void
  • setExtraBorder(extraBorder: any): void
  • setGridOffsetX(gridOffsetX: number): void
  • setGridOffsetY(gridOffsetY: number): void
  • setMaxSpeed(maxSpeed: number): void
  • setRotateObject(allow: boolean): void
  • setSpeed(speed: number): void
  • updateFromBehaviorData(oldBehaviorData: any, newBehaviorData: any): boolean

Constructors

Properties

name: string
type: string

Generated using TypeDoc