Controls a sequence of disappearing blocks on the screen
コード例 #1
0
        public static ScreenHandler CreateScreen(Screen screen, PositionComponent playerPos, IEnumerable <Join> mapJoins)
        {
            List <BlocksPattern> blockPatterns = new List <BlocksPattern>();

            foreach (BlockPatternInfo info in screen.BlockPatternInfo)
            {
                BlocksPattern pattern = new BlocksPattern(info);
                blockPatterns.Add(pattern);
            }

            var joinList = new List <JoinHandler>();

            foreach (Join join in mapJoins)
            {
                if (join.screenOne == screen.Name || join.screenTwo == screen.Name)
                {
                    //JoinHandler handler = CreateJoin(join);
                    //joinList.Add(handler);
                }
            }

            Music music = null;

            string intropath = (screen.MusicIntroPath != null) ? screen.MusicIntroPath.Absolute : null;
            string looppath  = (screen.MusicLoopPath != null) ? screen.MusicLoopPath.Absolute : null;

            if (intropath != null || looppath != null)
            {
                music = Engine.Instance.SoundSystem.LoadMusic(intropath, looppath, 1);
            }

            return(new ScreenHandler(screen, music, playerPos, joinList, blockPatterns));
        }
コード例 #2
0
        public static ScreenHandler CreateScreen(Screen screen, PositionComponent playerPos, IEnumerable<Join> mapJoins)
        {
            List<BlocksPattern> blockPatterns = new List<BlocksPattern>();
            foreach (BlockPatternInfo info in screen.BlockPatternInfo)
            {
                BlocksPattern pattern = new BlocksPattern(info);
                blockPatterns.Add(pattern);
            }

            var joinList = new List<JoinHandler>();
            foreach (Join join in mapJoins)
            {
                if (join.screenOne == screen.Name || join.screenTwo == screen.Name)
                {
                    //JoinHandler handler = CreateJoin(join);
                    //joinList.Add(handler);
                }
            }

            Music music = null;

            string intropath = (screen.MusicIntroPath != null) ? screen.MusicIntroPath.Absolute : null;
            string looppath = (screen.MusicLoopPath != null) ? screen.MusicLoopPath.Absolute : null;
            if (intropath != null || looppath != null) music = Engine.Instance.SoundSystem.LoadMusic(intropath, looppath, 1);

            return new ScreenHandler(screen, music, playerPos, joinList, blockPatterns);
        }
コード例 #3
0
        private ScreenHandler CreateScreen(StageHandler stage, ScreenInfo screen, IEnumerable <JoinHandler> joins)
        {
            var patterns = new List <BlocksPattern>(screen.BlockPatterns.Count);

            foreach (BlockPatternInfo info in screen.BlockPatterns)
            {
                BlocksPattern pattern = new BlocksPattern(info, stage, _entityPool);
                patterns.Add(pattern);
            }

            var layers = new List <ScreenLayer>();

            foreach (var layerInfo in screen.Layers)
            {
                layers.Add(new ScreenLayer(layerInfo, stage, _respawnTracker));
            }

            return(new ScreenHandler(screen, layers, joins, patterns, stage));
        }
コード例 #4
0
ファイル: StageFactory.cs プロジェクト: laazer/cs_megaman
        private ScreenHandler CreateScreen(StageHandler stage, ScreenInfo screen, IEnumerable<JoinHandler> joins)
        {
            var patterns = new List<BlocksPattern>(screen.BlockPatterns.Count);

            foreach (BlockPatternInfo info in screen.BlockPatterns)
            {
                BlocksPattern pattern = new BlocksPattern(info, stage, _entityPool);
                patterns.Add(pattern);
            }

            var layers = new List<ScreenLayer>();
            foreach (var layerInfo in screen.Layers)
            {
                layers.Add(new ScreenLayer(layerInfo, stage, _respawnTracker));
            }

            return new ScreenHandler(screen, layers, joins, patterns, stage);
        }