Esempio n. 1
0
    public void MapManipulation()
    {
        if (UIhover)
        {
            return;
        }

        //if there is a current action, try construction
        Action act = actionController.currentAction;

        if (act != null)
        {
            if (actionController.CanDrag(act) && dragEnabled)
            {
                UpdateDragging(actionController.DoStraightLine(act));
            }
            else
            {
                UpdateDropping();
            }
        }
        else
        {
            UpdateObjWindow();
        }
    }
Esempio n. 2
0
    void UpdateMenu()
    {
        Action a = actionController.currentAction;

        //if you can drag the structure, disable rotation and enable drag toggling
        if (actionController.CanDrag(a))
        {
            rotateButton.gameObject.SetActive(false);
            dragToggle.gameObject.SetActive(true);

            dragToggle.isOn = interactionController.dragEnabled;
        }

        else
        {
            rotateButton.gameObject.SetActive(true);
            dragToggle.gameObject.SetActive(false);
        }

        undo.interactable = actionController.undoActions.Count > 0;
        UpdatePriceTag();
    }