LoadSceneSample.h 679 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 drawScene(Node* node);
  22. Font* _font;
  23. Scene* _scene;
  24. bool _wireFrame;
  25. };
  26. #endif