refactored the whole game
This commit is contained in:
1 parent
317450833e
commit
ea01f5a78b
31 files changed
+750
-48
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#include "types.h"
|
||||
|
||||
int newTimer(Timer* timer, float elapsedTime) {
|
||||
if (timer->activated == 0) {
|
||||
timer->time1 = GetTime() + elapsedTime; // + 2 für Timer von 2 Sekunden
|
||||
timer->activated = 1;
|
||||
}
|
||||
|
||||
timer->time2 = GetTime();
|
||||
if (timer->time1 <= timer->time2) {
|
||||
timer->activated = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user