public BoardBehavior(Board parent) { _parent = parent; }
private void CreateBoard() { Configuration config = new Configuration(); config.ReadConfiguration(); foreach (BoardConfiguration boardConfig in config.Levels[_currentLevel].Boards) { Board board = new Board(boardConfig, tileSide); board.Entity.Name = boardConfig.Name; board.ChanceSpecial1 = boardConfig.Special1Chance; board.MatchRewards = config.Levels[_currentLevel].MatchRewards; string[] selectedSprites = new string[boardConfig.Tiles]; for (int i = 0; i < boardConfig.Tiles; i++) { selectedSprites[i] = tileSprites[i]; } List<Entity> tiles = board.GenerateRandomBoard(WaveContent.Tiles_spritesheet, selectedSprites); EntityManager.Add(board); EntityManager.Add(tiles); } scoreboardPanel.Time = TimeSpan.Zero; }