Refactoring. Client and server has Update Loop that runs before any game logic each frame.
This commit is contained in:
@@ -25,6 +25,7 @@ public:
|
||||
Client();
|
||||
~Client();
|
||||
void Start(World* world, EventBroker* eventBroker);
|
||||
void Update();
|
||||
void Close();
|
||||
private:
|
||||
void ReadFromServer();
|
||||
@@ -56,6 +57,9 @@ private:
|
||||
unsigned int m_PreviousPacketID = 0;
|
||||
unsigned int m_SendPacketID = 0;
|
||||
|
||||
// Game Logic
|
||||
std::vector<unsigned int> m_PlayersToCreate;
|
||||
|
||||
World* m_World;
|
||||
int m_PlayerID = -1;
|
||||
glm::vec2 m_PlayerPositions[MAXCONNECTIONS];
|
||||
|
||||
Reference in New Issue
Block a user