try
This commit is contained in:
parent
c02cbde544
commit
f917c78e61
1 changed files with 4 additions and 4 deletions
|
@ -11,9 +11,9 @@ namespace src.Level
|
||||||
{
|
{
|
||||||
public class LevelManager : GameplayComponent, IDynamicLevelData
|
public class LevelManager : GameplayComponent, IDynamicLevelData
|
||||||
{
|
{
|
||||||
/** Extracted them here for easy to change reason */
|
/** Safe-zone coordinates to prevent enemies to instantly kill you*/
|
||||||
private const int XMaxEnemyPosition = 5;
|
private const int XMaxEnemyPosition = 4;
|
||||||
private const int YMinEnemyPosition = -5;
|
private const int YMinEnemyPosition = -4;
|
||||||
|
|
||||||
public Count DestructibleWallCount
|
public Count DestructibleWallCount
|
||||||
{
|
{
|
||||||
|
@ -205,8 +205,8 @@ namespace src.Level
|
||||||
private void SetupLevelEnemies()
|
private void SetupLevelEnemies()
|
||||||
{
|
{
|
||||||
var numberOfEnemiesToPlace = _enemyCount.RandomIntRange();
|
var numberOfEnemiesToPlace = _enemyCount.RandomIntRange();
|
||||||
_freeGridPositions.ShuffleList();
|
|
||||||
_freeGridPositions.RemoveAll(pos => pos.x <= XMaxEnemyPosition && pos.y >= YMinEnemyPosition);
|
_freeGridPositions.RemoveAll(pos => pos.x <= XMaxEnemyPosition && pos.y >= YMinEnemyPosition);
|
||||||
|
_freeGridPositions.ShuffleList();
|
||||||
foreach (var nextPosition in _freeGridPositions)
|
foreach (var nextPosition in _freeGridPositions)
|
||||||
{
|
{
|
||||||
if (numberOfEnemiesToPlace == 0)
|
if (numberOfEnemiesToPlace == 0)
|
||||||
|
|
Loading…
Reference in a new issue