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-2023 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 {
26namespace engine {
27class Scene {
28 public:
29 explicit Scene(Application& app);
30 Scene() : m_application(nullptr) {}
31
32 virtual ~Scene() {}
33
36
37 virtual void Init() = 0;
38 virtual void Update(float deltaTime) = 0;
39 virtual void Ui(float deltaTime) = 0;
40 virtual void Render(float deltaTime) = 0;
41
42 private:
44};
45
46class EmptyScene : public Scene {
47 public:
48 explicit EmptyScene(Application& app);
49
50 void Init();
51 void Update(float deltaTime);
52 void Ui(float deltaTime);
53 void Render(float deltaTime);
54};
55} // namespace engine
56} // namespace cqsp
Definition: assetmanager.h:145
Definition: application.h:47
Definition: scene.h:46
void Init()
Definition: scene.cpp:27
void Ui(float deltaTime)
Definition: scene.cpp:31
EmptyScene(Application &app)
Definition: scene.cpp:25
void Update(float deltaTime)
Definition: scene.cpp:29
void Render(float deltaTime)
Definition: scene.cpp:33
Definition: scene.h:27
cqsp::asset::AssetManager & GetAssetManager()
Definition: scene.cpp:23
virtual void Update(float deltaTime)=0
Application * m_application
Definition: scene.h:43
virtual void Init()=0
Application & GetApp()
Definition: scene.h:34
virtual ~Scene()
Definition: scene.h:32
virtual void Render(float deltaTime)=0
virtual void Ui(float deltaTime)=0
Scene()
Definition: scene.h:30
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:21