Wise&mystical
1.0
Project about Europe
Toggle main menu visibility
Main Page
Related Pages
Modules
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
i
m
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
c
g
m
n
o
r
s
t
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
g
k
m
n
p
r
s
t
v
Enumerator
a
b
c
d
f
g
h
k
l
m
n
o
p
r
s
t
v
Macros
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
▼
Wise&mystical
LICENSE
Deprecated List
►
Modules
►
Classes
▼
Files
▼
File List
▼
Game
▼
_build
►
animations.cpp
►
animations.h
►
cityOperations.cpp
►
cityOperations.h
►
game.cpp
►
game.h
►
main.cpp
►
manageActiveText.cpp
►
manageActiveText.h
►
menu.cpp
►
menu.h
►
movement.cpp
►
movement.h
►
quizLogic.cpp
►
quizLogic.h
►
timer.cpp
►
timer.h
►
travelLogic.cpp
►
travelLogic.h
►
raylib-master
html
►
File Members
•
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
Loading...
Searching...
No Matches
timer.cpp
Go to the documentation of this file.
1
#include "
raylib.h
"
2
#include "
timer.h
"
3
7
void
StartTimer
(
Timer
* timer,
float
lifetime)
8
{
9
if
(timer !=
NULL
)
10
{
11
timer->
Lifetime
= lifetime;
12
}
13
}
14
18
void
UpdateTimer
(
Timer
* timer)
19
{
20
// Subtract this frame from the timer if it's not allready expired
21
if
(timer !=
NULL
&& timer->
Lifetime
> 0)
22
{
23
timer->
Lifetime
-=
GetFrameTime
();
24
}
25
}
26
30
bool
TimerDone
(
Timer
* timer)
31
{
32
if
(timer !=
NULL
)
33
{
34
return
timer->
Lifetime
<= 0;
35
}
36
37
return
false
;
38
}
NULL
#define NULL
Definition:
miniaudio.h:3718
raylib.h
GetFrameTime
RLAPI float GetFrameTime(void)
Definition:
rcore.c:2717
Timer
Definition:
timer.h:5
Timer::Lifetime
float Lifetime
Definition:
timer.h:6
StartTimer
void StartTimer(Timer *timer, float lifetime)
Start or restart a timer with a specific lifetime.
Definition:
timer.cpp:7
UpdateTimer
void UpdateTimer(Timer *timer)
Update a timer with the current frame time.
Definition:
timer.cpp:18
TimerDone
bool TimerDone(Timer *timer)
Check if a timer is done.
Definition:
timer.cpp:30
timer.h
Game
_build
timer.cpp
Generated by
1.9.5