mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-21 13:55:10 +00:00
Adding a scene manger and wal functions
This commit is contained in:
31
lib/wal/sources/Scene/SceneManager.cpp
Normal file
31
lib/wal/sources/Scene/SceneManager.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// Created by Zoe Roux on 2021-05-14.
|
||||
//
|
||||
|
||||
#include "SceneManager.hpp"
|
||||
|
||||
namespace WAL
|
||||
{
|
||||
SceneManager &WAL::SceneManager::addScene(WAL::Scene &&scene)
|
||||
{
|
||||
this->_scenes.push_front(scene);
|
||||
return *this;
|
||||
}
|
||||
|
||||
SceneManager &SceneManager::addBackScene(Scene &&scene)
|
||||
{
|
||||
this->_scenes.insert(++this->_scenes.begin(), scene);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Scene &SceneManager::getCurrent()
|
||||
{
|
||||
return this->_scenes.front();
|
||||
}
|
||||
|
||||
SceneManager &SceneManager::closeCurrent()
|
||||
{
|
||||
this->_scenes.pop_front();
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user