Merge branch 'GameLogic' of https://github.com/dean11/Danbias into GameServer
This commit is contained in:
commit
77932ecce7
|
@ -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:
|
||||||
|
|
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue