1234567891011121314151617181920212223242526272829303132 |
- #pragma once
- #include <Welt2D.h>
- using namespace Framework;
- class Pixel : public Object2D
- {
- private:
- float ep;
- int pixelId;
- struct PixelDataSave
- {
- float rSpeed;
- Vertex pos;
- Vertex speed;
- float rotation;
- float oldEp;
- };
- PixelDataSave backup;
- public:
- Pixel( Vertex pos, Vertex speed, float ep, int id );
- bool tick( const WeltInfo &info, double zeit ) override;
- void render( Mat3< float > &kamMat, Bild &zRObj, const char *kamName ) override;
- Rect2< float > getBoundingBox() const override;
- float getEp() const;
- int getId() const;
- bool isDead() const;
- void save();
- void load();
- };
|