hx3d
1
2D/3D Simple Game Framework
|
Transition between two screens. More...
#include <transition.hpp>
Public Member Functions | |
Transition (window::Game *game) | |
Create a transition. More... | |
void | start () |
Start the transition. | |
void | reset () |
Reset the transition. | |
void | setDuration (float duration) |
Set the transition duration. More... | |
bool | isRunning () const |
Is the transition running. More... | |
bool | isFinished () const |
Is the transition finished. More... | |
void | update (float delta) |
Update the transition. More... | |
virtual void | render (Batch &batch, Framebuffer ¤tFB, Framebuffer &nextFB)=0 |
Render the transition. More... | |
virtual void | onUpdate (float delta) |
On transition update callback. More... | |
virtual void | onDone () |
On transition done callback. | |
virtual void | onStart () |
On transition start callback. | |
Protected Attributes | |
float | _duration |
Duration in seconds. | |
float | _currentTime |
Current time in seconds. | |
bool | _running |
Is the transition running. | |
window::Game * | _game |
Current game. | |
Transition between two screens.
Definition at line 38 of file transition.hpp.
hx3d::graphics::Transition::Transition | ( | window::Game * | game | ) |
bool hx3d::graphics::Transition::isFinished | ( | ) | const |
bool hx3d::graphics::Transition::isRunning | ( | ) | const |
|
virtual |
On transition update callback.
delta | Delta time |
Reimplemented in hx3d::graphics::FadeTransition.
Definition at line 67 of file transition.cpp.
|
pure virtual |
Render the transition.
batch | Batch |
currentFB | Current framebuffer |
nextFB | Next framebuffer |
Implemented in hx3d::graphics::FadeTransition.
void hx3d::graphics::Transition::setDuration | ( | float | duration | ) |
Set the transition duration.
duration | Duration in seconds |
Definition at line 46 of file transition.cpp.
void hx3d::graphics::Transition::update | ( | float | delta | ) |