#pragma once #include #include class CoreInstance; class World; #define GENERATE_FACTORY_GAME_INSTANCE(Class) \ GameInstance* GameFactory(CoreInstance& core) { return new Class(core); } class GameInstance { CoreInstance& core; World* world = nullptr; std::atomic is_running = true; void start(); // Stop call from core void stop(); public: // Stop call from game void quit(); // Init vulkan GameInstance(CoreInstance& core); virtual ~GameInstance(); World* GetWorld() const { return world; } CoreInstance& GetCore() const { return core; } friend class CoreInstance; };