Interface IClient
- Namespace
- Coherence
- Assembly
- Coherence.Core.dll
Properties
ClientID
ClientID ClientID { get; }
Property Value
- ClientID
ConnectionSettings
ConnectionSettings ConnectionSettings { get; }
Property Value
- ConnectionSettings
ConnectionState
ConnectionState ConnectionState { get; }
Property Value
- ConnectionState
ConnectionType
ConnectionType ConnectionType { get; }
Property Value
- ConnectionType
Hostname
Property Value
- string
InitialScene
uint InitialScene { get; set; }
Property Value
- uint
LastEndpointData
EndpointData LastEndpointData { get; }
Property Value
- EndpointData
NetworkTime
NetworkTime NetworkTime { get; }
Property Value
- NetworkTime
Ping
Property Value
- Ping
SendFrequency
byte SendFrequency { get; }
Property Value
- byte
Stats
Property Value
- Stats
Methods
Connect(EndpointData, ConnectionSettings, ConnectionType)
void Connect(EndpointData data, ConnectionSettings connectionSettings, ConnectionType connectionType = ConnectionType.Client)
Parameters
data EndpointData
connectionSettings ConnectionSettings
connectionType ConnectionType
CreateEntity(ICoherenceComponentData[], bool)
Entity CreateEntity(ICoherenceComponentData[] data, bool orphan)
Parameters
data ICoherenceComponentData[]
orphan bool
Returns
- Entity
DebugDropNextOutPacket(Action)
void DebugDropNextOutPacket(Action callback)
Parameters
callback Action
DebugHoldAllPackets(bool)
void DebugHoldAllPackets(bool hold)
Parameters
hold bool
DebugOnEntityAcked(Entity, Action)
void DebugOnEntityAcked(Entity id, Action callback)
Parameters
id Entity
callback Action
DebugOnNextPacketSentOneShot(Action)
void DebugOnNextPacketSentOneShot(Action callback)
Parameters
callback Action
DebugReleaseAllHeldPackets()
void DebugReleaseAllHeldPackets()
DebugSetNetworkCondition(Condition)
void DebugSetNetworkCondition(Condition condition)
Parameters
condition Condition
DebugSetRandom(Random)
void DebugSetRandom(Random random)
Parameters
random Random
DebugStopSerializingUpdates(bool)
void DebugStopSerializingUpdates(bool stop)
Parameters
stop bool
DestroyEntity(Entity)
void DestroyEntity(Entity id)
Parameters
id Entity
Disconnect()
EntityExists(Entity)
bool EntityExists(Entity id)
Parameters
id Entity
Returns
- bool
GetFloatingOrigin()
Vector3d GetFloatingOrigin()
Returns
- Vector3d
HasAuthorityOverEntity(Entity, AuthorityType)
bool HasAuthorityOverEntity(Entity entity, AuthorityType authorityType)
Parameters
entity Entity
authorityType AuthorityType
Returns
- bool
IsConnected()
Returns
- bool
IsConnecting()
Returns
- bool
IsDisconnected()
Returns
- bool
Reconnect()
RemoveComponents(Entity, uint[])
void RemoveComponents(Entity id, uint[] data)
Parameters
id Entity
data uint[]
SendAdoptOrphanRequest(Entity)
void SendAdoptOrphanRequest(Entity id)
Parameters
id Entity
SendAuthorityRequest(Entity, AuthorityType)
void SendAuthorityRequest(Entity id, AuthorityType authorityMode = AuthorityType.Full)
Parameters
id Entity
authorityMode AuthorityType
SendAuthorityTransfer(Entity, ClientID, bool, AuthorityType)
bool SendAuthorityTransfer(Entity id, ClientID newAuthority, bool authorized, AuthorityType authorityType = AuthorityType.Full)
Parameters
id Entity
newAuthority ClientID
authorized bool
authorityType AuthorityType
Returns
- bool
SendCommand(IEntityCommand, MessageTarget, Entity)
void SendCommand(IEntityCommand message, MessageTarget target, Entity id)
Parameters
message IEntityCommand
target MessageTarget
id Entity
void SendInput(IEntityInput message, long frame, Entity id)
Parameters
message IEntityInput
frame long
id Entity
SetFloatingOrigin(Vector3d)
void SetFloatingOrigin(Vector3d newFloatingOrigin)
Parameters
newFloatingOrigin Vector3d
SetTransportFactory(ITransportFactory)
void SetTransportFactory(ITransportFactory transportFactory)
Parameters
transportFactory ITransportFactory
UpdateComponents(Entity, ICoherenceComponentData[], uint[])
void UpdateComponents(Entity id, ICoherenceComponentData[] data, uint[] mask)
Parameters
id Entity
data ICoherenceComponentData[]
mask uint[]
UpdateReceiving()
UpdateSending()
Events
DebugOnPacketSent
event Action<Dictionary<Entity, EntityState>> DebugOnPacketSent
Event Type
- Action<Dictionary<Entity, EntityState>>
OnAuthorityChange
event Action<AuthorityChange> OnAuthorityChange
Event Type
- Action<AuthorityChange>
OnAuthorityRequestRejected
event Action<AuthorityRequestRejection> OnAuthorityRequestRejected
Event Type
- Action<AuthorityRequestRejection>
OnAuthorityRequested
event Action<AuthorityRequest> OnAuthorityRequested
Event Type
- Action<AuthorityRequest>
OnCommand
event Action<IEntityCommand, MessageTarget, Entity> OnCommand
Event Type
- Action<IEntityCommand, MessageTarget, Entity>
OnConnected
event Action<ClientID> OnConnected
Event Type
- Action<ClientID>
OnConnectedEndpoint
event Action<EndpointData> OnConnectedEndpoint
Event Type
- Action<EndpointData>
OnConnectionError
event Action<ConnectionException> OnConnectionError
Event Type
- Action<ConnectionException>
OnDisconnected
event Action<ConnectionCloseReason> OnDisconnected
Event Type
- Action<ConnectionCloseReason>
OnEntityCreated
event Action<Entity, EntityUpdate> OnEntityCreated
Event Type
- Action<Entity, EntityUpdate>
OnEntityDestroyed
event Action<Entity, DestroyReason> OnEntityDestroyed
Event Type
- Action<Entity, DestroyReason>
OnEntityUpdated
event Action<Entity, EntityUpdate> OnEntityUpdated
Event Type
- Action<Entity, EntityUpdate>
event Action<IEntityInput, long, Entity> OnInput
Event Type
- Action<IEntityInput, long, Entity>