예제 #1
0
 public BoardBehavior(Board parent)
 {
     _parent = parent;
 }
예제 #2
0
        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;
        }