Data.h 924 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #pragma once
  2. #include <Bild.h>
  3. #include "Schuss.h"
  4. #include "Ship.h"
  5. #include "Asteroid.h"
  6. class GameData : public virtual ReferenceCounter
  7. {
  8. protected:
  9. Welt2D *world;
  10. RCArray< Schuss > *schuss;
  11. Ship *ship;
  12. RCArray< Asteroid > *asteroid;
  13. Model2DData **aData;
  14. Model2DData **sData;
  15. int shipN;
  16. int score;
  17. int scoreCheck;
  18. int breite;
  19. int höhe;
  20. int aGröße;
  21. int mTimer;
  22. int maxTimer;
  23. double timer;
  24. bool beendet;
  25. bool rend;
  26. double gameTime;
  27. Critical cs;
  28. RandomGenerator *rGen;
  29. char tastenStände;
  30. virtual Asteroid *createNewAsteroid();
  31. public:
  32. // Konstructor
  33. GameData( const char *shipM2, const char *asteroidsM2 );
  34. // Destructor
  35. virtual ~GameData();
  36. // nicht constant
  37. virtual void reset( Text *zOptionen );
  38. virtual bool tick( double t );
  39. // constant
  40. int getScore() const;
  41. bool istBeendet() const;
  42. };