Exemple #1
0
    public MethodPackage CreateClone()
    {
        MethodPackage toRet = new MethodPackage(mi);

        toRet.args = args;
        return(toRet);
    }
Exemple #2
0
    public MethodPackage ExtractAsMethodPackage()
    {
        string        name  = funcDropDown.options[funcDropDown.value].text;
        MethodPackage toRet = ReflectionManager.Instance.methodPkgDict[name].CreateClone();
        List <object> args  = new List <object>();

        foreach (UITuringArgSlot argslot in arguementsListPanel.GetComponentsInChildren <UITuringArgSlot>())
        {
            args.Add(argslot.GetValue());
        }
        toRet.args = args.ToArray();
        return(toRet);
    }
Exemple #3
0
    public void DropdownChanged(int newIndex)
    {
        //Redo the side options
        foreach (Transform t in arguementsListPanel)
        {
            GameObject.Destroy(t.gameObject);
        }

        MethodPackage mp = ReflectionManager.Instance.methodPkgDict[funcDropDown.options[newIndex].text];

        foreach (System.Type st in mp.argTypes)
        {
            GameObject go = GameObject.Instantiate(UIControl.instance.GenericTuringArguement);
            go.transform.SetParent(arguementsListPanel);
            go.GetComponent <UITuringArgSlot>().InitializeArgSlot(mp.methodName, st);
            UIControl.instance.attrDesc.text = string.Format("<b>{0}</b> \n {1}", mp.methodName, ((ExposeAntMethodAttribute)(mp.mi.GetCustomAttributes(typeof(ExposeAntMethodAttribute), false)[0])).attrDesc);
        }
    }