Inheritance: IDisposable
コード例 #1
0
ファイル: StageHandler.cs プロジェクト: laazer/cs_megaman
        public StageHandler(StageInfo stage)
        {
            info = stage;
            Info = stage;
            startScreen = info.StartScreen;

            if (string.IsNullOrEmpty(startScreen)) startScreen = info.Screens.Keys.First();
            startX = info.PlayerStartX;
            startY = info.PlayerStartY;

            string intropath = (stage.MusicIntroPath != null) ? stage.MusicIntroPath.Absolute : null;
            string looppath = (stage.MusicLoopPath != null) ? stage.MusicLoopPath.Absolute : null;
            if (intropath != null || looppath != null) music = Engine.Instance.SoundSystem.LoadMusic(intropath, looppath, 1);
        }
コード例 #2
0
ファイル: SoundSystem.cs プロジェクト: laazer/cs_megaman
        public Music LoadMusic(string intro, string loop, float volume)
        {
            string key = intro + loop;

            if (!string.IsNullOrEmpty(key) && loadedMusic.ContainsKey(intro + loop)) return loadedMusic[intro + loop];

            Music music = new Music(soundSystem, intro, loop, volume);
            loadedMusic[intro + loop] = music;
            return music;
        }