2014-01-07 10:26:09 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// Created by [Dennis Andersen] [2013]
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef DANBIASSERVER_CLIENT_OBJECT_H
|
|
|
|
#define DANBIASSERVER_CLIENT_OBJECT_H
|
|
|
|
|
|
|
|
#include "..\LobbySessions\LobbyClient.h"
|
|
|
|
#include <PostBox\PostBox.h>
|
2014-01-20 15:47:52 +01:00
|
|
|
#include <GameAPI.h>
|
2014-01-07 10:26:09 +01:00
|
|
|
|
|
|
|
namespace DanBias
|
|
|
|
{
|
|
|
|
class GameClient: Oyster::Callback::CallbackObject<void, NetworkSession::NetEvent>
|
|
|
|
{
|
|
|
|
public:
|
2014-01-20 15:47:52 +01:00
|
|
|
GameClient(Utility::DynamicMemory::SmartPointer<LobbyClient> client, GameLogic::IPlayerData* player, Oyster::Callback::OysterCallback<void, NetworkSession::NetEvent> value);
|
2014-01-07 10:26:09 +01:00
|
|
|
virtual~GameClient();
|
|
|
|
|
|
|
|
void SetCallback(Oyster::Callback::OysterCallback<void, NetworkSession::NetEvent> value);
|
|
|
|
|
2014-01-15 11:03:25 +01:00
|
|
|
/* */
|
2014-01-20 15:47:52 +01:00
|
|
|
GameLogic::IPlayerData* GetPlayer();
|
2014-01-15 11:03:25 +01:00
|
|
|
|
2014-01-20 15:47:52 +01:00
|
|
|
GameLogic::IPlayerData* ReleasePlayer();
|
2014-01-13 12:44:33 +01:00
|
|
|
|
|
|
|
LobbyClient* GetClient() const;
|
|
|
|
Utility::DynamicMemory::SmartPointer<LobbyClient> ReleaseClient();
|
|
|
|
int GetID() const;
|
2014-01-07 10:26:09 +01:00
|
|
|
|
|
|
|
private:
|
2014-01-13 12:44:33 +01:00
|
|
|
//Utility::DynamicMemory::SmartPointer<GameLogic::Player> player;
|
2014-01-20 15:47:52 +01:00
|
|
|
GameLogic::IPlayerData* player;
|
2014-01-07 10:26:09 +01:00
|
|
|
Utility::DynamicMemory::SmartPointer<LobbyClient> client;
|
|
|
|
Oyster::Callback::OysterCallback<void, NetworkSession::NetEvent> callbackValue;
|
2014-01-13 12:44:33 +01:00
|
|
|
int id;
|
2014-01-07 10:26:09 +01:00
|
|
|
void ObjectCallback(NetworkSession::NetEvent) override;
|
2014-01-13 12:44:33 +01:00
|
|
|
|
2014-01-07 10:26:09 +01:00
|
|
|
private:
|
|
|
|
friend class AdminInterface;
|
|
|
|
};
|
|
|
|
|
|
|
|
}//End namespace DanBias
|
|
|
|
#endif // !DANBIASSERVER_CLIENT_OBJECT_H
|