Created
June 12, 2016 12:40
-
-
Save zhenlinyang/ce135a8a0c07e812da3935a182466468 to your computer and use it in GitHub Desktop.
LoadConfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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