Example #1
0
    public void GenerateNewGrid()
    {
        if (_gameGridTiles != null)
        {
            DestroyMapData();
        }

        _worldMap = FindObjectOfType <DynamicWorldMap>();

        GenerateMapData();
        GenerateMapTiles();
        GenerateEnvironment();
        //GenerateDeployPoint();
        //GenerateStartingObjects();
        //Array.Sort(newSegmentAfterCount);

        _pathFinder.AssignGridInfo(_currentGridInfo);

        if (newGameGrid != null)
        {
            newGameGrid(_currentGridInfo);
        }

        _gridCoords.AssignGridInfo(_currentGridInfo);

        _currentSpreadingRoutine = AnomalySpreadingTimer();
        StartCoroutine(_currentSpreadingRoutine);

        //Debug.Log("New grid generated");
    }