Fixed intro
This commit is contained in:
parent
d2604e9edc
commit
f9b6f7b46c
@ -75,6 +75,9 @@ namespace nf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Application::run() {
|
void Application::run() {
|
||||||
|
#ifdef _DEBUG
|
||||||
|
SetThreadDescription(GetCurrentThread(), L"Input Thread");
|
||||||
|
#endif
|
||||||
showWindow(true);
|
showWindow(true);
|
||||||
m_running = true;
|
m_running = true;
|
||||||
MSG msg = { };
|
MSG msg = { };
|
||||||
@ -278,6 +281,9 @@ namespace nf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Application::runMainGameThread() {
|
void Application::runMainGameThread() {
|
||||||
|
#ifdef _DEBUG
|
||||||
|
SetThreadDescription(GetCurrentThread(), L"Main Engine Thread");
|
||||||
|
#endif
|
||||||
m_sIntro = new IntroGamestate;
|
m_sIntro = new IntroGamestate;
|
||||||
m_currentState = m_sIntro;
|
m_currentState = m_sIntro;
|
||||||
m_audio = new AudioEngine(this);
|
m_audio = new AudioEngine(this);
|
||||||
|
@ -11,10 +11,15 @@ namespace nf {
|
|||||||
m_logoTex.centered(true, true);
|
m_logoTex.centered(true, true);
|
||||||
m_text.create("(c) Grayson Riffe 2021", Vec2(0.01, 0.025), Vec3(0.8));
|
m_text.create("(c) Grayson Riffe 2021", Vec2(0.01, 0.025), Vec3(0.8));
|
||||||
m_text.setScale(0.6);
|
m_text.setScale(0.6);
|
||||||
m_start = std::chrono::steady_clock::now();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IntroGamestate::update(double deltaTime) {
|
void IntroGamestate::update(double deltaTime) {
|
||||||
|
static unsigned int frame = 0;
|
||||||
|
frame++;
|
||||||
|
if (frame < 10) return;
|
||||||
|
if (frame == 10)
|
||||||
|
m_start = std::chrono::steady_clock::now();
|
||||||
|
|
||||||
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now();
|
||||||
std::chrono::duration<double, std::ratio<1i64>> dur = now - m_start;
|
std::chrono::duration<double, std::ratio<1i64>> dur = now - m_start;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user