public static string[] Initialize() { if (!File.Exists(Path.Combine(Common.InputPath, "music.txt"))) { return(Array.Empty <string>()); } var fId = new Win32FileReader(Path.Combine(Common.InputPath, "music.txt")); int n = Convert.ToInt32(fId.ReadLine(), CultureInfo.GetCultureInfo("en-US")); var aMusic = new string[n]; for (int i = 0; i < n; i++) { var str = fId.ReadLine(); if (str == null) { continue; } aMusic[i] = str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0]; if (aMusic[i].Length >= 4) { aMusic[i] = aMusic[i].Remove(aMusic[i].Length - 4, 4); } } fId.Close(); return(aMusic); }
public static string[] Initialize() { if (!File.Exists(Path.Combine(Common.InputPath, "quests.txt"))) { return(Array.Empty <string>()); } var fId = new Win32FileReader(Path.Combine(Common.InputPath, "quests.txt")); fId.ReadLine(); int n = Convert.ToInt32(fId.ReadLine(), CultureInfo.GetCultureInfo("en-US")); var aQuests = new string[n]; for (int i = 0; i < n; i++) { var str = fId.ReadLine(); if (str != null) { aQuests[i] = str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0].Remove(0, 4); } } fId.Close(); return(aQuests); }
public static string[] Initialize() { if (!File.Exists(Path.Combine(Common.InputPath, "actions.txt"))) { return(Array.Empty <string>()); } var fId = new Win32FileReader(Path.Combine(Common.InputPath, "actions.txt")); var n = Convert.ToInt32(fId.ReadLine(), CultureInfo.GetCultureInfo(1033)); var aAnimations = new string[n]; for (int i = 0; i < n; i++) { var animation = fId.ReadLine(); if (animation == null) { continue; } aAnimations[i] = animation.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0]; var j = Convert.ToInt32(animation.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[3], CultureInfo.GetCultureInfo("en-US")); while (j != 0) { fId.ReadLine(); j--; } } fId.Close(); return(aAnimations); }
public static string[] Initialize() { var fID = new Win32FileReader(Common.InputPath + "/actions.txt"); var n = Convert.ToInt32(fID.ReadLine()); var aAnimations = new string[n]; for (int i = 0; i < n; i++) { var animation = fID.ReadLine(); if (animation == null) { continue; } aAnimations[i] = animation.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0]; int j = Convert.ToInt32(animation.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[3]); while (j != 0) { fID.ReadLine(); j--; } } fID.Close(); return(aAnimations); }
public static string[] Initialize() { var fID = new Win32FileReader(Common.InputPath + "/meshes.txt"); int n = Convert.ToInt32(fID.ReadLine()); var aMeshes = new string[n]; for (int i = 0; i < n; i++) { var str = fID.ReadLine(); if (str != null) { aMeshes[i] = str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0].Remove(0, 5); } } fID.Close(); return(aMeshes); }
public static string[] Initialize() { var fID = new Win32FileReader(Common.InputPath + "/quick_strings.txt"); int n = Convert.ToInt32(fID.ReadLine()); var aQuickStrings = new string[n]; for (int i = 0; i < n; i++) { var str = fID.ReadLine(); if (str != null) { aQuickStrings[i] = str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[1].Replace('_', ' '); } } fID.Close(); return(aQuickStrings); }
public static string[] Initialize() { var fID = new Win32FileReader(Common.InputPath + "/music.txt"); int n = Convert.ToInt32(fID.ReadLine()); var aMusic = new string[n]; for (int i = 0; i < n; i++) { var str = fID.ReadLine(); if (str == null) continue; aMusic[i] = str.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0]; if (aMusic[i].Length >= 4) aMusic[i] = aMusic[i].Remove(aMusic[i].Length - 4, 4); } fID.Close(); return aMusic; }