void playbgm(Hashtable param) { string audioPath = param["storage"] as string; bool loop = true; if (param.ContainsKey("loop")) { loop = ((param["loop"] as string) == "true") ? true : false; } ISoundPlayer player = ISoundPlayer.Instance; player.PlayMusic(audioPath, loop, 0f); }
void xchgbgm(Hashtable param) { string audioPath = param["storage"] as string; bool loop = true; if (param.ContainsKey("loop")) { loop = ((param["loop"] as string) == "true") ? true : false; } float time = float.Parse(param["time"] as string) / 1000f; ISoundPlayer player = ISoundPlayer.Instance; player.PlayMusic(audioPath, loop, time); }