LoadSceneSample.h 681 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef LOADSCENESAMPLE_H_
  2. #define LOADSCENESAMPLE_H_
  3. #include "gameplay.h"
  4. #include "Sample.h"
  5. using namespace gameplay;
  6. /**
  7. * Sample for loading a scene from a .scene file.
  8. */
  9. class LoadSceneSample : public Sample
  10. {
  11. public:
  12. LoadSceneSample();
  13. void touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
  14. void keyEvent(Keyboard::KeyEvent evt, int key);
  15. protected:
  16. void initialize();
  17. void finalize();
  18. void update(float elapsedTime);
  19. void render(float elapsedTime);
  20. private:
  21. bool initializeMaterials(Node* node);
  22. bool drawScene(Node* node);
  23. Font* _font;
  24. Scene* _scene;
  25. bool _wireFrame;
  26. };
  27. #endif