protected static void LoadAsset(AssetBase info, string path)
{
// bool image =
// (info.Type == (sbyte)AssetType.Texture ||
// info.Type == (sbyte)AssetType.TextureTGA ||
// info.Type == (sbyte)AssetType.ImageJPEG ||
// info.Type == (sbyte)AssetType.ImageTGA);
FileInfo fInfo = new FileInfo(path);
long numBytes = fInfo.Length;
if (fInfo.Exists)
{
FileStream fStream = new FileStream(path, FileMode.Open, FileAccess.Read);
byte[] idata = new byte[numBytes];
BinaryReader br = new BinaryReader(fStream);
idata = br.ReadBytes((int)numBytes);
br.Close();
fStream.Close();
info.Data = idata;
//info.loaded=true;
}
else
{
MainConsole.Instance.ErrorFormat("[ASSETS]: file: [{0}] not found !", path);
}
}