コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }