Add Music fluctuations project and Chinese plan docs
This commit is contained in:
34
MVS/Music fluctuations/source/application/Application.cpp
Normal file
34
MVS/Music fluctuations/source/application/Application.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#include"Application.h"
|
||||
#include<iostream>
|
||||
#include <iomanip>
|
||||
Application::Application(HINSTANCE p_hInstance) :
|
||||
m_context(p_hInstance),
|
||||
m_game(m_context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Application::Run()
|
||||
{
|
||||
m_game.OnEnter();
|
||||
while (IsRunning()) {
|
||||
|
||||
float deltaTime = m_context.m_clock.Update();
|
||||
m_game.PreUpdate();
|
||||
m_game.Update(deltaTime);
|
||||
m_game.PostUpdate();
|
||||
}
|
||||
m_game.OnExit();
|
||||
return;
|
||||
}
|
||||
|
||||
bool Application::IsRunning()
|
||||
{
|
||||
return !m_context.m_window.shouldClose();
|
||||
}
|
||||
17
MVS/Music fluctuations/source/application/Application.h
Normal file
17
MVS/Music fluctuations/source/application/Application.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include "../global/Base.h"
|
||||
#include"../context/Context.h"
|
||||
#include"../game/Game.h"
|
||||
#include<Windows.h>
|
||||
|
||||
class Application
|
||||
{
|
||||
public:
|
||||
Application(HINSTANCE p_hInstance);
|
||||
~Application();
|
||||
void Run();
|
||||
bool IsRunning();
|
||||
public:
|
||||
Game m_game;
|
||||
Context m_context;
|
||||
};
|
||||
4
MVS/Music fluctuations/source/application/CMakeLists.txt
Normal file
4
MVS/Music fluctuations/source/application/CMakeLists.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
file(GLOB_RECURSE APPLICATION ./ *.cpp)
|
||||
|
||||
add_library(application ${APPLICATION})
|
||||
|
||||
Reference in New Issue
Block a user