TemplateGame.h 899 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef TemplateGame_H_
  2. #define TemplateGame_H_
  3. #include "gameplay.h"
  4. using namespace gameplay;
  5. /**
  6. * Main game class.
  7. */
  8. class TemplateGame: public Game
  9. {
  10. public:
  11. /**
  12. * Constructor.
  13. */
  14. TemplateGame();
  15. /**
  16. * @see Game::keyEvent
  17. */
  18. void keyEvent(Keyboard::KeyEvent evt, int key);
  19. /**
  20. * @see Game::touchEvent
  21. */
  22. void touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
  23. protected:
  24. /**
  25. * @see Game::initialize
  26. */
  27. void initialize();
  28. /**
  29. * @see Game::finalize
  30. */
  31. void finalize();
  32. /**
  33. * @see Game::update
  34. */
  35. void update(float elapsedTime);
  36. /**
  37. * @see Game::render
  38. */
  39. void render(float elapsedTime);
  40. private:
  41. /**
  42. * Draws the scene each frame.
  43. */
  44. bool drawScene(Node* node);
  45. Scene* _scene;
  46. bool _wireframe;
  47. };
  48. #endif