Gamedev Framework (gf)  0.17.0
A C++14 framework for 2D games
Public Member Functions | List of all members
gf::Segue Class Reference

A transition between two scenes. More...

#include <gf/Segue.h>

Inheritance diagram for gf::Segue:
Inheritance graph
[legend]

Public Member Functions

 Segue ()
 Contructor. More...
 
void start (Time time)
 Start the segue for a specified time. More...
 
void stop ()
 Stop the segue. More...
 
void update (Time time)
 Update the segue. More...
 
bool isActive ()
 Tell if the segue is still active. More...
 
void setTextures (const Texture &texture0, const Texture &texture1)
 Set the two texture for the segue. More...
 
void setEffect (SegueEffect &effect)
 Set the effect to apply. More...
 
void setEasing (Easing easing)
 Set the easing for the segue. More...
 
virtual void draw (RenderTarget &target, const RenderStates &states) override
 Draw the object to a render target. More...
 
- Public Member Functions inherited from gf::Drawable
virtual ~Drawable ()
 Virtual desctructor. More...
 

Detailed Description

A transition between two scenes.

See also
Segue - Wikipedia

Constructor & Destructor Documentation

◆ Segue()

gf::Segue::Segue ( )

Contructor.

Member Function Documentation

◆ draw()

virtual void gf::Segue::draw ( RenderTarget target,
const RenderStates states 
)
overridevirtual

Draw the object to a render target.

This is a pure virtual function that has to be implemented by the derived class to define how the drawable should be drawn.

Parameters
targetRender target to draw to
statesCurrent render states

Implements gf::Drawable.

◆ isActive()

bool gf::Segue::isActive ( )
inline

Tell if the segue is still active.

Returns
True if the segue is not finished

◆ setEasing()

void gf::Segue::setEasing ( Easing  easing)
inline

Set the easing for the segue.

Parameters
easingThe new easing

◆ setEffect()

void gf::Segue::setEffect ( SegueEffect effect)
inline

Set the effect to apply.

Parameters
effectThe post-processing effect

◆ setTextures()

void gf::Segue::setTextures ( const Texture texture0,
const Texture texture1 
)

Set the two texture for the segue.

Parameters
texture0The old scene
texture1The new scene

◆ start()

void gf::Segue::start ( Time  time)

Start the segue for a specified time.

Parameters
timeThe time of the segue

◆ stop()

void gf::Segue::stop ( )

Stop the segue.

◆ update()

void gf::Segue::update ( Time  time)

Update the segue.

Parameters
timeThe time since the last update