Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Multiplayer

Hierarchy

  • Multiplayer

Implements

Index

Constructors

constructor

  • Returns Multiplayer

Methods

addAfterSyncChecks

  • addAfterSyncChecks(packet: IPacket): void

addBeforeSyncChecks

  • addBeforeSyncChecks(packet: IPacket): void

addSyncCheck

  • addSyncCheck(syncCheck: MultiplayerSyncCheck.Stats | MultiplayerSyncCheck.Creature | MultiplayerSyncCheck.CanASeeB | MultiplayerSyncCheck.CanASeeBLightSource | MultiplayerSyncCheck.Weight | MultiplayerSyncCheck.StaminaChanges | MultiplayerSyncCheck.InventoryCount | MultiplayerSyncCheck.ItemWeight | MultiplayerSyncCheck.Ticks | MultiplayerSyncCheck.Seed | MultiplayerSyncCheck.PlayerPositions | MultiplayerSyncCheck.Container | MultiplayerSyncCheck.ItemOrder | MultiplayerSyncCheck.LastCreationIds | MultiplayerSyncCheck.IsTileEmpty | MultiplayerSyncCheck.CreatureNearestPlayer | MultiplayerSyncCheck.CreatureIsInFlowField | MultiplayerSyncCheck.CreatureMoveDirection | MultiplayerSyncCheck.FlowFieldValue, value: any): void
  • Parameters

    • syncCheck: MultiplayerSyncCheck.Stats | MultiplayerSyncCheck.Creature | MultiplayerSyncCheck.CanASeeB | MultiplayerSyncCheck.CanASeeBLightSource | MultiplayerSyncCheck.Weight | MultiplayerSyncCheck.StaminaChanges | MultiplayerSyncCheck.InventoryCount | MultiplayerSyncCheck.ItemWeight | MultiplayerSyncCheck.Ticks | MultiplayerSyncCheck.Seed | MultiplayerSyncCheck.PlayerPositions | MultiplayerSyncCheck.Container | MultiplayerSyncCheck.ItemOrder | MultiplayerSyncCheck.LastCreationIds | MultiplayerSyncCheck.IsTileEmpty | MultiplayerSyncCheck.CreatureNearestPlayer | MultiplayerSyncCheck.CreatureIsInFlowField | MultiplayerSyncCheck.CreatureMoveDirection | MultiplayerSyncCheck.FlowFieldValue
    • value: any

    Returns void

createServer

disconnect

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

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

    Returns void

getClients

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

sendPacketTo

setOptions

syncPacket

  • syncPacket(packet: IPacket, clientSide?: function, checkId?: boolean, waitId?: number): any
  • Parameters

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

    • Optional checkId: boolean
    • Optional waitId: number

    Returns any

updatePlayerId

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

    • oldPid: number
    • newPid: number

    Returns void

Generated using TypeDoc