Created
October 4, 2018 20:13
-
-
Save ChristianHohlfeld/22a2046c150b0975ada3d0695782a6b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void HelloWorld::update(float dt) { | |
if (std::stoi(localProperties.GetProperty("IS_GAMESERVER"))) { | |
UpdateServer(dt); | |
} | |
else { | |
UpdateClient(dt); | |
} | |
//update game state | |
if(serverGameObject != nullptr){ | |
serverGameObject->setSpritePosition(server->getReceivedXPos(), server->getReceivedYPos()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment