Class · aurore

aurore::Ticking

On this page
aurore/core/time.hpp
#include <aurore/core/time.hpp>

class aurore::Ticking

Constructors 1

virtual ~Ticking()

Functions 5

void start()

Starts the ticking, pushing it to the list of running tickings. If the ticking is finished, it will be restarted. If the ticking is already running, this method will have no effect.

time.hpp:134
void stop()

Stops the ticking if it was running, and executes the end callback.

time.hpp:139
void setEndCallback(TickingEndCallback endCallback)

Sets a callback to be executed when the ticking finishes. The callback argument will be set to true if the ticking stopped on its own, false if it was stopped early by the user.

time.hpp:147
void setTickCallback(TickingTickCallback tickCallback)

Sets a callback to be executed at every tick until the ticking finishes.

The last animation tick will execute the tick callback then the end callback.

time.hpp:156
bool isRunning()

Returns true if the ticking is currently running.

time.hpp:161

Static functions 1

static void updateTickings()

Called internally by the main loop. Takes all running tickings and updates them.

time.hpp:167

Static attributes 1

static std::vector< Ticking * > runningTickings

Protected functions 3

virtual bool onUpdate(Time delta) =0

Executed every frame while the ticking lives. Delta is the time difference in ms between the last frame and the current one. Must return false if the ticking is finished and should be removed from the list of active tickings. The end callback will automatically be called then.

time.hpp:180
virtual void onStart()

Called when the ticking becomes active.

time.hpp:185
virtual void onStop()

Called when the ticking is stopped, either by the user or because it finished.

time.hpp:191

Read from Aurore's headers by Doxygen at each build · library/include