123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #ifndef Laser_H
- #define Laser_H
- #include <Vec2.h>
- #include <Bild.h>
- #include <Welt2D.h>
- using namespace Framework;
- class Karte;
- class Laser : public Object2D
- {
- private:
- struct SaveData
- {
- Vertex pos;
- Vertex speed;
- double intensity;
- };
- int id;
- double intensität;
- double startIntensität;
- int tf;
- int sNum;
- SaveData last;
- // privat
- char getOutCode( Punkt& p, Bild &zrObj ) const;
- public:
- // Konstruktor
- Laser( int id, Vertex pos, Vertex speed, int sNum, double intensität, int tf );
- // nicht constant
- Rect2< float > getBoundingBox() const;
- bool tick( const WeltInfo &info, double tv ) override;
- void render( Mat3< float > &kamMat, Bild &zRObj, const char *kamName ) override;
- void save();
- void load();
- // constant
- int getId() const;
- int getSpieler() const;
- double getIntensität( Vertex targetSpeed ) const;
- // Reference Counting
- Laser *getThis();
- Laser *release();
- };
- #endif
|