|
@@ -1,23 +1,46 @@
|
|
#pragma once
|
|
#pragma once
|
|
|
|
|
|
#include "GameObject.h"
|
|
#include "GameObject.h"
|
|
|
|
+#include "Team.h"
|
|
|
|
+#include "Timer.h"
|
|
|
|
|
|
class Bariere : public GameObject
|
|
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:
|
|
private:
|
|
- bool ü = true;
|
|
|
|
- bool schaltung = false;
|
|
|
|
- bool verschieben = false;
|
|
|
|
- bool oben = false;
|
|
|
|
- bool links = false;
|
|
|
|
- int zufallv = 0;
|
|
|
|
- int zufalls = 0;
|
|
|
|
- bool ver = false;
|
|
|
|
- bool sch = false;
|
|
|
|
- int verw = 0;
|
|
|
|
- bool verwaag = false;
|
|
|
|
- int versch = 0;
|
|
|
|
- int schalt = 0;
|
|
|
|
- int team;
|
|
|
|
- bool w = false;
|
|
|
|
|
|
+ int style;
|
|
|
|
+ int autoSchaltungMaxTime;
|
|
|
|
+ float autoSchaltungCurrentTime;
|
|
|
|
+ int verschiebungWeite;
|
|
|
|
+ float currentWeite;
|
|
|
|
+ int verschiebungAnzahl;
|
|
|
|
+ int schaltungAnzahl;
|
|
|
|
+ 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;
|
|
};
|
|
};
|