コード例 #1
0
        public static void PlayHomeMusic()
        {
            if (_instance == null) _instance = new MusicPlayer();

            _instance._currentSong = _instance._titleSong;
            _instance.PlaySong(_instance._titleSong.Song);
        }
コード例 #2
0
        public MusicPlayer()
        {
            _instance = this;
            _volume = 0.5f;

            _gameSong = Application.MagicContentManager.GetMusic("bgm2");
            _titleSong = Application.MagicContentManager.GetMusic("bgm1");

            MediaPlayer.IsRepeating = true;
        }