celGameClientManager Class Reference
This is an interface you should implement in order to manage the events from the client. More...
#include <physicallayer/network.h>
Public Member Functions | |
virtual void | PlayerValidated (celPlayer *player)=0 |
The data of the player has been validated by the server. | |
virtual void | HandleServerEvent (celServerEventType event_type, csTicks event_time, iCelDataBuffer *event_data)=0 |
A server event has been catched. | |
virtual iCelEntity * | CreateNetworkLinkTarget (celNetworkLinkType link_type, csTicks creation_time, iCelPersistentDataList *creation_data, bool player_controlled)=0 |
A network link has been set up on the server side between a server entity and this client. | |
virtual void | NetworkLinkControlChanged (iCelEntity *entity, bool player_controlled)=0 |
There is a change in the way the entity is controlled, ie if it is controlled by the client or by the server side. | |
virtual void | NetworkLinkRemoved (csTicks deletion_time, iCelEntity *entity)=0 |
The network link to the specified entity is closing. | |
virtual void | LevelChanged (celGameInfo *new_game)=0 |
The level has changed. | |
virtual void | ClientEnd ()=0 |
The client will be closed. |
Detailed Description
This is an interface you should implement in order to manage the events from the client.You can use it to:
- listen for changes in the state of the network connection to the server.
- get the data of the player validated by the server.
- catch the server events.
- handle the creation and removing of the network links.
- close the client.
Definition at line 664 of file network.h.
Member Function Documentation
|
The client will be closed. You should delete here the physical layer of the client. |
|
A network link has been set up on the server side between a server entity and this client. A copy entity must be created on this client side. This copy entity will be the adressee of the updates from the network link. If the server is available in the same process, you can simply use the entity of the server and then return 0 to this function.
|
|
A server event has been catched.
|
|
The level has changed. The client need to do iCelGameClient::SetReady when the new level is loaded. |
|
There is a change in the way the entity is controlled, ie if it is controlled by the client or by the server side. If the entity is now controlled on the client side, you should then set a behavior to it. Most presumably, the behavior will catch the actions of the player and update accordingly the entity. If the entity is now controlled on the server side, you should then remove any behavior from the entity and let the client update it from the server.
|
|
The network link to the specified entity is closing. The client can remove the entity from the physical layer. |
|
The data of the player has been validated by the server.
|
The documentation for this class was generated from the following file:
- physicallayer/network.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4