Пример #1
0
 public PuzzleGame(PuzzleGrid puzzleGrid, HealthBar playerHealth, Team activeTeam, MonsterGrid monsterGrid)
 {
     _monsterGrid = monsterGrid;
     _activeTeam = activeTeam;
     _playerHealth = playerHealth;
     _puzzleGrid = puzzleGrid;
     MessageBus.Default.Register("EndTurn", OnEndTurn);
 }
Пример #2
0
        public async void LoadGraphics(object sender, RoutedEventArgs e)
        {
            var monsterGrid = new MonsterGrid(MonsterGrid, _activeDungeon);

            var teamFromDatabase = _teamRepository.GetTeam();
            var activeTeam = new Team(teamFromDatabase);
            HeroGrid.AddHeroes(activeTeam);
            PlayerHealth.HealthPercentage.ColumnDefinitions[0].MaxWidth = PlayerHealth.HealthPercentage.ActualWidth;

            _puzzleGrid = new PuzzleGrid(PuzzleGrid, AppGlobals.PuzzleGridRowCount, AppGlobals.PuzzleGridColumnCount);

            _puzzleGame = new PuzzleGame(_puzzleGrid, PlayerHealth, activeTeam, monsterGrid);
            _puzzleGame.StartGame();
        }