Laser.h 796 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef Laser_H
  2. #define Laser_H
  3. #include <Vec2.h>
  4. #include <Bild.h>
  5. #include <Welt2D.h>
  6. using namespace Framework;
  7. class Karte;
  8. class Laser : public Object2D
  9. {
  10. private:
  11. int id;
  12. double intensität;
  13. double startIntensität;
  14. int tf;
  15. int sNum;
  16. // privat
  17. char getOutCode( Punkt& p, Bild &zrObj ) const;
  18. public:
  19. // Konstruktor
  20. Laser( int id, Vec2< double > pos, Vec2< double > speed, int sNum, double intensität, int tf );
  21. // nicht constant
  22. Rect2< float > getBoundingBox() const;
  23. bool tick( const WeltInfo &info, double tv ) override;
  24. void render( Mat3< float > &kamMat, Bild &zRObj ) override;
  25. // constant
  26. int getId() const;
  27. int getSpieler() const;
  28. double getIntensität( Vec2< double > targetSpeed ) const;
  29. // Reference Counting
  30. Laser *getThis();
  31. Laser *release();
  32. };
  33. #endif