12345678910111213141516171819202122232425262728293031323334353637 |
- #pragma once
- #include "GameObject.h"
- class Spiel;
- class Timer : public GameObject
- {
- private:
- int id;
- Text name;
- bool runns;
- bool pause;
- int farbe;
- int maxZeit;
- float currentTime;
- bool autoWiederhohlung;
- bool sichtbar;
- public:
- Timer( int id, const char *name, int maxZeit, int x, int y, bool visible = 1, bool autoWiederhohlung = 0, bool runns = 0, int farbe = 0xFFFFFFFF );
- void start( Spiel *zSpiel, bool restart = 0 );
- void setPause( bool pause );
- void setMaxZeit( int sekunden );
- void setAutoWiederhohlung( bool wiederhohlung );
- void setSichtbar( bool visible );
- void setFarbe( int farbe );
- void tick( double time, Spiel *zSpiel );
- float getTimeLeft() const;
- bool istSichtbar() const;
- int getFarbe() const;
- bool isRunning() const;
- bool istPausiert() const;
- int getMaxTime() const;
- bool istAutoWiederhohlung() const;
- int getId() const;
- };
|