JugiMap Framework
Scene Class Referenceabstract

The Scene class is the base class for the application scenes. More...

#include <jmScene.h>

Public Member Functions

 Scene ()
 Constructor. More...
 
void SetInitialized (bool _initialized)
 Set a flag that indicated if this scene has been initialized. More...
 
bool IsInitialized ()
 Returns true if this scene has been initialized; otherwise returns false. More...
 
EngineSceneGetEngineScene ()
 Returns the engine scene object of this scene. More...
 
std::vector< Map * > & GetMaps ()
 Returns a reference to the vector of stored maps. More...
 
SourceGraphicsLoadAndAddSourceGraphics (const std::string &_filePath)
 Load a new SourceGraphics object from the given file *_filePath* and store it in this scene. More...
 
MapLoadAndAddMap (const std::string &_filePath, SourceGraphics *_sourceGraphics, MapType _mapType, int _mapZOrder=-1)
 Load a new Map object from the given file *_filePath* and store it in this scene. More...
 
MapAddMap (const std::string &_name, MapType _mapType, int _mapZOrder=-1)
 Add a new empty Map object to this scene. More...
 
std::vector< SourceGraphics * > & GetSourceGraphics ()
 Returns a reference to the vector of stored source graphics. More...
 

Protected Member Functions

virtual ~Scene ()
 Destructor. More...
 

Detailed Description

The Scene class is the base class for the application scenes.

Constructor & Destructor Documentation

◆ Scene()

Scene ( )

Constructor.

◆ ~Scene()

~Scene ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ SetInitialized()

void SetInitialized ( bool  _initialized)
inline

Set a flag that indicated if this scene has been initialized.

◆ IsInitialized()

bool IsInitialized ( )
inline

Returns true if this scene has been initialized; otherwise returns false.

◆ GetEngineScene()

EngineScene* GetEngineScene ( )
inline

Returns the engine scene object of this scene.

◆ GetMaps()

std::vector<Map*>& GetMaps ( )
inline

Returns a reference to the vector of stored maps.

◆ LoadAndAddSourceGraphics()

SourceGraphics * LoadAndAddSourceGraphics ( const std::string &  _filePath)

Load a new SourceGraphics object from the given file *_filePath* and store it in this scene.

Parameters
_filePathThe path of the Jugimap source graphic file exported from the editor. The function returns a link pointer to the added source graphics object.

◆ LoadAndAddMap()

Map * LoadAndAddMap ( const std::string &  _filePath,
SourceGraphics _sourceGraphics,
MapType  _mapType,
int  _mapZOrder = -1 
)

Load a new Map object from the given file *_filePath* and store it in this scene.

Parameters
_filePathThe path of the Jugimap map file exported from the editor.
_sourceGraphicsThe source graphics of this map.
_mapTypeThe map type.
_mapZOrderThe starting zOrder value of the map. The default value -1 means that the zOrder will be obtained automaticaly. Do not manually specify the zOrder unless you have a lot of maps in the scene. The function returns a link pointer to the added map object.

◆ AddMap()

Map * AddMap ( const std::string &  _name,
MapType  _mapType,
int  _mapZOrder = -1 
)

Add a new empty Map object to this scene.

Parameters
_nameThe map name.
_mapTypeThe map type.
_mapZOrderThe starting zOrder value of the map. The default value -1 means that the zOrder will be obtained automaticaly. Do not manually specify the zOrder unless you have a lot of maps in the scene. The function returns a link pointer to the added map object.

◆ GetSourceGraphics()

std::vector<SourceGraphics*>& GetSourceGraphics ( )
inline

Returns a reference to the vector of stored source graphics.


The documentation for this class was generated from the following files: