예제 #1
0
파일: GuiUtil.cs 프로젝트: xerohour/scsharp
        public static void PlaySound(Mpq mpq, string resourcePath)
        {
            Stream stream = (Stream)mpq.GetResource(resourcePath);

            if (stream == null)
            {
                return;
            }
            NSSound s = GuiUtil.SoundFromStream(stream);

            s.Play();
        }
예제 #2
0
파일: GuiUtil.cs 프로젝트: xerohour/scsharp
        public static void PlayMusic(Mpq mpq, string resourcePath, int numLoops)
        {
            Stream stream = (Stream)mpq.GetResource(resourcePath);

            if (stream == null)
            {
                return;
            }
            NSSound s = GuiUtil.SoundFromStream(stream);

            s.Loops = true;;
            s.Play();
        }