1234567891011121314151617181920212223242526272829 |
- #pragma once
- #include <Model2D.h>
- using namespace Framework;
- class Asteroid : public Model2DObject
- {
- private:
- int id;
- struct AsteroidDataSave
- {
- float rSpeed;
- Vertex pos;
- Vertex speed;
- float rotation;
- };
- AsteroidDataSave backup;
- bool alive;
- public:
- Asteroid( int id, Vertex pos, Vertex speed, float rot, float rotS, Model2DData *m2d, Textur2D *textur );
- Asteroid *split( Vertex pos, Vertex speed, __int64 seed, int asteroidId );
- bool tick( const WeltInfo &info, double zeit ) override;
- void save();
- void load();
- void setDead();
- bool isDead() const;
- int getId() const;
- };
|