Пример #1
0
        /**
         * <summary>Creates a new instance of the 'Variable: Pop Up switch' Action, set to switch a Local PopUp variable</summary>
         * <param name = "localVariableID">The ID number of the Local PopUp variable</param>
         * <returns>The generated Action</returns>
         */
        public static ActionVarPopup CreateNew_Local(int localVariableID)
        {
            ActionVarPopup newAction = (ActionVarPopup)CreateInstance <ActionVarPopup>();

            newAction.location   = VariableLocation.Local;
            newAction.variableID = localVariableID;

            GVar variable = newAction.GetVariable();

            if (variable != null)
            {
                newAction.numSockets = variable.GetNumPopUpValues();
            }

            return(newAction);
        }
Пример #2
0
        /**
         * <summary>Creates a new instance of the 'Variable: Pop Up switch' Action, set to switch a Component PopUp variable</summary>
         * <param name = "variables">The variable's associated Variables component</param>
         * <param name = "componentVariableID">The ID number of the Component PopUp variable</param>
         * <returns>The generated Action</returns>
         */
        public static ActionVarPopup CreateNew_Component(Variables variables, int componentVariableID)
        {
            ActionVarPopup newAction = (ActionVarPopup)CreateInstance <ActionVarPopup>();

            newAction.location   = VariableLocation.Component;
            newAction.variables  = variables;
            newAction.variableID = componentVariableID;

            GVar variable = newAction.GetVariable();

            if (variable != null)
            {
                newAction.numSockets = variable.GetNumPopUpValues();
            }

            return(newAction);
        }