Hummingbird Framework
 All Classes Functions Variables Modules Pages
hb::Game::Scene Class Reference

Scene of a Game. More...

#include <Game.h>

Inheritance diagram for hb::Game::Scene:

Public Member Functions

 Scene (const std::string &name, std::function< void(void)> &&init)
 Class constructor. More...
 
 Scene (const Scene &other)
 Copy constructor of Scene. More...
 
 Scene (Scene &&other)
 Move constructor of Scene. More...
 
 ~Scene ()
 Class destructor.
 
void init ()
 Called when Scene is being set.
 
void exit ()
 Called when Scene is being unset (Game is changing the current Scene or Game is ending).
 
const std::string & getName () const
 Get Scene's name.
 
void setExit (std::function< void(void)> &&exit)
 Set Scene's exit function.
 

Protected Attributes

std::function< void(void)> m_init
 
std::function< void(void)> m_exit
 
std::string m_name
 

Detailed Description

Scene of a Game.

This class should initialize the GameObjects that participate in this Scene, set global values, etc.

Constructor & Destructor Documentation

hb::Game::Scene::Scene ( const std::string &  name,
std::function< void(void)> &&  init 
)

Class constructor.

Parameters
nameName of the Scene. It must be unique per Game.
initFunction to be executed when the Scene is set.
hb::Game::Scene::Scene ( const Scene other)

Copy constructor of Scene.

Parameters
otherOriginal Scene
hb::Game::Scene::Scene ( Scene &&  other)

Move constructor of Scene.

Parameters
otherOriginal Scene

The documentation for this class was generated from the following file: