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); } }
public void ChangeTool(ToolController.Tool newTool) { Unselect(); toolShed.ChangeTool(newTool); if (newTool == ToolController.Tool.LinksCCW || newTool == ToolController.Tool.LinksCW) { DrawArrows(); } usingTool = newTool; }
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); }
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; } }
public void ChangeTool(ToolController.Tool newTool) { ResetTools(); SetTool(newTool); }
public void Select(bool select, ToolController.Tool onTool) { selected = select; SetTool(onTool); }