Finality Engine
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
10{
11public:
12 void OnInit() override {
14 }
15
16 void OnUpdate(float ts) override {
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>();
25 }
26 }
27
28 void OnDestroy() override {
30 }
31
32private:
33 float m_ElapsedTime = 0.0f;
34};
static void SetClearColor(float r, float g, float b, float a)
Owns entities and dispatches script simulation.
Definition Scene.h:36
virtual void OnDestroy()
virtual void OnInit()=0
virtual void OnUpdate(float ts)
Dispatches activation and simulation callbacks for a scene update.
static SceneManager & GetInstance()
void SetScene(std::unique_ptr< Scene > scene)
void OnUpdate(float ts) override
Dispatches activation and simulation callbacks for a scene update.
void OnInit() override
void OnDestroy() override