SpriteBatchSample.h 594 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef SPRITEBATCHSAMPLE_H_
  2. #define SPRITEBATCHSAMPLE_H_
  3. #include "gameplay.h"
  4. #include "Sample.h"
  5. using namespace gameplay;
  6. /**
  7. * Sample drawing many quad sprites with SpriteBatch.
  8. */
  9. class SpriteBatchSample : public Sample
  10. {
  11. public:
  12. SpriteBatchSample();
  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. Font* _font;
  21. SpriteBatch* _spriteBatch;
  22. Matrix _worldViewProjectionMatrix;
  23. };
  24. #endif