mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
change core to game
This commit is contained in:
16
src/app/GameApplication.cpp
Normal file
16
src/app/GameApplication.cpp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include "GameApplication.h"
|
||||||
|
|
||||||
|
GameApplication::GameApplication() {
|
||||||
|
m_gameSession = std::make_unique<GameSession>();
|
||||||
|
m_inputManager = std::make_unique<InputManager>();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void GameApplication::initialize() {
|
||||||
|
m_gameSession->initialize();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_AppResult GameApplication::handleInputEvent(SDL_Event* event) {
|
||||||
|
|
||||||
|
}
|
||||||
24
src/app/GameApplication.h
Normal file
24
src/app/GameApplication.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "core/GameSession.h"
|
||||||
|
|
||||||
|
#include "input/InputManager.h"
|
||||||
|
#include "utils/Config.h"
|
||||||
|
|
||||||
|
|
||||||
|
class GameApplication {
|
||||||
|
private:
|
||||||
|
|
||||||
|
std::unique_ptr<GameSession> m_gameSession;
|
||||||
|
std::unique_ptr<Renderer> m_renderer;
|
||||||
|
std::unique_ptr<InputManager> m_inputManager;
|
||||||
|
GameConfig m_config;
|
||||||
|
|
||||||
|
public:
|
||||||
|
GameApplication();
|
||||||
|
~GameApplication();
|
||||||
|
void initialize();
|
||||||
|
SDL_AppResult handleInputEvent(SDL_Event* event);
|
||||||
|
void run();
|
||||||
|
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user