Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
scene.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2025 Conquer Space
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include "engine/application.h"
20#include "engine/engine.h"
21
22// This was already included in application.h, but this is needed to be included again for some reason.
23#include "common/universe.h"
24
25namespace cqsp::engine {
26class Scene {
27 public:
28 explicit Scene(Application& app);
29 Scene() : m_application(nullptr) {}
30
31 virtual ~Scene() {}
32
35
36 virtual void Init() = 0;
37 virtual void Update(float deltaTime) = 0;
38 virtual void Ui(float deltaTime) = 0;
39 virtual void Render(float deltaTime) = 0;
40
41 private:
43};
44
45class EmptyScene : public Scene {
46 public:
47 explicit EmptyScene(Application& app);
48
49 void Init();
50 void Update(float deltaTime);
51 void Ui(float deltaTime);
52 void Render(float deltaTime);
53};
54} // namespace cqsp::engine
Definition: assetmanager.h:46
Definition: application.h:48
Definition: scene.h:45
void Init()
Definition: scene.cpp:28
void Ui(float deltaTime)
Definition: scene.cpp:32
EmptyScene(Application &app)
Definition: scene.cpp:26
void Update(float deltaTime)
Definition: scene.cpp:30
void Render(float deltaTime)
Definition: scene.cpp:34
Definition: scene.h:26
virtual void Update(float deltaTime)=0
cqsp::asset::AssetManager & GetAssetManager()
Definition: scene.cpp:24
Application * m_application
Definition: scene.h:42
virtual void Init()=0
Application & GetApp()
Definition: scene.h:33
virtual ~Scene()
Definition: scene.h:31
virtual void Render(float deltaTime)=0
virtual void Ui(float deltaTime)=0
Scene()
Definition: scene.h:29
Definition: application.cpp:55