2013-12-10 11:26:18 +01:00
|
|
|
#ifndef DANBIAS_CLIENT_GAMECLIENTSTATE_H
|
|
|
|
#define DANBIAS_CLIENT_GAMECLIENTSTATE_H
|
|
|
|
|
2013-12-09 09:23:39 +01:00
|
|
|
#define NOMINMAX
|
|
|
|
#include "L_inputClass.h"
|
2013-12-16 09:45:12 +01:00
|
|
|
#include "NetworkClient.h"
|
2013-12-09 09:23:39 +01:00
|
|
|
|
2013-12-06 10:38:43 +01:00
|
|
|
namespace DanBias
|
|
|
|
{
|
|
|
|
namespace Client
|
|
|
|
{
|
|
|
|
|
|
|
|
class GameClientState
|
|
|
|
{
|
|
|
|
public:
|
2013-12-13 12:02:49 +01:00
|
|
|
struct ProtocolStruct
|
|
|
|
{
|
|
|
|
|
|
|
|
};
|
|
|
|
struct ObjPos :public ProtocolStruct
|
|
|
|
{
|
2013-12-17 10:07:46 +01:00
|
|
|
int object_ID;
|
2013-12-13 12:02:49 +01:00
|
|
|
float worldPos[16];
|
|
|
|
};
|
2013-12-18 12:18:01 +01:00
|
|
|
struct NewObj :public ProtocolStruct
|
|
|
|
{
|
|
|
|
int object_ID;
|
|
|
|
char* path;
|
|
|
|
float worldPos[16];
|
|
|
|
};
|
2013-12-18 15:28:47 +01:00
|
|
|
struct RemoveObj :public ProtocolStruct
|
|
|
|
{
|
|
|
|
int object_ID;
|
|
|
|
//particle effect
|
|
|
|
};
|
2013-12-17 13:39:10 +01:00
|
|
|
struct KeyInput :public ProtocolStruct
|
|
|
|
{
|
|
|
|
bool key[6];
|
|
|
|
};
|
2013-12-13 12:02:49 +01:00
|
|
|
struct PlayerPos :public ProtocolStruct
|
|
|
|
{
|
|
|
|
float playerPos[3];
|
|
|
|
};
|
|
|
|
struct PlayerMove :public ProtocolStruct
|
|
|
|
{
|
|
|
|
float playerPos[3];
|
|
|
|
};
|
|
|
|
struct PlayerName :public ProtocolStruct
|
|
|
|
{
|
|
|
|
char name[255];
|
|
|
|
};
|
2013-12-06 10:38:43 +01:00
|
|
|
enum ClientState
|
|
|
|
{
|
2014-01-30 11:58:44 +01:00
|
|
|
ClientState_Login,
|
2013-12-06 10:38:43 +01:00
|
|
|
ClientState_Lobby,
|
2014-01-31 14:14:20 +01:00
|
|
|
ClientState_Lan,
|
2014-01-30 15:20:35 +01:00
|
|
|
ClientState_LobbyCreated,
|
2013-12-06 10:38:43 +01:00
|
|
|
ClientState_Game,
|
|
|
|
ClientState_Same,
|
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
GameClientState(void);
|
|
|
|
virtual ~GameClientState(void);
|
2013-12-16 09:45:12 +01:00
|
|
|
virtual bool Init(Oyster::Network::NetworkClient* nwClient) = 0;
|
2013-12-09 09:23:39 +01:00
|
|
|
virtual ClientState Update(float deltaTime, InputClass* KeyInput) = 0;
|
2014-02-11 15:00:52 +01:00
|
|
|
virtual bool Render(float dt) = 0;
|
2013-12-06 10:38:43 +01:00
|
|
|
virtual bool Release() = 0;
|
2013-12-13 12:02:49 +01:00
|
|
|
virtual void Protocol(ProtocolStruct* protocolStruct) = 0;
|
|
|
|
|
2013-12-06 10:38:43 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2013-12-10 11:26:18 +01:00
|
|
|
#endif
|