27 lines
730 B
C#
27 lines
730 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace CDSAE3_Lian_Lian_Kan.Sound
|
|||
|
{
|
|||
|
public class Audio_res_manager
|
|||
|
{
|
|||
|
Dictionary<string, byte[]> audio_res = new Dictionary<string, byte[]>();
|
|||
|
internal byte[] Get_Audio_Resources(string name)
|
|||
|
{
|
|||
|
if(audio_res.TryGetValue(name, out byte[]? val))
|
|||
|
return val;
|
|||
|
object obj = Etcs.res_Manager.GetObject(name, Etcs.res_Culture)!;
|
|||
|
byte[] res = (byte[])obj;
|
|||
|
audio_res.Add(name, res);
|
|||
|
return res;
|
|||
|
}
|
|||
|
internal void Clear_Audio_Resources()
|
|||
|
{
|
|||
|
audio_res.Clear();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|