| | |
| | |
|
| | | public class ConfigManager : Singleton<ConfigManager>
|
| | | {
|
| | | public static string CustomIV = "4vHKRj3yfzU=";
|
| | | public static string CustomKey = "xhVs6DRXLfUGxw+AhtfQdpQGoa+8SA9d";
|
| | |
|
| | | protected string[] lineStep = new string[] { "\r\n","\n" }; //行间隔体
|
| | | protected string[] rowStep = new string[] { "\t" }; //段间隔体
|
| | | public readonly static string CustomIV = "4vHKRj3yfzU=";
|
| | | public readonly static string CustomKey = "xhVs6DRXLfUGxw+AhtfQdpQGoa+8SA9d";
|
| | |
|
| | | bool isPlaying = true;
|
| | |
|
| | |
| | | var crypS = new CryptoStream(tableMs, decryptor, CryptoStreamMode.Read);
|
| | | sr = new StreamReader(crypS, Encoding.UTF8);
|
| | | var content = sr.ReadToEnd();
|
| | | lines = content.Split(lineStep, StringSplitOptions.None);
|
| | |
|
| | | lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
| | | }
|
| | |
|
| | | _task.state = TaskState.ReadFileSuccess;
|
| | |
| | | var container = _task.container as Dictionary<string, ConfigBase>;
|
| | | for (int i = 3; i < _task.contentLines.Length; i++)
|
| | | {
|
| | | var contents = _task.contentLines[i].Split(rowStep, StringSplitOptions.None);
|
| | | var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
|
| | | if (contents.Length <= 1)
|
| | | {
|
| | | continue;
|
| | |
| | | case AssetPath.Resource:
|
| | | path = StringUtility.Contact("Config/", fileName);
|
| | | var textAsset = Resources.Load<TextAsset>(path);
|
| | | lines = textAsset.text.Split(lineStep, StringSplitOptions.None);
|
| | | lines = textAsset.text.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
| | | break;
|
| | | case AssetPath.ResourceOut:
|
| | | path = StringUtility.Contact(ResourcesPath.CONFIG_FODLER, "/", fileName, ".txt");
|
| | |
| | | var crypS = new CryptoStream(ms, decryptor, CryptoStreamMode.Read);
|
| | | var sr = new StreamReader(crypS, Encoding.UTF8);
|
| | | var content = sr.ReadToEnd();
|
| | | lines = content.Split(lineStep, StringSplitOptions.None);
|
| | | lines = content.Split(new string[] { "\r\n" }, StringSplitOptions.None);
|
| | |
|
| | | break;
|
| | | }
|
| | |
| | | {
|
| | | for (int i = 3; i < _task.contentLines.Length; i++)
|
| | | {
|
| | | var contents = _task.contentLines[i].Split(rowStep, StringSplitOptions.None);
|
| | | var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
|
| | | if (contents.Length <= 1)
|
| | | {
|
| | | continue;
|