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(); } }
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(); }