classicborne
    Preparing search index...

    Class Drone

    Represents a drone entity for replicating character and positions of players and non-player entities.

    I am added to players' DroneTransmitter instances so my position and appearance can be synchronized to other players.

    By default, BaseLevel adds me on BaseLevel.addPlayer to represent the player's character in the level. I get destroyed when the player leaves the level via BaseLevel.removePlayer.

    Hierarchy

    • TypedEmitter
      • Drone
    Index

    Constructors

    Properties

    destroyed: boolean

    Whether I am destroyed. Drone#destroy sets this value.

    ego: Ego
    orientation: Vector2
    position: Vector3
    defaultMaxListeners: number

    Methods

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • ...args: Parameters<
            {
                destroy: () => void;
                position: (position: Vector3, orientation: Vector2) => void;
            }[U],
        >

      Returns boolean

    • Type Parameters

      • U extends "position" | "destroy"

      Returns U[]

    • Returns number

    • Parameters

      • type: "position" | "destroy"

      Returns number

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • type: U

      Returns {
          destroy: () => void;
          position: (position: Vector3, orientation: Vector2) => void;
      }[U][]

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • type: U

      Returns {
          destroy: () => void;
          position: (position: Vector3, orientation: Vector2) => void;
      }[U][]

    • Parameters

      • Optionalevent: "position" | "destroy"

      Returns this

    • Type Parameters

      • U extends "position" | "destroy"

      Parameters

      • event: U
      • listener: {
            destroy: () => void;
            position: (position: Vector3, orientation: Vector2) => void;
        }[U]

      Returns this

    • Parameters

      • n: number

      Returns this

    • Sets position and orientation of the drone.

      Parameters

      • position: any

        The position of the drone.

      • orientation: any

        The orientation of the drone.

      Returns void