Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkeldjsPathfinder

Represents a pathfinding utility for the SkeldJS Client.

See SkeldjsPathfinderEvents for events to listen to.

Hierarchy

Index

Properties

Static MovementInterval

MovementInterval: 6 = ...

config

config: PathfinderConfig = {}

Optional destination

destination: Vector2

The destination of the pathfinder.

Optional following

following: PlayerData<Hostable<any>>

The player that the pathfinder is currently finding.

Optional grid

grid: Grid

The grid of nodes for the pathfinder engine.

isPaused

isPaused: boolean

Optional path

path: Node[]

The current intended path of the pathfinder.

Constructors

constructor

Methods

emit

  • emit<Event>(event: Event): Promise<Event>

emitSerial

  • emitSerial<Event>(event: Event): Promise<Event>

emitSync

  • emitSync<Event>(event: Event): Event

follow

  • follow(player: PlayerDataResolvable): void

getListeners

  • getListeners<Event>(event: string): Listener<Event>[]

getMapId

  • getMapId(): string

go

off

  • off<EventName>(event: EventName, listener: Listener<SkeldjsPathfinderEvents[EventName]>): void
  • off<K>(event: string, listener: Listener<K>): void
  • Type parameters

    • EventName: "pathfinding.end" | "engine.move" | "pathfinding.pause" | "engine.recalculate" | "pathfinding.start" | "pathfinding.stop"

    Parameters

    Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns void

on

  • on<EventName>(event: EventName, listener: Listener<SkeldjsPathfinderEvents[EventName]>): () => void
  • on<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: "pathfinding.end" | "engine.move" | "pathfinding.pause" | "engine.recalculate" | "pathfinding.start" | "pathfinding.stop"

    Parameters

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

once

  • once<EventName>(event: EventName, listener: Listener<SkeldjsPathfinderEvents[EventName]>): () => void
  • once<K>(event: string, listener: Listener<K>): () => void
  • Type parameters

    • EventName: "pathfinding.end" | "engine.move" | "pathfinding.pause" | "engine.recalculate" | "pathfinding.start" | "pathfinding.stop"

    Parameters

    Returns () => void

      • (): void
      • Returns void

  • Type parameters

    Parameters

    • event: string
    • listener: Listener<K>

    Returns () => void

      • (): void
      • Returns void

pause

  • pause(): void

recalculate

  • recalculate(): Promise<void>

removeAllListeners

  • removeAllListeners(): void

removeListeners

  • removeListeners(event: string): void

start

  • start(): void

stop

  • stop(): void

vent

  • vent(ventId: number): void

wait

waitf

Accessors

myPlayer

position

  • get position(): undefined | Vector2

transform

  • get transform(): undefined | CustomNetworkTransform<Hostable<any>>

Generated using TypeDoc