Add GetWorld to Actor. Integrate google test. Add Model manager class. Rename *.h to *.hpp files

This commit is contained in:
Jiga228
2025-10-13 19:31:27 +07:00
parent fedffa7634
commit 8819114b63
44 changed files with 424 additions and 59 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include <atomic>
#include <memory>
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<bool> 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;
};