public void SelectOperation() { CompositeUI cUI = GetComponentInParent <CompositeUI> (); if (cUI.IsSelected) { bot.SelectOperation(index); } }
public void DeselectBlock(string name) { GameObject block = getBlock(name); if (block != null) { CompositeUI blockUI = block.GetComponent <CompositeUI> (); blockUI.Deselect(); } }
public void DeselectOperation(string compName, int index) { GameObject comp = getBlock(compName); if (comp != null) { CompositeUI compUI = comp.GetComponent <CompositeUI> (); compUI.DeSelectOperation(index); } }
public void RemoveOperationFromBlock(string blockName, int index) { if (blockName == "Main") { CompositeUI cUI = MainBlock.GetComponent <CompositeUI> (); if (cUI != null) { cUI.RemoveOperation(index); } } else { CompositeUI cUI = P1Block.GetComponent <CompositeUI> (); if (cUI != null) { cUI.RemoveOperation(index); } } }
public void AddOperationToBlock(string blockName, string opName) { if (blockName == "Main") { CompositeUI cUI = MainBlock.GetComponent <CompositeUI> (); if (cUI != null) { cUI.AddOperation(opName); } } else { CompositeUI cUI = P1Block.GetComponent <CompositeUI> (); if (cUI != null) { cUI.AddOperation(opName); } } }
public void EnableBlock(string name, int limit) { if (name == "Main") { MainBlock.SetActive(true); CompositeUI compUI = MainBlock.GetComponent <CompositeUI> (); compUI.Select(); if (compUI != null) { compUI.Init(name, limit); } } else { P1Block.SetActive(true); CompositeUI compUI = P1Block.GetComponent <CompositeUI> (); compUI.Deselect(); if (compUI != null) { compUI.Init(name, limit); } } }