![]() |
Gorgon Game Engine
|
This class is the most basic controller and does not support any operations. More...
Public Member Functions | |
virtual | ~Timer () |
virtual unsigned | GetProgress () const override final |
Returns the current progress of the timer. More... | |
virtual bool | IsControlled () const override final |
This method allows clients to determine if the progress is controlled. More... | |
virtual void | Progress (unsigned timepassed) override final |
Progresses this timer by moving the timer timepassed milliseconds forwards. More... | |
virtual void | Reset () override |
Resets the timer, basically starting the animation from the start. More... | |
virtual void | SetProgress (unsigned progress) |
Sets the progress of the timer to the given value. More... | |
![]() | |
ControllerBase () | |
Default constructor. More... | |
ControllerBase (Governor &governor) | |
virtual | ~ControllerBase () |
Destructor. More... | |
virtual void | Add (Base &animation) |
This function attaches the given animation to this controller. More... | |
void | AutoDestruct () |
Set a flag that will automatically destroy this controller whenever it has no animations left to control. More... | |
virtual void | Delete (Base &animation) |
Deletes the given animation. More... | |
void | Keep () |
Resets the flag that will automatically destroy this controller whenever it has no animations left to control. More... | |
virtual void | Remove (Base &animation) |
Removes the given animation. More... | |
virtual void | SetGovernor (Governor &governor) |
Changes the governor of this controller. More... | |
Protected Attributes | |
unsigned | progress |
Amount of time passed since the start of the animation. More... | |
![]() | |
Containers::Collection< Base > | animations |
List of animations this controller holds. More... | |
bool | collectable |
Whether this controller should be collected by the garbage collector when its task is finished. More... | |
Governor * | governor |
This class is the most basic controller and does not support any operations.
It linearly progresses animation and never stops. Most animations are expected loop under these circumstances. See Controller for additional functionality.
|
virtual |
|
finaloverridevirtual |
|
finaloverridevirtual |
This method allows clients to determine if the progress is controlled.
If the progress is not controlled, there is no way to force the animation to stop. Therefore, animations with looping capabilities should wrap around to start over. However, if the timer is a controller then the best strategy will be to stop at the end, and return the leftover time. This way, controller can decide what to do next.
Implements ControllerBase.
|
finaloverridevirtual |
Progresses this timer by moving the timer timepassed milliseconds forwards.
Implements ControllerBase.
References ControllerBase::animations, and Timer::progress.
|
overridevirtual |
Resets the timer, basically starting the animation from the start.
Implements ControllerBase.
References Timer::progress.
|
virtual |
Sets the progress of the timer to the given value.
References Timer::progress.
|
protected |
Amount of time passed since the start of the animation.