diff --git a/Code/Game/DanBiasGame/GameClientState/NetLoadState.cpp b/Code/Game/DanBiasGame/GameClientState/NetLoadState.cpp new file mode 100644 index 00000000..4c1f711c --- /dev/null +++ b/Code/Game/DanBiasGame/GameClientState/NetLoadState.cpp @@ -0,0 +1,58 @@ +#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; +} \ No newline at end of file diff --git a/Code/Game/DanBiasGame/GameClientState/NetLoadState.h b/Code/Game/DanBiasGame/GameClientState/NetLoadState.h new file mode 100644 index 00000000..f147bfe8 --- /dev/null +++ b/Code/Game/DanBiasGame/GameClientState/NetLoadState.h @@ -0,0 +1,29 @@ +#ifndef DANBIAS_CLIENT_NETLOADSTATE_H +#define DANBIAS_CLIENT_NETLOADSTATE_H + +#include "GameClientState.h" +#include "NetworkClient.h" + +namespace DanBias +{ + namespace Client + { + class NetLoadState : public GameClientState + { + private: + struct MyData; + ::Utility::DynamicMemory::UniquePointer privData; + public: + NetLoadState( ); + virtual ~NetLoadState( ); + + bool Init( Oyster::Network::NetworkClient* nwClient ); + ClientState Update( float deltaTime, InputClass* KeyInput ); + + bool Render(); + bool Release(); + void ChangeState( ClientState next ); + }; + } +} +#endif // ! DANBIAS_CLIENT_LOGINSTATE_H \ No newline at end of file