#pragma once #include "GameObject.h" #include "Team.h" #include "Timer.h" class Spiel; class Bariere : public GameObject { public: class Style { public: const static int AutoSchaltung = 0x1; const static int AutoVerschiebung = 0x2; const static int InSchaltung = 0x4; const static int InVerschiebung = 0x8; const static int VerschiebungWaagerecht = 0x10; const static int NextVerschiebungLinksOben = 0x20; const static int Aktiv = 0x40; }; private: int style; int autoSchaltungMaxTime; float autoSchaltungCurrentTime; int verschiebungWeite; float currentWeite; int verschiebungAnzahl; int schaltungAnzahl; int id; Team *team; public: Bariere( int id, int x, int y, int breite, int height, int style, int verschiebungWeite = 0, int autoSchaltungMaxTime = 0, Team * team = 0 ); ~Bariere(); void setStyle( int style, bool add, Spiel *zSpiel ); void setAutoVerschiebungWeite( int pixel ); void startAutoVerschiebung( Spiel *zSpiel ); void setAutoSchaltungMaxTime( int seconds ); void startAutoSchaltung( Spiel *zSpiel ); void setTeam( Team *team ); void tick( double time, Spiel *zSpiel ); bool hatStyle( int style ) const; int getVerschiebungAnzahl() const; int getSchaltungAnzahl() const; int getId() const; Team *getTeam() const; Team *zTeam() const; };