Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Multiplayer

Hierarchy

  • Multiplayer

Implements

Index

Constructors

constructor

  • Returns Multiplayer

Methods

addSyncCheck

createServer

disconnect

  • disconnect(message?: string, callback?: function): void
  • Parameters

    • Optional message: string
    • Optional callback: function
        • (): void
        • Returns void

    Returns void

executeSyncedPacket

  • executeSyncedPacket(packetObjectOrType: Packet | PacketType): number | undefined | void

getOptions

isClient

  • isClient(): boolean

isConnected

  • isConnected(): boolean

isProcessingPacket

  • isProcessingPacket(): boolean

isReady

  • isReady(): boolean
  • Returns boolean

isServer

  • isServer(): boolean

joinServer

kick

  • Parameters

    Returns void

onLobbyEntered

  • onLobbyEntered(success: boolean, lobbyId: string): void
  • Parameters

    • success: boolean
    • lobbyId: string

    Returns void

onPlaying

  • onPlaying(): void

sendPacket

syncPacket

  • syncPacket(packet: Packet, clientSide?: function, checkPacketType?: boolean): any
  • Parameters

    • packet: Packet
    • Optional clientSide: function
        • (): any
        • Returns any

    • Optional checkPacketType: boolean

    Returns any

updatePlayerId

  • updatePlayerId(oldPid: number, newPid: number): void
  • Parameters

    • oldPid: number
    • newPid: number

    Returns void

Generated using TypeDoc