GluonEngine::Scene Class Reference

The second level in the GameObject hierarchy. More...

#include <scene.h>

Inheritance diagram for GluonEngine::Scene:
GluonEngine::Asset GluonEngine::Savable GluonCore::GluonObject QObject

List of all members.

Public Member Functions

Q_INVOKABLE Scene (QObject *parent=0)
 ~Scene ()
virtual void setFile (const QUrl &newFile)
virtual void setName (const QString &newName)
virtual void resetScene ()
virtual QString contentsToGDL ()
Q_INVOKABLE
GluonEngine::GameObject
sceneContents ()

Detailed Description

The second level in the GameObject hierarchy.

The representation of scenes in a game as found in GluonEngine based games. It is simply an Asset which provides a tree of GameObjects and Components which comprise a scene in the game. Examples of what would be a scene are things such as an intro, a menu, a level in a game. An example of something you would not normally use a Scene for is an in-game menu; for this you would use a Prefab.

Note:
To get the current scene in a game, see the Game::currentScene property

Definition at line 44 of file scene.h.


Constructor & Destructor Documentation

Scene::Scene ( QObject parent = 0  ) 

Definition at line 31 of file scene.cpp.

Scene::~Scene (  ) 

Definition at line 38 of file scene.cpp.


Member Function Documentation

QString Scene::contentsToGDL (  )  [virtual]

Return a GDL representation of the scene's contents (that is, the GluonObject hierarchy which makes up the scene tree)

Returns:
A GDL representation of the scene tree

Implements GluonEngine::Savable.

Definition at line 66 of file scene.cpp.

void Scene::resetScene (  )  [virtual]

If the scene's content is loaded, reload it from disk. Otherwise do nothing.

Definition at line 57 of file scene.cpp.

GameObject * Scene::sceneContents (  ) 

Return a reference to the scene tree itself (meaning the GluonObject hierarchy which makes up the scene)

Definition at line 72 of file scene.cpp.

void Scene::setFile ( const QUrl &  newFile  )  [virtual]

Set the file for this scene, extending with support for checking for dirtiness (that is, to ensure data is not lost upon resetting the scene's filename)

Parameters:
newFile The new file for the scene

Reimplemented from GluonEngine::Asset.

Definition at line 44 of file scene.cpp.

void Scene::setName ( const QString &  newName  )  [virtual]

Set the new name of the scene.

Parameters:
newName The new name to be set for the scene

Reimplemented from GluonEngine::Asset.

Definition at line 51 of file scene.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Dec 27 13:13:43 2010 for Gluon by  doxygen 1.6.3