34 lines
685 B
C#
34 lines
685 B
C#
using System.IO;
|
|
|
|
namespace Smuggler
|
|
{
|
|
internal class Resources
|
|
{
|
|
public static byte[] PBREffect
|
|
{
|
|
get
|
|
{
|
|
if (pbrEffect == null)
|
|
{
|
|
pbrEffect = GetResource("PBREffect");
|
|
}
|
|
return pbrEffect;
|
|
}
|
|
}
|
|
|
|
private static byte[] pbrEffect;
|
|
|
|
private static byte[] GetResource(string name)
|
|
{
|
|
Stream stream = typeof(Resources).Assembly.GetManifestResourceStream(
|
|
"Smuggler.Resources." + name + ".fxb"
|
|
);
|
|
using (MemoryStream ms = new MemoryStream())
|
|
{
|
|
stream.CopyTo(ms);
|
|
return ms.ToArray();
|
|
}
|
|
}
|
|
}
|
|
}
|