Class Player

Classdesc

Player class, used for managing players in a multiplayer game. Handled automatically when using MultiPlayerServer

Constructors

Properties

gameObject: GameObject

GameObject of the player

id: string

ID of the player

inSceneID: null | string

ID of the scene that the player is in

label: string

Label of the player

socket: any

Socket.io socket of the player

Methods

  • Emits the player's data to the client

    Returns void

  • Changes the scene that the player is in

    Parameters

    • scene: Scene

      Scene to enter

    Returns void

Generated using TypeDoc