示例#1
0
    public void SelectOperation()
    {
        CompositeUI cUI = GetComponentInParent <CompositeUI> ();

        if (cUI.IsSelected)
        {
            bot.SelectOperation(index);
        }
    }
示例#2
0
    public void DeselectBlock(string name)
    {
        GameObject block = getBlock(name);

        if (block != null)
        {
            CompositeUI blockUI = block.GetComponent <CompositeUI> ();
            blockUI.Deselect();
        }
    }
示例#3
0
    public void DeselectOperation(string compName, int index)
    {
        GameObject comp = getBlock(compName);

        if (comp != null)
        {
            CompositeUI compUI = comp.GetComponent <CompositeUI> ();

            compUI.DeSelectOperation(index);
        }
    }
示例#4
0
 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);
         }
     }
 }
示例#5
0
 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);
         }
     }
 }
示例#6
0
    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);
            }
        }
    }