TextureSample.h 671 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef TEXTURESAMPLE_H_
  2. #define TEXTURESAMPLE_H_
  3. #include "gameplay.h"
  4. #include "Sample.h"
  5. using namespace gameplay;
  6. /**
  7. * Sample the creating and drawing with textures with different modes.
  8. */
  9. class TextureSample : public Sample
  10. {
  11. public:
  12. TextureSample();
  13. void touchEvent(Touch::TouchEvent evt, int x, int y, unsigned int contactIndex);
  14. protected:
  15. void initialize();
  16. void finalize();
  17. void update(float elapsedTime);
  18. void render(float elapsedTime);
  19. private:
  20. bool drawScene(Node* node);
  21. Font* _font;
  22. Scene* _scene;
  23. float _zOffset;
  24. std::list<Font::Text*> _text;
  25. };
  26. #endif