Skip to content

Instantly share code, notes, and snippets.

@zhenlinyang
Created June 12, 2016 12:40
Show Gist options
  • Save zhenlinyang/ce135a8a0c07e812da3935a182466468 to your computer and use it in GitHub Desktop.
Save zhenlinyang/ce135a8a0c07e812da3935a182466468 to your computer and use it in GitHub Desktop.
LoadConfig
public void LoadConfig()
{
foreach (Type type in ConfigList.AllConfigTypeList)
{
string path = "../../Resources/Config/" + type.Name.Replace("Config", ".bytes");
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.None))
{
byte[] binary = new byte[fs.Length];
fs.Read(binary, 0, Convert.ToInt32(fs.Length));
m_configDic.Add(type, BinaryParse(binary, type));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment