public byte[] GetAudioFile(string filename, Assets.Scripts.Core.Audio.AudioType type) { string archiveNameByAudioType = GetArchiveNameByAudioType(type); string path = Path.Combine(assetPath, archiveNameByAudioType + "/" + filename.ToLower()); return(File.ReadAllBytes(path)); }
public string GetAudioFilePath(string filename, Assets.Scripts.Core.Audio.AudioType type) { string archiveNameByAudioType = GetArchiveNameByAudioType(type); string text = null; string text2 = Path.Combine(assetPath, archiveNameByAudioType + "/" + filename.ToLower()); string text3 = Path.Combine(assetPath, archiveNameByAudioType + "Alt/" + filename.ToLower()); switch (archiveNameByAudioType) { case "BGM": if (BurikoMemory.Instance.GetGlobalFlag("GAltBGM").IntValue() != 0) { if (File.Exists(text3)) { return(text3); } break; } goto default; case "SE": if (BurikoMemory.Instance.GetGlobalFlag("GAltSE").IntValue() != 0) { if (File.Exists(text3)) { return(text3); } break; } goto default; case "voice": if (BurikoMemory.Instance.GetGlobalFlag("GAltVoice").IntValue() == 0) { break; } if (BurikoMemory.Instance.GetGlobalFlag("GAltVoicePriority").IntValue() != 0) { if (File.Exists(text3)) { return(text3); } break; } goto default; default: if (!File.Exists(text2)) { return(text3); } break; } return(text2); }
private string GetArchiveNameByAudioType(Assets.Scripts.Core.Audio.AudioType audioType) { switch (audioType) { case Assets.Scripts.Core.Audio.AudioType.BGM: return("BGM"); case Assets.Scripts.Core.Audio.AudioType.Voice: return("voice"); case Assets.Scripts.Core.Audio.AudioType.SE: return("SE"); case Assets.Scripts.Core.Audio.AudioType.System: return("SE"); default: throw new InvalidEnumArgumentException("GetArchiveNameByAudioType: Invalid audiotype " + audioType); } }
public string GetAudioFilePath(string filename, Assets.Scripts.Core.Audio.AudioType type) { string archiveNameByAudioType = GetArchiveNameByAudioType(type); return(Path.Combine(assetPath, archiveNameByAudioType + "/" + filename.ToLower()).Replace("\\", "/")); }
public byte[] GetAudioFile(string filename, Assets.Scripts.Core.Audio.AudioType type) { string archiveNameByAudioType = GetArchiveNameByAudioType(type); string text = null; string text2 = Path.Combine(assetPath, archiveNameByAudioType + "/" + filename.ToLower()); string text3 = Path.Combine(assetPath, archiveNameByAudioType + "Alt/" + filename.ToLower()); switch (archiveNameByAudioType) { case "BGM": if (BurikoMemory.Instance.GetGlobalFlag("GAltBGM").IntValue() == 0) { goto default; } if (File.Exists(text3)) { text = text3; break; } goto IL_00f5; case "SE": if (BurikoMemory.Instance.GetGlobalFlag("GAltSE").IntValue() == 0) { goto default; } if (File.Exists(text3)) { text = text3; break; } goto IL_00f5; case "voice": if (BurikoMemory.Instance.GetGlobalFlag("GAltVoice").IntValue() != 0) { if (BurikoMemory.Instance.GetGlobalFlag("GAltVoicePriority").IntValue() == 0) { goto default; } if (File.Exists(text3)) { text = text3; break; } } goto IL_00f5; default: { if (!File.Exists(text2)) { text = text3; break; } goto IL_00f5; } IL_00f5: text = text2; break; } return(File.ReadAllBytes(text)); }