daily pastebin goal
58%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 114 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. #include <game/screenmanager.h>
  2. #include <game/game.h>
  3. #include <game/screen.h>
  4.  
  5. namespace engine{
  6.  
  7. ScreenManager::ScreenManager(Screen *s)
  8. {
  9.     currentScreen = s;
  10. }
  11.  
  12. void ScreenManager::init(Game *g)
  13. {
  14.     game = g;
  15.     currentScreen->init(this);
  16. }
  17.  
  18. Game* ScreenManager::getGame()
  19. {
  20.     return game;
  21. }
  22.  
  23. void ScreenManager::setScreen(Screen *s)
  24. {
  25.     currentScreen = s;
  26.     currentScreen->init(this);
  27. }
  28.  
  29. Screen* ScreenManager::getScreen()
  30. {
  31.     return currentScreen;
  32. }
  33.  
  34. void ScreenManager::update(float deltaTime)
  35. {
  36.     currentScreen->update(deltaTime);
  37. }
  38.  
  39. void ScreenManager::render()
  40. {
  41.     currentScreen->render();
  42. }
  43. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top