public void StartPlacingObject(ModalObject obj) { SelectionManager.Instance.DeselectAll(); objectToPlace = obj; objectToPlace.SetState(ModalObject.PlacementState.MOVING); placeObjectStartTime = Time.time; UIManager.Instance.DisablePlacementMenu(); }
public void ObjectPlaced() { if (objectToPlace.IsValidSurface(surfaceTracker.mTargetSurface)) { objectToPlace.SetState(ModalObject.PlacementState.PLACED); SelectionManager.Instance.ObjectSelected(objectToPlace); objectToPlace = null; UIManager.Instance.EnablePlacementMenu(); UIManager.Instance.HideInstructions(); } else { // play sound } }