forked from jaildesigner-jailgames/jaildoctors_dilemma
Singletonejant
Borrat menu.cpp que no estava gastantse...mmm.. desde mai
This commit is contained in:
@@ -7,6 +7,27 @@
|
||||
#include "screen.h"
|
||||
#include "asset.h"
|
||||
|
||||
// [SINGLETON]
|
||||
Debug *Debug::debug_ = nullptr;
|
||||
|
||||
// [SINGLETON] Crearemos el objeto con esta función estática
|
||||
void Debug::init()
|
||||
{
|
||||
Debug::debug_ = new Debug();
|
||||
}
|
||||
|
||||
// [SINGLETON] Destruiremos el objeto con esta función estática
|
||||
void Debug::destroy()
|
||||
{
|
||||
delete Debug::debug_;
|
||||
}
|
||||
|
||||
// [SINGLETON] Con este método obtenemos el objeto y podemos trabajar con él
|
||||
Debug *Debug::get()
|
||||
{
|
||||
return Debug::debug_;
|
||||
}
|
||||
|
||||
// Constructor
|
||||
Debug::Debug()
|
||||
// Copia la dirección de los objetos
|
||||
|
||||
Reference in New Issue
Block a user