/****************************************************************************** * File - core.cpp * Author - Joey Pollack * Date - 2021/08/30 (y/m/d) * Mod Date - 2021/08/30 (y/m/d) * Description - The Core Engine Class. Manages the engine components. ******************************************************************************/ #include "core.h" namespace lunarium { core* core::mpInstance = nullptr; core::core() : mbIsInit(false) { } core& core::GetInstance() { if (!mpInstance) { mpInstance = new core; } return *mpInstance; } void core::Shutdown() { if (!mpInstance) return; // Shutdown subsystems delete mpInstance; mpInstance = nullptr; } void core::Initialize(const char* args, std::vector& listeners) { mpLog = Logger::GetInstance(); for (unsigned i = 0; i < listeners.size(); i++) { mpLog->AddListener(listeners[i]); } } bool core::IsInit() const { return mbIsInit; } const State& core::GetState() const { return mState; } }