public CharacterPlacement(GameObject player, GameObject[] enemies, CountScriptable countEnemies, int width, int heigth)
    {
        _player = player;

        _enemies      = enemies;
        _countEnemies = countEnemies;

        EnemiesAtScene = new List <GameObject>();

        _upperLeft   = new Vector3(1, heigth - 2);
        _upperRight  = new Vector3(width - 2, heigth - 2);
        _bottomLeft  = new Vector3(1, 1);
        _bottomRight = new Vector3(width - 2, 1);
    }
Beispiel #2
0
    public ItemPlacement(GameObject tomatoe, GameObject soda, CountScriptable countTomatoe, CountScriptable countSoda, Transform parent, int maxItems)
    {
        _tomatoe = tomatoe;
        _soda    = soda;

        _countTomatoe = countTomatoe;
        _countSoda    = countSoda;

        _parent = parent;

        MaxItems = maxItems;

        _foods = new List <GameObject>();
    }
    private void Start()
    {
        _currentLevel = 1;
        _respawnPoint = 1;

        _countWalls   = _proceduralBoard.CountWalls;
        _countEnemies = _proceduralBoard.CountEnemies;
        _countFoods   = new CountScriptable[]
        {
            _proceduralBoard.CountTomatoes,
            _proceduralBoard.CountSodas
        };

        _rogues = new List <RogueAI>();

        GetRoguesAtScene();
    }
Beispiel #4
0
 private bool IsReachMinimum(CountScriptable counter) => counter.Count >= counter.minimum;