You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lunarium_OLD/src/core/core.cpp

45 lines
870 B
C++

/******************************************************************************
* 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;
}
}