Я пересоздал репозиторий из-за большого количества мусора в прошлом
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
class CoreInstance;
|
||||
class World;
|
||||
class RenderEngine;
|
||||
|
||||
#define GENERATE_FACTORY_GAME_INSTANCE(Class) \
|
||||
GameInstance* GameFactory(CoreInstance& core) { return new Class(core); }
|
||||
|
||||
class GameInstance
|
||||
{
|
||||
CoreInstance& core;
|
||||
World* world = nullptr;
|
||||
std::unique_ptr<RenderEngine> render_engine_;
|
||||
|
||||
std::atomic<bool> is_running = true;
|
||||
|
||||
// Create a window
|
||||
// Render
|
||||
// Pull events
|
||||
void start();
|
||||
|
||||
public:
|
||||
void quit();
|
||||
|
||||
// Init vulkan
|
||||
GameInstance(CoreInstance& core);
|
||||
virtual ~GameInstance();
|
||||
|
||||
World* GetWorld() const { return world; }
|
||||
|
||||
friend class CoreInstance;
|
||||
};
|
||||
Reference in New Issue
Block a user