UGDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
ugdk::action::Scene Class Reference

A game scene, or screen. More...

#include <scene.h>

Inheritance diagram for ugdk::action::Scene:
Inheritance graph
[legend]
Collaboration diagram for ugdk::action::Scene:
Collaboration graph
[legend]

List of all members.

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::Nodecontent_node ()
const graphic::Nodecontent_node () const
graphic::Nodeinterface_node ()
const graphic::Nodeinterface_node () const
Musicbackground_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.
Musicbackground_music_
 The background music when this scene is on top.

Friends

class Engine

Detailed Description

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.


Constructor & Destructor Documentation


Member Function Documentation

Adds an Entity to the scene.

Adds a Task to the scene.

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.

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_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.

Parameters:
delta_tTime in seconds since last update

Friends And Related Function Documentation

friend class Engine [friend]

Member Data Documentation

The background music when this scene is on top.

Tells whether scene is finished or not.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines