yolkbot
    Preparing search index...

    Class Pathfinder

    Plans routes across a PathGraph and steers the bot along them.

    Steering happens one tick at a time and only ever writes control keys and yaw, exactly as if something were at the keyboard - so while a route is active the navigator owns Game.state's yaw, and a LookAtDispatch will fight it for the mouse. Pathfinder.stop hands it back.

    Index

    Accessors

    Constructors

    Methods

    Properties

    Accessors

    • get graph(): PathGraph

      The walkable graph, built on first use. Building it takes a moment on a big map

      Returns PathGraph

    Constructors

    Methods

    • Whether the graph has already been built, so that touching Pathfinder.graph is free

      Returns boolean

    • Abandons the current route and lets go of the controls

      Returns void

    • Steers one tick along the active route. Called for you by the game's update loop

      Returns void

    Properties

    bot: Bot

    The bot being steered

    colliders: ColliderSet

    The map's collision geometry

    game: Game

    The game being navigated

    route: ActivePath | null = null

    The route currently being walked, if any