Singletonejant

Borrat menu.cpp que no estava gastantse...mmm.. desde mai
This commit is contained in:
2025-02-22 18:27:23 +01:00
parent e361d295c1
commit fc01676df2
38 changed files with 440 additions and 1751 deletions

View File

@@ -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