58 lines
957 B
C++
58 lines
957 B
C++
|
#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;
|
||
|
}
|