For the complete documentation index, see llms.txt. This page is also available as Markdown.

Interface ksIServerPlayer

Namespace: KS.Reactor.Server Assembly: KSReactor.dll

Public interface for server player. A player represents a client connected to the room.

public interface ksIServerPlayer

Properties

Address

Address the player is connected from.

string Address { get; }

Property Value

string

AuthenticatedId

Player Authenticated Id

string AuthenticatedId { get; }

Property Value

string

Connected

True if this player is connected to the room.

Property Value

bool

ConnectionState

Connection state

Property Value

ksConnectionStates

ControlledEntities

Property Value

ksConstList<ksIServerEntity>

Frame

Latest server frame number processed by the player and received by the server.

Property Value

ulong

Id

Player id

Property Value

uint

IdleTime

Amount of time the client has been idle.

Property Value

double

IsConnected

True if the player is connected and authenticated.

Property Value

bool

IsIdle

Is the player idle?

Property Value

bool

IsVirtual

True if this is a virtual players

Property Value

bool

IsVisible

Does the player sync?

Property Value

bool

OwnedEntities

Entities owned by this player.

Property Value

ksConstList<ksIServerEntity>

Port

Port the player is connected on.

Property Value

string

Properties

Properties

Property Value

ksPropertyMap

Room

Room the player is in.

Property Value

ksIServerRoom

Scripts

List of scripts attached to the player.

Property Value

ksScriptList<ksIServerPlayer, ksServerPlayerScript>

Time

Latest player UTC time received by the server.

Property Value

DateTime

VirtualInput

Get an input object for virtual players

Property Value

ksVirtualInput

Methods

AddToSyncGroup(uint)

Add a player to a sync group.

Parameters

syncGroup uint

Sync group

DestroyControlledEntities()

DestroyOwnedEntities()

Destroys all entities owned by this player.

Disconnect()

Disconnects this client.

GetSyncGroups()

Get a list of sync groups the player is in.

Returns

uint[]

Sync groups

RemoveAllControllers()

Removes all player controllers owned by this player.

RemoveFromSyncGroup(uint)

Remove a player from a sync group.

Parameters

syncGroup uint

Sync group

RemoveOwnedEntities()

Removes ownership from all entities owned by this player. Also removes player controllers.

UpdateControllers(float, ksInput)

Calls Update on all player controllers controlled by this player.

Parameters

unscaledDeltaTime float

if non-negative, changes UnscaledDelta to this value when updating the controllers, andDelta to unscaledDeltaTime * TimeScale.

input ksInput

if non-null, overrides the current input.

OnLeave

Invoked when the player leaves the room.

Event Type

ksServerEvents.LeaveHandler

Last updated