Danbias/Code/Game/DanBiasGame/GameClientState/NetLoadState.cpp

58 lines
957 B
C++
Raw Normal View History

2014-02-14 14:32:17 +01:00
#include "NetLoadState.h"
#include "NetworkClient.h"
using namespace ::DanBias::Client;
using namespace ::Oyster;
using namespace ::Oyster::Network;
struct NetLoadState::MyData
{
MyData() {}
GameClientState::ClientState nextState;
NetworkClient *nwClient;
};
NetLoadState::NetLoadState(void) {}
NetLoadState::~NetLoadState(void)
{
if( this->privData )
this->Release();
}
bool NetLoadState::Init( NetworkClient* nwClient )
{
this->privData = new MyData();
this->privData->nextState = GameClientState::ClientState_Same;
this->privData->nwClient = nwClient;
return true;
}
GameClientState::ClientState NetLoadState::Update(float deltaTime, InputClass* KeyInput)
{
return this->privData->nextState;
}
bool NetLoadState::Render()
{
return true;
}
bool NetLoadState::Release()
{
if( this->privData )
{
this->privData = NULL;
}
return true;
}
void NetLoadState::ChangeState( ClientState next )
{
this->privData->nextState = next;
}