Class SceneManager

Page Contents

Class Documentation

class SceneManager

Scene Manager. You can get it from Engine.

See
Engine.

Public Functions

SceneManager()

Construct a new Scene Manager object.

void addScene(std::shared_ptr<Node> scene)

Add node to scene manager.

Parameters
  • node: Node to add.

void removeSceneImmediately(const std::string &name)

Remove node with a name immediately. This method is not a safe for deleting.

Parameters
  • name: Name of scene to delete.

void removeScene(const std::string &name)

Add node to erasing queue. Queues a node for deletion at the next frame. When deleted, all of its child nodes will be deleted as well. This method ensures it’s safe to delete the node.

Parameters
  • name: Name of scene to delete.

void activateScene(const std::string &name)

Activate scene with a name. Activated scene will be displaying on a next tick.

Parameters
  • name: Name of scene.

int getSceneCount() const

Get the Scenes Count.

Return
int Scenes Count

void clear()

Safely remove and notify all scenes.

void update(int deltaInMs)

Update logic of engine.

Parameters
  • deltaInMs: delta time from previous update in milliseconds

void render()

Render and Display scene.

void input(sf::Event event)

Process input events from SFML.

Parameters
  • event: input event.