Home Reference Source
import ScState from './ui/multiplayer/sc_state.js'
public class | source

ScState

Extends:

cables-shared-client~Events → ScState

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public get

clients: *

public get
Private Members
private

_clients: {}

private

_colors: {}

private
private

_followers: *[]

private
private
private

_log: *

private
private
private

_pilot: *

private
private

Method Summary

Public Methods
public
public
public
public
public

getPilot(): *

public

getUserId(clientId: *): *

public

getUserInSubpatch(subPatch: *): *

public
public

hasPilot(): *

public
Private Methods
private
private

_onPingAnswer(payload: *)

private
private

_sendCursorPos(x: *, y: *)

private

_sendSelectionArea(x: *, y: *, sizeX: *, sizeY: *, hide: boolean)

Public Constructors

public constructor() source

Public Members

public PILOT_REQUEST_TIMEOUT: number source

public get clients: * source

public get followers: * source

Private Members

private _clients: {} source

private _colors: {} source

private _connection: * source

private _followers: *[] source

private _lastMouseX: * source

private _lastMouseY: * source

private _log: * source

private _mouseTimeout: * source

private _pendingPilotRequest: * source

private _pilot: * source

private _timelineTimeout: * source

private _timeoutRefresh: * source

Public Methods

public acceptPilotSeatRequest() source

public becomePilot() source

public cancelPilotSeatRequest() source

public getNumClients(): * source

Return:

*

public getPilot(): * source

Return:

*

public getUserId(clientId: *): * source

Params:

NameTypeAttributeDescription
clientId *

Return:

*

public getUserInSubpatch(subPatch: *): * source

Params:

NameTypeAttributeDescription
subPatch *

Return:

*

public hasPendingPilotSeatRequest(): * source

Return:

*

public hasPilot(): * source

Return:

*

public requestPilotSeat() source

Private Methods

private _cleanUpUserList(): * source

Return:

*

private _onPingAnswer(payload: *) source

Params:

NameTypeAttributeDescription
payload *

private _registerEventListeners() source

private _sendCursorPos(x: *, y: *) source

Params:

NameTypeAttributeDescription
x *
y *

private _sendSelectionArea(x: *, y: *, sizeX: *, sizeY: *, hide: boolean) source

Params:

NameTypeAttributeDescription
x *
y *
sizeX *
sizeY *
hide boolean
  • optional
  • default: false