mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-27 18:37:56 +00:00
40 lines
800 B
C#
40 lines
800 B
C#
using System.Collections.Generic;
|
|
|
|
namespace QuickFont
|
|
{
|
|
|
|
/// <summary>
|
|
/// A very simple class for managing a collection of textures.
|
|
/// </summary>
|
|
public class JTextureManager
|
|
{
|
|
List<JTexture> textureList;
|
|
|
|
public JTextureManager()
|
|
{
|
|
textureList = new List<JTexture>();
|
|
}
|
|
|
|
public JTexture Add(JTexture texture)
|
|
{
|
|
textureList.Add(texture);
|
|
return texture;
|
|
}
|
|
|
|
public void Remove(JTexture textureToRemove)
|
|
{
|
|
textureList.Remove(textureToRemove);
|
|
textureToRemove.Free();
|
|
}
|
|
|
|
public void FreeAll()
|
|
{
|
|
foreach (JTexture tex in textureList)
|
|
{
|
|
tex.Free();
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|