示例#1
0
    void OnUIClassSelected(AmiClass animClass)
    {
        AmiClass amiClass = function.variables[lastIArgSelectedID];

        amiClass.className = animClass.className;

        UIFunctionVarButton functionVarButton = functionVarButtons [lastIArgSelectedID];

        functionVarButton.SetValue(animClass.className, lastArgSelected);
    }
示例#2
0
    void AddArguments()
    {
        int id = 0;

        foreach (AmiArgument arg in amiClass.argumentValues)
        {
            List <AmiClass> all = Data.Instance.amiClasses.GetClassesByArg(arg.type);

            //no tiene argumentos
            if (all.Count == 0)
            {
                return;
            }

            UIFunctionVarButton newfunctionVarButton = Instantiate(functionVarButton);
            newfunctionVarButton.transform.SetParent(container);
            newfunctionVarButton.transform.localScale = Vector3.one;


            AmiClass newClass = new AmiClass();

            //si el boton es nuevo:
            if (arg.value == null || arg.value == "")
            {
                //	print ("es nuevo");

                newClass.className = all [0].className;
            }
            else
            {
                //print ("estas editando");
                newClass.className = arg.value;
            }

            newClass.type = arg.type;
            function.variables.Add(newClass);
            newfunctionVarButton.Init(this, arg.type, id);
            newfunctionVarButton.SetValue(newClass.className, arg.type);
            functionVarButtons.Add(newfunctionVarButton);

            id++;
        }
    }