Пример #1
0
        /// public メソッド
        ///---------------------------------------------------------------------------
        /// 初期化
        public bool Init()
        {
            bgmList = new Bgm[(int)BgmId.Max];
            bgmList[(int)BgmId.Main]        = new Bgm("/Application/res/data/Sound/bgm.mp3");
            bgmList[(int)BgmId.Clear]       = new Bgm("/Application/res/data/Sound/jingle_clear.mp3");
            bgmList[(int)BgmId.Gameover]    = new Bgm("/Application/res/data/Sound/jingle_gameover.mp3");

            seList = new Sound[(int)SeId.Max];
            seList[(int)SeId.Anous]        = new Sound("/Application/res/data/Sound/Anous.wav");
            seList[(int)SeId.Eat]          = new Sound("/Application/res/data/Sound/eatSound.wav");
            seList[(int)SeId.MakeTower1]    = new Sound("/Application/res/data/Sound/glowTower.wav");
            seList[(int)SeId.MakeTower2]    = new Sound("/Application/res/data/Sound/glowTower2.wav");
            seList[(int)SeId.MakeMo]        = new Sound("/Application/res/data/Sound/MakeMonument.wav");
            seList[(int)SeId.CharVo1] 	    = new Sound("/Application/res/data/Sound/CharVo.wav");
            seList[(int)SeId.CharVo2] 	    = new Sound("/Application/res/data/Sound/CharVo2.wav");
            seList[(int)SeId.CharVo3] 	    = new Sound("/Application/res/data/Sound/CharVo3.wav");
            seList[(int)SeId.ZonbiVo3] 	    = new Sound("/Application/res/data/Sound/ZonbiVoice.wav");
            seList[(int)SeId.PlDamage]      = new Sound("/Application/res/data/Sound/player_damage.wav");
            seList[(int)SeId.PlFoot]        = new Sound("/Application/res/data/Sound/TitanWalk.wav");
            seList[(int)SeId.ObjBreak]      = new Sound("/Application/res/data/Sound/obj_break.wav");

            sePlayer = new SoundPlayer[(int)SeId.Max];
            for( int i=0; i<(int)SeId.Max; i++ ){
            sePlayer[i] = seList[i].CreatePlayer();
            }
            bgmPlayer = null;

            return true;
        }
Пример #2
0
        /// 破棄
        public void Term()
        {
            StopBgm();
            for( int i=0; i<(int)BgmId.Max; i++ ){
            bgmList[i].Dispose();
            bgmList[i] = null;
            }
            for( int i=0; i<(int)SeId.Max; i++ ){
            if( sePlayer[i].Status == SoundStatus.Playing ){
                sePlayer[i].Stop();
            }
            sePlayer[i] = null;

            seList[i].Dispose();
            seList[i] = null;
            }
            bgmList   = null;
            seList    = null;
        }