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)); }
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); }
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)); }
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); }