UGDK
0.4.1
|
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. | |
virtual void | DeFocus () |
Method called when this Scene leaves the top of the Scene stack. | |
void | AddEntity (Entity *entity) |
Adds an Entity to the scene. | |
void | RemoveEntity (Entity *entity) |
Removes the specified Entity from the scene. | |
void | QueuedAddEntity (Entity *entity) |
Will be added at the end of the. | |
void | RemoveAllEntities () |
void | AddTask (Task *task) |
Adds a Task to the scene. | |
void | Finish () |
Finishes the scene. | |
void | Update (double delta_t) |
Logical update of the scene. | |
void | StopsPreviousMusic (bool set) |
Whether this scene stops the previous music even if wont play any music. | |
void | set_defocus_callback (std::tr1::function< void(Scene *)> defocus_callback) |
void | set_focus_callback (std::tr1::function< void(Scene *)> focus_callback) |
Getters and Setters | |
bool | finished () const |
graphic::Node * | content_node () |
const graphic::Node * | content_node () const |
graphic::Node * | interface_node () |
const graphic::Node * | interface_node () const |
Music * | background_music () const |
void | set_background_music (Music *music) |
Protected Member Functions | |
virtual void | End () |
Ends the scene activity. | |
Protected Attributes | |
bool | finished_ |
Tells whether scene is finished or not. | |
Music * | background_music_ |
The background music when this scene is on top. | |
Friends | |
class | Engine |
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 |
|
inline |
|
virtual |
|
protectedvirtual |
Ends the scene activity.
Note: do not release any resources in this method.
|
inline |
Finishes the scene.
|
inline |
|
virtual |
|
inline |
|
inline |
|
inline |
Will be added at the end of the.
void ugdk::action::Scene::RemoveAllEntities | ( | ) |
|
inline |
Removes the specified Entity from the scene.
|
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 |
|
friend |
|
protected |
The background music when this scene is on top.
|
protected |
Tells whether scene is finished or not.