UGDK
|
A game scene, or screen. More...
#include <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] |
void ugdk::action::Scene::AddEntity | ( | Entity * | entity | ) |
Adds an Entity to the scene.
void ugdk::action::Scene::AddTask | ( | Task * | task | ) |
Adds a Task to the scene.
Music* ugdk::action::Scene::background_music | ( | ) | const [inline] |
graphic::Node* ugdk::action::Scene::content_node | ( | ) | [inline] |
const graphic::Node* ugdk::action::Scene::content_node | ( | ) | const [inline] |
void ugdk::action::Scene::DeFocus | ( | ) | [virtual] |
Method called when this Scene leaves the top of the Scene stack.
Reimplemented in ugdk::action::SceneProxy.
void ugdk::action::Scene::End | ( | ) | [protected, virtual] |
Ends the scene activity.
Note: do not release any resources in this method.
Reimplemented in ugdk::action::SceneProxy.
void ugdk::action::Scene::Finish | ( | ) | [inline] |
Finishes the scene.
bool ugdk::action::Scene::finished | ( | ) | const [inline] |
void ugdk::action::Scene::Focus | ( | ) | [virtual] |
Method called when this Scene arrives on the top of the Scene stack.
Reimplemented in ugdk::action::SceneProxy.
graphic::Node* ugdk::action::Scene::interface_node | ( | ) | [inline] |
const graphic::Node* ugdk::action::Scene::interface_node | ( | ) | const [inline] |
void ugdk::action::Scene::QueuedAddEntity | ( | Entity * | entity | ) | [inline] |
Will be added at the end of the.
void ugdk::action::Scene::RemoveEntity | ( | Entity * | entity | ) | [inline] |
Removes the specified Entity from the scene.
void ugdk::action::Scene::set_background_music | ( | Music * | music | ) | [inline] |
void ugdk::action::Scene::set_defocus_callback | ( | std::tr1::function< void(Scene *)> | defocus_callback | ) | [inline] |
void ugdk::action::Scene::set_focus_callback | ( | std::tr1::function< void(Scene *)> | focus_callback | ) | [inline] |
void ugdk::action::Scene::StopsPreviousMusic | ( | bool | set | ) | [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 class Engine [friend] |
Music* ugdk::action::Scene::background_music_ [protected] |
The background music when this scene is on top.
bool ugdk::action::Scene::finished_ [protected] |
Tells whether scene is finished or not.