Bariere.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include "GameObject.h"
  3. #include "Team.h"
  4. #include "Timer.h"
  5. class Bariere : public GameObject
  6. {
  7. public:
  8. class Style
  9. {
  10. public:
  11. const static int AutoSchaltung = 0x1;
  12. const static int AutoVerschiebung = 0x2;
  13. const static int InSchaltung = 0x4;
  14. const static int InVerschiebung = 0x8;
  15. const static int VerschiebungWaagerecht = 0x10;
  16. const static int NextVerschiebungLinksOben = 0x20;
  17. const static int Aktiv = 0x40;
  18. };
  19. private:
  20. int style;
  21. int autoSchaltungMaxTime;
  22. float autoSchaltungCurrentTime;
  23. int verschiebungWeite;
  24. float currentWeite;
  25. int verschiebungAnzahl;
  26. int schaltungAnzahl;
  27. int id;
  28. Team *team;
  29. public:
  30. Bariere( int id, int x, int y, int breite, int height, int style, int verschiebungWeite = 0, int autoSchaltungMaxTime = 0, Team *team = 0 );
  31. ~Bariere();
  32. void setStyle( int style, bool add );
  33. void setAutoVerschiebungWeite( int pixel );
  34. void startAutoVerschiebung();
  35. void setAutoSchaltungMaxTime( int seconds );
  36. void startAutoSchaltung();
  37. void setTeam( Team *team );
  38. void tick( double time );
  39. bool hatStyle( int style ) const;
  40. int getVerschiebungAnzahl() const;
  41. int getSchaltungAnzahl() const;
  42. Team *getTeam() const;
  43. Team *zTeam() const;
  44. };