Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
AScene.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "Engine.hpp"
6
7namespace Scene::Utils {
8class AScene {
9 public:
10 AScene(void) = default;
11 virtual ~AScene() = default;
12
18 virtual void Load(Engine::Core &core) final { _onCreate(core); }
19
25 virtual void Unload(Engine::Core &core) final { _onDestroy(core); }
26
27 protected:
28 virtual void _onCreate(Engine::Core &core) = 0;
29
30 virtual void _onDestroy(Engine::Core &core) = 0;
31};
32} // namespace Scene::Utils
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
virtual ~AScene()=default
virtual void Load(Engine::Core &core) final
Method used to instantiate new entities with their components.
Definition AScene.hpp:18
virtual void _onCreate(Engine::Core &core)=0
AScene(void)=default
virtual void Unload(Engine::Core &core) final
Method used to destroy all entities and their components.
Definition AScene.hpp:25
virtual void _onDestroy(Engine::Core &core)=0
Definition AScene.hpp:7