コード例 #1
0
ファイル: MainView.cs プロジェクト: zia95/FlipFlop
 public static void StopSound(GSound s)
 {
     if (s == GSound.Main)
     {
         sp_main?.Stop();
     }
     else if (s == GSound.TileClicked)
     {
         sp_tile_clicked?.Stop();
     }
     else if (s == GSound.TileClicked)
     {
         sp_tile_matched?.Stop();
     }
     else if (s == GSound.TileClicked)
     {
         sp_tile_mismatched?.Stop();
     }
     else if (s == GSound.GameStart)
     {
         sp_game_start?.Stop();
     }
     else if (s == GSound.GameEnd)
     {
         sp_game_end?.Stop();
     }
 }
コード例 #2
0
ファイル: MainView.cs プロジェクト: zia95/FlipFlop
            public static void PlaySound(GSound s)
            {
                if (OnOrOff == false)
                {
                    return;
                }

                if (s == GSound.Main)
                {
                    sp_main?.PlayLooping();
                }
                else if (s == GSound.TileClicked)
                {
                    sp_tile_clicked?.Play();
                }
                else if (s == GSound.TileMatched)
                {
                    sp_tile_matched?.Play();
                }
                else if (s == GSound.TileMismatch)
                {
                    sp_tile_mismatched?.Play();
                }
                else if (s == GSound.GameStart)
                {
                    sp_game_start?.Play();
                }
                else if (s == GSound.GameEnd)
                {
                    sp_game_end?.Play();
                }
            }
コード例 #3
0
        private void PlaySound(GSound s)
        {
            switch (s)
            {
            case GSound.Marked:
                sp_marked?.Play();
                break;

            case GSound.RoundBegin:
                sp_roundbegin?.Play();
                break;

            case GSound.RoundEnd:
                sp_roundend?.Play();
                break;
            }
        }