Exemplo n.º 1
0
 private void SetTool(ToolController.Tool tool)
 {
     if (ToolController.Tool.Circles == tool)
     {
         SetCircleToolActive(true, false);
     }
     else if (ToolController.Tool.Sectors == tool)
     {
         SetSectorsToolActive(true);
     }
     else if (ToolController.Tool.Spin == tool)
     {
         SetSpinToolActive(true);
     }
     else if (ToolController.Tool.Play == tool)
     {
         SetPlayToolActive(true);
     }
     else if (ToolController.Tool.LinksCW == tool)
     {
         SetLinkToolActive(true, true);
     }
     else if (ToolController.Tool.LinksCCW == tool)
     {
         SetLinkToolActive(true, false);
     }
     else if (ToolController.Tool.None == tool)
     {
     }
     else
     {
         Debug.LogError("Unrecognized tool ?? " + tool);
     }
 }
Exemplo n.º 2
0
 public void ChangeTool(ToolController.Tool newTool)
 {
     Unselect();
     toolShed.ChangeTool(newTool);
     if (newTool == ToolController.Tool.LinksCCW || newTool == ToolController.Tool.LinksCW)
     {
         DrawArrows();
     }
     usingTool = newTool;
 }
Exemplo n.º 3
0
 public void ChangeTool(ToolController.Tool newTool)
 {
     currentTool = newTool;
     Slot[] slots = transform.GetComponentsInChildren <Slot>(false);
     for (int i = 0; i < slots.Length; i++)
     {
         slots[i].ChangeTool(newTool);
     }
     SelectSlot(-1, -1); //setting null selection
     InfoPanelToolGraphicObject.ChangeToolType(newTool);
 }
Exemplo n.º 4
0
    public void ChangeToolType(ToolController.Tool newTool)
    {
        if (toolType != newTool)
        {
            if (toolGraphic)
            {
                Destroy(toolGraphic);
            }

            switch (newTool)
            {
            case ToolController.Tool.None:
                toolGraphic = null;
                break;

            case ToolController.Tool.Circles:
                toolGraphic = Instantiate(CirclesGraphic, transform);
                break;

            case ToolController.Tool.Sectors:
                toolGraphic = Instantiate(SectorsGraphic, transform);
                break;

            case ToolController.Tool.Spin:
                toolGraphic = Instantiate(SpinGraphic, transform);
                break;

            case ToolController.Tool.LinksCW:
                toolGraphic = Instantiate(LinksCWGraphic, transform);
                break;

            case ToolController.Tool.LinksCCW:
                toolGraphic = Instantiate(LinksCCWGraphic, transform);
                break;

            case ToolController.Tool.Play:
                toolGraphic = Instantiate(PlayGraphic, transform);
                break;

            default:
                Debug.LogError("Tool unrecognized");
                break;
            }

            toolType = newTool;
        }
    }
Exemplo n.º 5
0
 public void ChangeTool(ToolController.Tool newTool)
 {
     ResetTools();
     SetTool(newTool);
 }
Exemplo n.º 6
0
 public void Select(bool select, ToolController.Tool onTool)
 {
     selected = select;
     SetTool(onTool);
 }