hex-world
    Preparing search index...

    Interface UnitManagerEventMap

    Events emitted by UnitManager.events.

    interface UnitManagerEventMap {
        unitAdded: { unit: HexUnit; object3D: Object3D };
        unitRemoved: { unit: HexUnit; object3D: Object3D };
        unitMoveStart: UnitEvent;
        unitCellEnter: UnitEvent;
        unitArrived: UnitEvent;
        unitMoveEnd: UnitEvent & { completed: boolean };
        unitEmbark: UnitEvent;
        unitDisembark: UnitEvent;
    }

    Hierarchy (View Summary)

    Index

    Properties

    unitAdded: { unit: HexUnit; object3D: Object3D }

    A unit was registered and its Object3D added to the scene.

    unitRemoved: { unit: HexUnit; object3D: Object3D }

    A unit was removed from the scene and its fog contribution withdrawn.

    unitMoveStart: UnitEvent

    A unit began following a new path. col/row are where it set off from.

    unitCellEnter: UnitEvent

    A unit crossed into a new cell mid-path. Fires after the fog reveal for that cell, so a listener reading fogData sees the post-move visibility.

    unitArrived: UnitEvent

    A unit reached the end of its path. The event most turn logic wants: unlike unitMoveEnd it does not fire for an interrupted move.

    unitMoveEnd: UnitEvent & { completed: boolean }

    A unit stopped moving, whether it finished the path (completed: true) or HexUnit.stop cut it short. Pair with animation state.

    unitEmbark: UnitEvent

    A unit stepped from land onto a liquid cell. Only units given an isLiquid predicate report this. Fires before unitCellEnter.

    unitDisembark: UnitEvent

    A unit stepped from a liquid cell onto land. Fires before unitCellEnter.