droidworld.h 724 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef __DROIDWORLD__
  2. #define __DROIDWORLD__
  3. #include "droidobject.h"
  4. #define GENERAL_GRAVITY_POWER 0.01f
  5. class DroidWorld
  6. {
  7. public:
  8. DroidWorld( float w, float h);
  9. ~DroidWorld();
  10. void prepeare();
  11. void release();
  12. void draw();
  13. void run( float secsPassed );
  14. void setMyTransform( DroidObject *o );
  15. DroidObject *addObject( DroidObject *object );
  16. void releaseAll();
  17. // Images
  18. VGImage imageBall;
  19. VGImage imageAsteroid;
  20. protected:
  21. struct SDObjectCapsule
  22. {
  23. DroidObject *obj;
  24. SDObjectCapsule *next;
  25. };
  26. SDObjectCapsule *objectList;
  27. // Screen size
  28. float width, height;
  29. };
  30. #endif