hx3d
1
2D/3D Simple Game Framework
|
Color fading transition. More...
#include <fade_transition.hpp>
Public Member Functions | |
FadeTransition (window::Game *game, Color color=Color::Black) | |
Create a fading transition with a color. More... | |
virtual void | render (Batch &batch, Framebuffer ¤tFB, Framebuffer &nextFB) override |
Render the transition. More... | |
virtual void | onUpdate (float delta) override |
On transition update callback. More... | |
virtual void | onDone () override |
On transition done callback. | |
virtual void | onStart () override |
On transition start callback. | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
float | _duration |
Duration in seconds. | |
float | _currentTime |
Current time in seconds. | |
bool | _running |
Is the transition running. | |
window::Game * | _game |
Current game. | |
Color fading transition.
Definition at line 33 of file fade_transition.hpp.
hx3d::graphics::FadeTransition::FadeTransition | ( | window::Game * | game, |
Color | color = Color::Black |
||
) |
Create a fading transition with a color.
game | Game (Raw ptr) |
color | Color |
Definition at line 31 of file fade_transition.cpp.
|
overridevirtual |
On transition update callback.
delta | Delta time |
Reimplemented from hx3d::graphics::Transition.
Definition at line 68 of file fade_transition.cpp.
|
overridevirtual |
Render the transition.
batch | Batch |
currentFB | Current framebuffer |
nextFB | Next framebuffer |
Implements hx3d::graphics::Transition.
Definition at line 35 of file fade_transition.cpp.