forked from G-A-I-N/gainlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Timer.h
44 lines (35 loc) · 948 Bytes
/
Timer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* Timer.h
*
* Created on: 11 Dec 2014
* Author: Ville
*/
#ifndef TIMER_H_
#define TIMER_H_
#include "Base.h"
namespace Gain {
class Timer: public Gain::Base {
private:
typedef Gain::Base super;
public:
Timer();
virtual ~Timer();
virtual void updateG(float time, float deltaTime) ;
virtual bool setupGraphics() ;
virtual bool initVariables() ;
virtual void render() const {};
virtual void enableAttributes() const {};
virtual void disableAttributes() const {};
virtual void setIntervalCount(float interval, unsigned int count, bool autoStart=true);
virtual void setInterval(float interval, bool autoStart=true);
virtual void setOneShot(float time, bool autoStart=true);
virtual void stop();
virtual void start();
protected:
float pTimerOriginal;
float pTimerLeft;
unsigned int pRunning;
unsigned int pRunningCount;
};
} /* namespace Gain */
#endif /* TIMER_H_ */