LoadSceneSample.h 738 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. bool bindLights(Node* node);
  23. Font* _font;
  24. Scene* _scene;
  25. Node* _lightNode;
  26. bool _wireFrame;
  27. };
  28. #endif