default: {
    getPlayer(user?: GetPlayerDataReq): null | GetPlayerDataRes;
    onEnterScene(cb: ((player: GetPlayerDataRes) => void)): void;
    onLeaveScene(cb: ((userId: string) => void)): void;
} = ...

Type declaration

  • getPlayer:function
    • Returns the info of the player if it's in the scene.

      Parameters

      • Optional user: GetPlayerDataReq

      Returns null | GetPlayerDataRes

  • onEnterScene:function
    • Parameters

      • cb: ((player: GetPlayerDataRes) => void)
          • (player: GetPlayerDataRes): void
          • Parameters

            • player: GetPlayerDataRes

            Returns void

      Returns void

  • onLeaveScene:function
    • Parameters

      • cb: ((userId: string) => void)
          • (userId: string): void
          • Parameters

            • userId: string

            Returns void

      Returns void