An animation in the background of a field.
More...
#include <Background2DAnimation.h>
An animation in the background of a field.
◆ State
Repetition status of the animation.
Enumerator |
---|
ONCE | The animation must be played once.
|
LOOPED | The animation must loop indefinitely.
|
◆ Background2DAnimation() [1/2]
Background2DAnimation::Background2DAnimation |
( |
const Ogre::String & |
name, |
|
|
Background2D * |
background, |
|
|
const int |
tile_index |
|
) |
| |
Constructor.
- Parameters
-
[in] | name | The animation name. |
[in] | background | The background to animate. |
[in] | tile_index | The tile the animation applies to. |
◆ ~Background2DAnimation()
Background2DAnimation::~Background2DAnimation |
( |
| ) |
|
|
virtual |
◆ Background2DAnimation() [2/2]
Background2DAnimation::Background2DAnimation |
( |
| ) |
|
|
private |
◆ AddTime()
void Background2DAnimation::AddTime |
( |
const float |
time | ) |
|
Adds time, so the animation state is changed according to it.
- Parameters
-
- Todo:
- time is in seconds?
◆ AddUVKeyFrame() [1/3]
void Background2DAnimation::AddUVKeyFrame |
( |
const float |
time, |
|
|
const float |
u1, |
|
|
const float |
v1, |
|
|
const float |
u2, |
|
|
const float |
v2 |
|
) |
| |
|
virtual |
Adds a keyframe to the animation.
- Parameters
-
[in] | time | Time to add the keyframe at. |
[in] | u1 | Animation vector component. |
[in] | v1 | Animation vector component. |
[in] | u2 | Animation vector component. |
[in] | v2 | Animation vector component. |
- Todo:
- time is in seconds?
◆ AddUVKeyFrame() [2/3]
void Background2DAnimation::AddUVKeyFrame |
( |
const float |
time, |
|
|
const Ogre::Vector4 & |
uv |
|
) |
| |
|
virtual |
Adds a keyframe to the animation.
- Parameters
-
[in] | time | Time to add the keyframe at. |
[in] | uv | Animation vector. |
- Todo:
- time is in seconds?
◆ AddUVKeyFrame() [3/3]
Adds a keyframe to the animation.
- Parameters
-
[in] | key_frame | The keyframe to add. |
◆ GetLength()
float Background2DAnimation::GetLength |
( |
| ) |
const |
Retrieves the duration of the animation.
- Returns
- The duration of the animation.
- Todo:
- time is in seconds?
◆ GetName()
const Ogre::String & Background2DAnimation::GetName |
( |
| ) |
const |
Retrieves the animation name.
- Returns
- The animation name.
◆ GetTime()
float Background2DAnimation::GetTime |
( |
| ) |
const |
Retrieves the time the animation has been running.
- Returns
- The time the animation has been running.
- Todo:
- time is in seconds?
◆ SetLength()
void Background2DAnimation::SetLength |
( |
const float |
time | ) |
|
Sets the duration of the animation.
- Parameters
-
[in] | time | The duration of the animation. |
- Todo:
- time is in seconds?
◆ SetTime()
void Background2DAnimation::SetTime |
( |
const float |
time | ) |
|
Sets the time the animation has been running.
- Parameters
-
[in] | time | The time the animation has been running. |
- Todo:
- time is in seconds?
◆ background_
The background the animation belongs to.
◆ length_
float Background2DAnimation::length_ |
|
private |
The duration of the animation.
◆ name_
Ogre::String Background2DAnimation::name_ |
|
private |
◆ tile_index_
int Background2DAnimation::tile_index_ |
|
private |
The index of the tile tha animation applies to.
◆ time_
float Background2DAnimation::time_ |
|
private |
The animation current time.
◆ uv_
The documentation for this class was generated from the following files: