From f917c78e615f3020f3a159f31d9e17ca2021573b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Nu=C8=9Biu?= Date: Thu, 8 Aug 2019 23:47:30 +0300 Subject: [PATCH] try --- Assets/Scripts/src/Level/LevelManager.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/src/Level/LevelManager.cs b/Assets/Scripts/src/Level/LevelManager.cs index 298182a..8ee9166 100644 --- a/Assets/Scripts/src/Level/LevelManager.cs +++ b/Assets/Scripts/src/Level/LevelManager.cs @@ -11,9 +11,9 @@ namespace src.Level { public class LevelManager : GameplayComponent, IDynamicLevelData { - /** Extracted them here for easy to change reason */ - private const int XMaxEnemyPosition = 5; - private const int YMinEnemyPosition = -5; + /** Safe-zone coordinates to prevent enemies to instantly kill you*/ + private const int XMaxEnemyPosition = 4; + private const int YMinEnemyPosition = -4; public Count DestructibleWallCount { @@ -205,8 +205,8 @@ namespace src.Level private void SetupLevelEnemies() { var numberOfEnemiesToPlace = _enemyCount.RandomIntRange(); - _freeGridPositions.ShuffleList(); _freeGridPositions.RemoveAll(pos => pos.x <= XMaxEnemyPosition && pos.y >= YMinEnemyPosition); + _freeGridPositions.ShuffleList(); foreach (var nextPosition in _freeGridPositions) { if (numberOfEnemiesToPlace == 0)