Finality Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
SplashScreen.h
Go to the documentation of this file.
1
#pragma once
2
#include <
Finality.h
>
3
#include <memory>
4
5
#include "
MainScene.h
"
6
#include "
BenchmarkScene.h
"
7
9
class
SplashScreen
:
public
FINALITY::Scene
10
{
11
public
:
12
void
OnInit
()
override
{
13
FINALITY::Scene::OnInit
();
14
}
15
16
void
OnUpdate
(
float
ts)
override
{
17
FINALITY::Scene::OnUpdate
(ts);
18
FINALITY::RenderCommand::SetClearColor
(0.0f, 0.0f, 0.2f, 1.0f);
19
20
m_ElapsedTime += ts;
21
if
(m_ElapsedTime >= 3.0f) {
22
auto
next = std::make_unique<BenchmarkScene>();
23
FINALITY::SceneManager::GetInstance
().
SetScene
(std::move(next));
24
FINALITY::SceneManager::GetInstance
().
ChangeScene
();
25
}
26
}
27
28
void
OnDestroy
()
override
{
29
FINALITY::Scene::OnDestroy
();
30
}
31
32
private
:
33
float
m_ElapsedTime = 0.0f;
34
};
BenchmarkScene.h
Finality.h
MainScene.h
FINALITY::RenderCommand::SetClearColor
static void SetClearColor(float r, float g, float b, float a)
Definition
RenderCommand.h:15
FINALITY::Scene
Owns entities and dispatches script simulation.
Definition
Scene.h:36
FINALITY::Scene::OnDestroy
virtual void OnDestroy()
FINALITY::Scene::OnInit
virtual void OnInit()=0
FINALITY::Scene::OnUpdate
virtual void OnUpdate(float ts)
Dispatches activation and simulation callbacks for a scene update.
FINALITY::SceneManager::ChangeScene
void ChangeScene()
FINALITY::SceneManager::GetInstance
static SceneManager & GetInstance()
Definition
SceneManager.h:22
FINALITY::SceneManager::SetScene
void SetScene(std::unique_ptr< Scene > scene)
SplashScreen
Definition
SplashScreen.h:10
SplashScreen::OnUpdate
void OnUpdate(float ts) override
Dispatches activation and simulation callbacks for a scene update.
Definition
SplashScreen.h:16
SplashScreen::OnInit
void OnInit() override
Definition
SplashScreen.h:12
SplashScreen::OnDestroy
void OnDestroy() override
Definition
SplashScreen.h:28
Sandbox
src
scenes
SplashScreen.h
Generated by
1.18.0