timer derived from interpolate | Example | Source | Header |
Messages |
duration | float | set timer duration |
start | [bool] | start timer moving forward from zero |
stop | stop timer | |
forward | move timer forward | |
reverse | [bool] | move timer backward |
front | move timer to the front | |
back | move timer to the back |
Events |
front | the timer has reached the front | |
back | the timer has reached the back | |
end | the timer has reached one extreme |
Comments |
constructor timer
destructor ~timer
method reset
1 reset position
2 set duration to 1
3 set inactive
4 set direction to forward
method message
1 set timer duration
2 start timer moving forward from zero
3 stop timer
4 move timer forward
5 move timer backward
6 move timer to the front
7 move timer to the back
method app
1 if active
1.1 if reverse subtract frame time, else add
1.2 if timer is at an extreme
1.2.1 if direction is reverse1.3 calculate interpolated array values
1.1 the timer has reached the front
1.1 the timer has reached the back
1.1 the timer has reached one extreme