Merge branch 'GameLogic' of https://github.com/dean11/Danbias into GameServer

This commit is contained in:
Dennis Andersen 2014-01-30 14:59:38 +01:00
commit 77932ecce7
2 changed files with 9 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include <Protocols.h> #include <Protocols.h>
#include "NetworkClient.h" #include "NetworkClient.h"
#include "Camera.h" #include "Camera.h"
#include <GameServerAPI.h>
using namespace DanBias::Client; using namespace DanBias::Client;
@ -143,6 +144,7 @@ bool GameState::InitCamera(Oyster::Math::Float3 startPos)
GameClientState::ClientState GameState::Update(float deltaTime, InputClass* KeyInput) GameClientState::ClientState GameState::Update(float deltaTime, InputClass* KeyInput)
{ {
DanBias::GameServerAPI::ServerUpdate();
switch (privData->state) switch (privData->state)
{ {
case gameStateState_loading: case gameStateState_loading:

View File

@ -4,6 +4,7 @@
#include "C_obj/C_Player.h" #include "C_obj/C_Player.h"
#include "C_obj/C_StaticObj.h" #include "C_obj/C_StaticObj.h"
#include "C_obj/C_DynamicObj.h" #include "C_obj/C_DynamicObj.h"
#include <GameServerAPI.h>
using namespace DanBias::Client; using namespace DanBias::Client;
@ -86,9 +87,14 @@ GameClientState::ClientState LobbyState::Update(float deltaTime, InputClass* Key
// update animation // update animation
// send data to server // send data to server
// check data from server // check data from server
DanBias::GameServerAPI::ServerUpdate();
if( KeyInput->IsKeyPressed(DIK_G)) if( KeyInput->IsKeyPressed(DIK_G))
return ClientState_Game; {
DanBias::GameServerAPI::GameStart();
return ClientState_Game;
}
return ClientState_Same; return ClientState_Same;
} }
bool LobbyState::Render() bool LobbyState::Render()