Beispiel #1
0
        public void GenerateRandomEnemy()
        {
            if (_depth == 1)
            {
                _enemy = _enemyFactory.SpawnEasyEnemy();
            }

            else if (_depth == 5)
            {
                _enemy = _enemyFactory.SpawnMiniBoss();
            }
            else
            {
                //Else if not just keep spawning enemies
                _enemy = EnemyFactory.GenerateRandomEnemy();
            }

            //Generates harder enemies as the game goes on
            if (_depth > 5)
            {
                _enemy = EnemyFactory.GenerateHarderEnemys();
            }

            if (_player.IsDead)
            {
                _gameOver = true;
            }

            if (_depth == 20)
            {
                _enemy  = _enemyFactory.SpawnBoss();
                _youWin = true;
            }
        }