#ifndef SpielObjekt_H #define SpielObjekt_H #include #include #include "../Team/Team.h" #include "../Karte/Strukturen.h" #include #include #include "../Schuss/Laser.h" #include "../Spieler/DeadPlayer.h" #include using namespace Framework; class SpielObjekt : public Model2DObject { private: struct ObjektDataSave { float rSpeed; Vertex pos; Vertex speed; float rotation; bool amLeben; double akkuAbk; double repAbk; double energie; double stabilität; double reparatur; double akkuLeistung; double maxEnergie; double maxStabilität; int level; } last; int id; int style; double stabilität; double energie; double maxStabilität; double maxEnergie; int energieRadius; double reparatur; double akkuLeistung; double repAbk; double akkuAbk; bool amLeben; int level; float ep; float nextSkillEp; Team *zteam; TextFeld *nText; DeadPlayer *deadPlayer; public: // Konstruktor SpielObjekt( ObjektStr *zStr, UIInit &uiFactory ); // Destruktor ~SpielObjekt(); // nicht constant void setTextur( Bild *textur ); void setTeam( Team *zTeam ); bool tick( const WeltInfo &info, double zeit ) override; void render( Mat3 &kamMat, Bild &zRObj, const char *kamName ) override; void nimmSchaden( double &intensity, int sLevel ); void addEp( float ep ); DeadPlayer *sterben(); void calcDeadPlayerObject( Laser *zSchuss ); void save(); void load(); // constant Team *zTeam() const; bool doesShotAddEp() const; int getLevel() const; int getObjektId() const; }; #endif