From 9b10e457e483e2b675289fa37184b5f7ffb90f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Sat, 24 Aug 2019 00:38:20 +0300 Subject: [PATCH] LevelManager cleanup --- Assets/Scripts/src/Level/LevelManager.cs | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/Assets/Scripts/src/Level/LevelManager.cs b/Assets/Scripts/src/Level/LevelManager.cs index 5b190d6..eb2742f 100644 --- a/Assets/Scripts/src/Level/LevelManager.cs +++ b/Assets/Scripts/src/Level/LevelManager.cs @@ -15,27 +15,8 @@ namespace src.Level private const int XMaxEnemyPosition = 5; private const int YMinEnemyPosition = -5; - public Count DestructibleWallCount - { - get => _destructibleWallCount; - set => _destructibleWallCount = value; - } - - public Count UpgradesCount - { - get => _upgradesCount; - set => _upgradesCount = value; - } - - public Count EnemyCount - { - get => _enemyCount; - set => _enemyCount = value; - } - /* Used to group spawned objects */ private Transform _boardHolder; - /* Holds the starting position of the player */ private Transform _startPosition; @@ -57,6 +38,8 @@ namespace src.Level /* Holds the available positions */ private readonly List _freeGridPositionsBoard = new List(); private List _freeGridPositions; + + /* Holds initialized game objects */ private List _destructibleWalls; private List _enemies; @@ -163,7 +146,7 @@ namespace src.Level private void SetupLevelDestructibleWalls() { var numberOfWallsRemaining = _destructibleWallCount.RandomIntRange(); - List usedPositions = new List(); + var usedPositions = new List(); _freeGridPositions.ShuffleList(); foreach (var nextPosition in _freeGridPositions) {