Asteroid.h 660 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include <Model2D.h>
  3. using namespace Framework;
  4. class Asteroid : public Model2DObject
  5. {
  6. private:
  7. int id;
  8. struct AsteroidDataSave
  9. {
  10. float rSpeed;
  11. Vertex pos;
  12. Vertex speed;
  13. float rotation;
  14. };
  15. AsteroidDataSave backup;
  16. bool alive;
  17. public:
  18. Asteroid( int id, Vertex pos, Vertex speed, float rot, float rotS, Model2DData *m2d, Textur2D *textur );
  19. Asteroid *split( Vertex pos, Vertex speed, __int64 seed, int asteroidId );
  20. bool tick( const WeltInfo &info, double zeit ) override;
  21. void save();
  22. void load();
  23. void setDead();
  24. bool isDead() const;
  25. int getId() const;
  26. };