#pragma once #include "GameObject.h" #include "Resource.h" class Spiel; class Umlenkung : public GameObject { private: int id; Richtung richtung; bool drehend; bool aktiv; int benutzt; int maxAbklingzeit; float abklingzeitVerbleibend; ResourceRegistry *resources; public: Umlenkung( ResourceRegistry *zResources, int id, int x, int y, int breite, int height, Richtung richtung, int maxAbklingzeit, bool drehend, bool aktiv ); ~Umlenkung(); void setMaxAbklingzeit( int sekunden ); void setAktiv( bool aktiv ); void setDrehend( bool drehend ); void setRichtung( Richtung r ); void addBenutzt( Spiel *zSpiel ); void tick( double time ); void render( Bild &rObj ) override; bool isAktive() const; bool hatAbklingzeit() const; bool istDrehend() const; int getMaxAbklingzeit() const; Richtung getRichtung() const; int getBenutzungen() const; int getId() const; };