Ship.h 993 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef Ship_H
  2. #define Ship_H
  3. #include <Model2D.h>
  4. #include <Datei.h>
  5. using namespace Framework;
  6. class Schuss;
  7. class Asteroid;
  8. class Ship
  9. {
  10. private:
  11. Model2D *ship;
  12. Vec2< float > pos;
  13. Vec2< float > speed;
  14. Vertex stL;
  15. Vertex kL;
  16. Vertex stR;
  17. Vertex kR;
  18. Vertex stM;
  19. Vertex kM;
  20. float rSpeed;
  21. int ref;
  22. public:
  23. // Konstruktor
  24. Ship( Model2DData *data, Vec2< float > p, Vec2< float > s, float r );
  25. // Destruktor
  26. ~Ship();
  27. // nicht constant
  28. void setTexture( Textur2D *zFlammenM, Textur2D *zFlammenL, Textur2D *zFlammenR, Bild *textur );
  29. void setPRS( Vec2< float > p, Vec2< float > s, float r, float rSpeed );
  30. bool tick( double zeit, int breite, int höhe, char tastenStände );
  31. void render( Bild &zRObj );
  32. // constant
  33. void save( Datei *zD ) const;
  34. Schuss *getSchuss() const;
  35. bool istTod( Asteroid *zA ) const;
  36. Punkt getKamPos( int breite, int höhe ) const;
  37. Punkt getPos() const;
  38. // Reference Counting
  39. Ship *getThis();
  40. Ship *release();
  41. };
  42. #endif