UGDK
0.5.0
|
A game scene, or screen. More...
#include <ugdk/action/scene.h>
Public Member Functions | |
Scene () | |
virtual | ~Scene () |
virtual void | Focus () |
Method called when this Scene arrives on the top of the Scene stack. More... | |
virtual void | DeFocus () |
Method called when this Scene leaves the top of the Scene stack. More... | |
virtual void | OnPushed (int index) |
Method called when this scene is pushed to the Engine's Scene stack. More... | |
void | Finish () |
Finishes the scene. More... | |
void | StopsPreviousMusic (bool set) |
Whether this scene stops the previous music even if wont play any music. More... | |
void | Update (double delta_t) |
Logical update of the scene. More... | |
void | Render (graphic::Canvas &) const |
Renders the scene to the given canvas if the scene is visible. More... | |
void | set_render_function (const std::function< void(graphic::Canvas &canvas)> &render_function) |
Getters and Setters | |
const std::string & | identifier () const |
void | set_identifier (const std::string &new_identifier) |
bool | finished () const |
bool | active () const |
void | set_active (bool is_active) |
bool | visible () const |
void | set_visible (bool is_visible) |
MediaManager & | media_manager () |
const MediaManager & | media_manager () const |
system::EventHandler & | event_handler () |
const system::EventHandler & | event_handler () const |
audio::Music * | background_music () const |
void | set_background_music (audio::Music *music) |
Public Member Functions inherited from ugdk::system::TaskPlayer | |
TaskPlayer () | |
virtual | ~TaskPlayer () |
void | AddTask (const Task &task) |
Adds a task to the scene. More... | |
void | Update (double delta_t) |
Executes all tasks held. More... | |
Protected Member Functions | |
virtual void | End () |
Ends the scene activity. More... | |
A game scene, or screen.
Represents a scene, containing various graphical layers and sprites. A scene is game screen, such as a menu, or the playable part itself.
ugdk::action::Scene::Scene | ( | ) |
|
virtual |
|
inline |
|
inline |
|
virtual |
|
protectedvirtual |
Ends the scene activity.
Note: do not release any resources in this method.
|
inline |
|
inline |
void ugdk::action::Scene::Finish | ( | ) |
Finishes the scene.
|
inline |
|
virtual |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Method called when this scene is pushed to the Engine's Scene stack.
Reimplemented in ugdk::action::mode3d::Scene3D.
void ugdk::action::Scene::Render | ( | graphic::Canvas & | ) | const |
Renders the scene to the given canvas if the scene is visible.
Uses the configurated renderfunction.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Whether this scene stops the previous music even if wont play any music.
void ugdk::action::Scene::Update | ( | double | delta_t | ) |
Logical update of the scene.
delta_t | Time in seconds since last update |
|
inline |