convertit Asset i Audio
This commit is contained in:
@@ -5,27 +5,6 @@
|
||||
#include <string> // Para allocator, string, char_traits, operator+
|
||||
#include "utils.h" // Para getFileName
|
||||
|
||||
// [SINGLETON] Hay que definir las variables estáticas, desde el .h sólo la hemos declarado
|
||||
Asset *Asset::asset_ = nullptr;
|
||||
|
||||
// [SINGLETON] Crearemos el objeto asset con esta función estática
|
||||
void Asset::init(const std::string &executable_path)
|
||||
{
|
||||
Asset::asset_ = new Asset(executable_path);
|
||||
}
|
||||
|
||||
// [SINGLETON] Destruiremos el objeto asset con esta función estática
|
||||
void Asset::destroy()
|
||||
{
|
||||
delete Asset::asset_;
|
||||
}
|
||||
|
||||
// [SINGLETON] Con este método obtenemos el objeto asset y podemos trabajar con él
|
||||
Asset *Asset::get()
|
||||
{
|
||||
return Asset::asset_;
|
||||
}
|
||||
|
||||
// Añade un elemento a la lista
|
||||
void Asset::add(const std::string &file, AssetType type, bool required, bool absolute)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user