Exemplo n.º 1
0
    public void SelectPiping(PipingTool.Type type)
    {
        selectedPiping = type;
        if (type == PipingTool.Type.handFree)
        {
            precisionIndicator.StopProgress();
        }
        else
        {
            precisionIndicator.StartProgress();
        }
        timer.StartTimer();
        DeselectAllPipingTools();
        PipingTool selectedTool = PipingToolForType(type);

        selectedTool.Select();
    }
Exemplo n.º 2
0
    private PipingTool PipingToolForType(PipingTool.Type type)
    {
        PipingTool pipingTool = null;

        switch (type)
        {
        case PipingTool.Type.green:
            pipingTool = greenPiping;
            OnSelectedHandsFreeTool?.Invoke(false);
            break;

        case PipingTool.Type.pink:
            pipingTool = pinkPiping;
            OnSelectedHandsFreeTool?.Invoke(false);
            break;

        case PipingTool.Type.purple:
            pipingTool = purplePiping;
            OnSelectedHandsFreeTool?.Invoke(false);
            break;

        case PipingTool.Type.white:
            pipingTool = whitePiping;
            OnSelectedHandsFreeTool?.Invoke(false);
            break;

        case PipingTool.Type.handFree:
            pipingTool = handFreePiping;
            OnSelectedHandsFreeTool?.Invoke(true);
            break;

        default:
            Debug.LogError($"You don't have type {type}");
            break;
        }
        return(pipingTool);
    }