Timer.h 826 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "GameObject.h"
  3. class Timer : public GameObject
  4. {
  5. private:
  6. Text name;
  7. bool runns;
  8. bool pause;
  9. int farbe;
  10. int maxZeit;
  11. float currentTime;
  12. bool autoWiederhohlung;
  13. bool sichtbar;
  14. public:
  15. Timer( const char *name, int maxZeit, int x, int y, bool visible = 1, bool autoWiederhohlung = 0, bool runns = 0, int farbe = 0xFFFFFFFF );
  16. void start( bool restart = 0 );
  17. void setPause( bool pause );
  18. void setMaxZeit( int sekunden );
  19. void setAutoWiederhohlung( bool wiederhohlung );
  20. void setSichtbar( bool visible );
  21. void setFarbe( int farbe );
  22. bool tick( double time );
  23. bool istSichtbar() const;
  24. int getFarbe() const;
  25. bool isRunning() const;
  26. bool istPausiert() const;
  27. int getMaxTime() const;
  28. bool istAutoWiederhohlung() const;
  29. };