| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

SandboxGame.h
Go to the documentation of this file.
1 #pragma once
2
3 #include "Game.h"
4
5 namespace Sandbox
6 {
10 class Game : public Fling::Game
11 {
16 void Init(entt::registry& t_Reg) override;
17
18 /* Called when the engine is shutting down */
19 void Shutdown(entt::registry& t_Reg) override;
20
24 void Update(entt::registry& t_Reg, float DeltaTime) override;
25
29 void OnQuitPressed();
30
31 /* Creates a 3D array of meshes */
32 void GenerateTestMeshes(entt::registry& t_Reg);
33
34 void PrintFPS() const;
35
36 void LightingTest(entt::registry& t_Reg);
37
38 void ScriptingTest(entt::registry& t_Reg);
39
40 /* Toggles the visibility of the cursor */
41 void ToggleCursorVisibility();
42
43 /* Sets window mode of screen, for testing all possible transitions */
44 void SetWindowFullscreen();
45 void SetWindowBorderlessWindowed();
46 void SetWindowWindowed();
47
48 private:
49
50 bool m_DoRotations = false;
51 bool m_MovePointLights = false;
52 bool m_RunLua = true;
53
54 void ToggleRotation();
55
56 void OnTestSpawn();
57
58 void OnToggleMoveLights();
59
60 void ToggleLua();
61
62 void SetWindowIcon();
63
65 glm::vec3 MoveDelta = {};
66
67 };
68 } // namespace Sandbox
Sandbox::Game::ToggleRotation
void ToggleRotation()
Definition: SandboxGame.cpp:300
Sandbox::Game::OnToggleMoveLights
void OnToggleMoveLights()
Definition: SandboxGame.cpp:281
Sandbox::Game::SetWindowFullscreen
void SetWindowFullscreen()
Definition: SandboxGame.cpp:326
Sandbox::Game::LightingTest
void LightingTest(entt::registry &t_Reg)
Definition: SandboxGame.cpp:122
Sandbox::Game::SetWindowBorderlessWindowed
void SetWindowBorderlessWindowed()
Definition: SandboxGame.cpp:335
Sandbox::Game::GenerateTestMeshes
void GenerateTestMeshes(entt::registry &t_Reg)
Sandbox::Game::OnQuitPressed
void OnQuitPressed()
Callback for when the user has given input that shows they want to exit.
Definition: SandboxGame.cpp:74
Sandbox::Game::MoveDelta
glm::vec3 MoveDelta
Temp vector for keeping track of the movement of things.
Definition: SandboxGame.h:65
Sandbox::Game::ScriptingTest
void ScriptingTest(entt::registry &t_Reg)
Definition: SandboxGame.cpp:252
Sandbox::Game::SetWindowIcon
void SetWindowIcon()
Definition: SandboxGame.cpp:291
Sandbox::Game::OnTestSpawn
void OnTestSpawn()
Definition: SandboxGame.cpp:305
Game.h
Fling::Game
The game class is mean to be overridden on a per-game instance.
Definition: Game.h:16
Sandbox::Game::SetWindowWindowed
void SetWindowWindowed()
Definition: SandboxGame.cpp:344
Sandbox
Definition: SandboxEditor.h:5
Fling::Game::Init
virtual void Init(entt::registry &t_Reg)=0
Called before the first Update tick.
Definition: SandboxGame.cpp:25
Sandbox::Game::ToggleLua
void ToggleLua()
Definition: SandboxGame.cpp:286
Sandbox::Game::m_DoRotations
bool m_DoRotations
Definition: SandboxGame.h:50
Sandbox::Game::ToggleCursorVisibility
void ToggleCursorVisibility()
Definition: SandboxGame.cpp:271
Fling::Game::Shutdown
virtual void Shutdown(entt::registry &t_Reg)=0
Definition: SandboxGame.cpp:69
Sandbox::Game::m_MovePointLights
bool m_MovePointLights
Definition: SandboxGame.h:51
Sandbox::Game::m_RunLua
bool m_RunLua
Definition: SandboxGame.h:52
Sandbox::Game::PrintFPS
void PrintFPS() const
Definition: SandboxGame.cpp:320
Fling::Game::Update
virtual void Update(entt::registry &t_Reg, float DeltaTime)=0
Update is called every frame.
Definition: SandboxGame.cpp:80