/****************************************************************************** * 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; } bool core::IsInit() const { return mbIsInit; } }