Interface IGameEngine
- Namespace
- Netick
- Assembly
- Netick.dll
This interface is used to integrate Netick with a game engine.
public interface IGameEngine
Methods
GetConnectionMetaSizeWords()
Implements this to inform Netick about the size (in 32 bit words) of your connection meta data.
int GetConnectionMetaSizeWords()
Returns
GetEntityMetaSizeWords()
Implements this to inform Netick about the size (in 32 bit words) of your entity meta data.
int GetEntityMetaSizeWords()
Returns
GetReplicateEntitiesOnReplay(int*)
bool GetReplicateEntitiesOnReplay(int* replayServerConnectionRemoteUserData)
Parameters
replayServerConnectionRemoteUserDataint*
Returns
GetTime()
float GetTime()
Returns
OnAfterReceive(NetworkConnection)
This is called when a full packet has been received.
void OnAfterReceive(NetworkConnection source)
Parameters
sourceNetworkConnection
OnBeforeSend(NetworkConnection)
This is called before sending packets to the target connection.
void OnBeforeSend(NetworkConnection target)
Parameters
targetNetworkConnection
OnConnectFailed(ConnectionFailedReason)
void OnConnectFailed(ConnectionFailedReason reason)
Parameters
reasonConnectionFailedReason
OnConnectRequest(NetworkConnectionRequest)
void OnConnectRequest(NetworkConnectionRequest request)
Parameters
requestNetworkConnectionRequest
OnConnectedToServer()
void OnConnectedToServer()
OnDisconnectedFromServer(TransportDisconnectReason)
void OnDisconnectedFromServer(TransportDisconnectReason transportDisconnectReason)
Parameters
transportDisconnectReasonTransportDisconnectReason
OnEntityDespawned(Entity)
This is called when an entity has been removed from the simulation.
void OnEntityDespawned(Entity entity)
Parameters
entityEntity
OnEntityMetaChangedPhase1(NetickEntityMeta, byte*, int)
This method is called on the client when it receives new entity meta data. This must be used to create/setup network entities on the client. It can be called many times not only when the data has changed.
Note: user entity meta data can be used for custom user data that might be used in creating entities.
void OnEntityMetaChangedPhase1(NetickEntityMeta netickMeta, byte* userMetaData, int worldIndex)
Parameters
netickMetaNetickEntityMetauserMetaDatabyte*worldIndexint
OnEntityMetaChangedPhase2(NetickEntityMeta, byte*, int)
void OnEntityMetaChangedPhase2(NetickEntityMeta netickMeta, byte* userMetaData, int worldIndex)
Parameters
netickMetaNetickEntityMetauserMetaDatabyte*worldIndexint
OnEntityMetaChangedPhase3(NetickEntityMeta, byte*, int)
void OnEntityMetaChangedPhase3(NetickEntityMeta netickMeta, byte* userMetaData, int worldIndex)
Parameters
netickMetaNetickEntityMetauserMetaDatabyte*worldIndexint
OnEntitySpawned(Entity)
This is called when a new entity has been added to the simulation.
void OnEntitySpawned(Entity entity)
Parameters
entityEntity
OnInput()
void OnInput()
OnMatchListUpdate(List<Session>)
void OnMatchListUpdate(List<Session> sessions)
Parameters
OnPeerConnected(NetworkConnection)
void OnPeerConnected(NetworkConnection connection)
Parameters
connectionNetworkConnection
OnPeerDisconnected(NetworkConnection, TransportDisconnectReason)
void OnPeerDisconnected(NetworkConnection connection, TransportDisconnectReason transportDisconnectReason)
Parameters
connectionNetworkConnectiontransportDisconnectReasonTransportDisconnectReason
OnPlayerConnected(NetworkPlayer)
void OnPlayerConnected(NetworkPlayer player)
Parameters
playerNetworkPlayer
OnPlayerDisconnected(NetworkPlayer, TransportDisconnectReason)
void OnPlayerDisconnected(NetworkPlayer player, TransportDisconnectReason transportDisconnectReason)
Parameters
playerNetworkPlayertransportDisconnectReasonTransportDisconnectReason
OnPlayerJoined(NetworkPlayerId)
void OnPlayerJoined(NetworkPlayerId player)
Parameters
playerNetworkPlayerId
OnPlayerLeft(NetworkPlayerId)
void OnPlayerLeft(NetworkPlayerId player)
Parameters
playerNetworkPlayerId
OnReceiveData(NetworkConnection, byte, byte*, int, TransportDeliveryMethod)
void OnReceiveData(NetworkConnection sender, byte id, byte* data, int len, TransportDeliveryMethod transportDeliveryMethod)
Parameters
senderNetworkConnectionidbytedatabyte*leninttransportDeliveryMethodTransportDeliveryMethod
OnUnlinkedEntityDespawned(Entity)
This is called when an unliked entity has been removed from the simulation.
void OnUnlinkedEntityDespawned(Entity entity)
Parameters
entityEntity
PopulateEntityMeta(Entity)
This is used to populate the user meta data for an entity.
void PopulateEntityMeta(Entity entity)
Parameters
entityEntity
SetLocalUserDataForReplayConnection(int*)
void SetLocalUserDataForReplayConnection(int* data)
Parameters
dataint*
SyncTransformsToColliders()
void SyncTransformsToColliders()