Minor code tweaks

This commit is contained in:
Kayne Ruse
2014-08-17 11:46:02 +10:00
parent e7ba097e6a
commit 0fdaa90a83
4 changed files with 5 additions and 17 deletions
+1 -8
View File
@@ -82,20 +82,13 @@ CleanUp::~CleanUp() {
void CleanUp::Update(double delta) {
if (std::chrono::steady_clock::now() - startTick > std::chrono::duration<int>(10)) {
QuitEvent();
SetNextScene(SceneList::MAINMENU);
}
//BUGFIX: Eat incoming packets
while(network.Receive());
}
void CleanUp::RenderFrame() {
SDL_FillRect(GetScreen(), 0, 0);
Render(GetScreen());
SDL_Flip(GetScreen());
fps.Calculate();
}
void CleanUp::Render(SDL_Surface* const screen) {
backButton.DrawTo(screen);
font.DrawStringTo("You have been disconnected.", screen, 50, 30);