Example #1
0
    private void CalculatePossibleEnemyMoves()
    {
        pathfinding.ClearPossibleEnemyMoves();

        for (int x = 0; x < map.width; x++)
        {
            for (int y = 0; y < map.height; y++)
            {
                Tile currentTile = map.GetTile(x, y);
                if (currentTile.unit && currentTile.unit.controllingPlayer != currentPlayer)
                {
                    pathfinding.CalculateEnemyPathsAndSetStates(currentTile);
                }
            }
        }
    }