Example #1
0
    private void RefreshValidity()
    {
        MachineManager.PlacementCheckResult intersections = MachineManager.GetIntersections(_targetTransform);

        if (intersections._intersectingMachines.Count == 0 ||
            (intersections._intersectingMachines.Count == 1 && intersections._intersectingMachines[0] == _selectedMachine))
        {
            _isPositionValid = true;
            UiManager.SetMoveConfirmButtonEnabled(true);
        }
        else
        {
            _isPositionValid = false;
            UiManager.SetMoveConfirmButtonEnabled(false);
        }
    }