Meteor2D  dev internal
Meteor is a lightweight 2D game engine.
Loading...
Searching...
No Matches
meteor::MScene Class Reference

A scene holds a collection of spatial entity for a specific level. More...

#include <scene.h>

Inheritance diagram for meteor::MScene:

Public Member Functions

 MScene ()
 Constructor.
 
void startScene ()
 Invoked when scene loads.
 
void update (float deltaTime)
 Invoked once per frame.
 
void onClose ()
 Invoked during scene unload.
 
void addToRoot (MSpatialEntity *entity)
 Adds a SpatialEntity to the scene root.
 
size_t getRootSize ()
 Returns size of root.
 
std::vector< MSpatialEntity * > * getRootEntities ()
 Return a list of root entities.
 
bool tryParse (pugi::xml_document *doc)
 Tries to parse and load a scene state.
 
bool isClosing ()
 
template<typename T >
T * find (std::string name)
 Finds a Spatial Entity within this scene.
 
- Public Member Functions inherited from meteor::MEntity
virtual bool equals (MEntity *other)
 Checks equality between two entities.
 
std::string getName ()
 
void setName (std::string name)
 Sets name of entity.
 
virtual std::string toString ()
 Get this object as a string.
 

Static Public Attributes

static const std::string VALID_SCENE_FILE_XML_TAG
 

Friends

class Spatial
 

Additional Inherited Members

- Protected Attributes inherited from meteor::MEntity
std::string name
 

Detailed Description

A scene holds a collection of spatial entity for a specific level.

Constructor & Destructor Documentation

◆ MScene()

meteor::MScene::MScene ( )

Constructor.

Parameters
deltaTime

Member Function Documentation

◆ isClosing()

bool meteor::MScene::isClosing ( )
inline
Returns
true when a scene is closing