#pragma once #include "GameObject.h" #include "Team.h" #include "Timer.h" 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: static int nextId; int style; int autoSchaltungMaxTime; float autoSchaltungCurrentTime; int verschiebungWeite; float currentWeite; int verschiebungAnzahl; int schaltungAnzahl; int id; Team *team; public: Bariere( 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 ); void setAutoVerschiebungWeite( int pixel ); void startAutoVerschiebung(); void setAutoSchaltungMaxTime( int seconds ); void startAutoSchaltung(); void setTeam( Team *team ); void tick( float time ); bool hatStyle( int style ) const; int getVerschiebungAnzahl() const; int getSchaltungAnzahl() const; Team *getTeam() const; Team *zTeam() const; };