/** * <summary>Creates a new instance of the 'Variable: Set' Action, set to update a Local bool variable</summary> * <param name = "localVariableID">The ID number of the variable</param> * <param name = "newValue">The variable's new value</param> * <returns>The generated Action</returns> */ public static ActionVarSet CreateNew_Local(int localVariableID, bool newValue) { ActionVarSet newAction = (ActionVarSet)CreateInstance <ActionVarSet>(); newAction.location = VariableLocation.Local; newAction.variableID = localVariableID; newAction.intValue = (newValue) ? 1 : 0; return(newAction); }
/** * <summary>Creates a new instance of the 'Variable: Set' Action, set to update a Local Vector3 variable</summary> * <param name = "localVariableID">The ID number of the variable</param> * <param name = "newValue">The variable's new value</param> * <returns>The generated Action</returns> */ public static ActionVarSet CreateNew_Local(int localVariableID, Vector3 newValue) { ActionVarSet newAction = (ActionVarSet)CreateInstance <ActionVarSet>(); newAction.location = VariableLocation.Local; newAction.variableID = localVariableID; newAction.vector3Value = newValue; return(newAction); }
/** * <summary>Creates a new instance of the 'Variable: Set' Action, set to update a Global float variable</summary> * <param name = "globalVariableID">The ID number of the variable</param> * <param name = "newValue">The variable's new value</param> * <returns>The generated Action</returns> */ public static ActionVarSet CreateNew_Global(int globalVariableID, float newValue) { ActionVarSet newAction = (ActionVarSet)CreateInstance <ActionVarSet>(); newAction.location = VariableLocation.Global; newAction.variableID = globalVariableID; newAction.floatValue = newValue; return(newAction); }
/** * <summary>Creates a new instance of the 'Variable: Set' Action, set to update a Component string variable</summary> * <param name = "variables">The associated Variables component</param> * <param name = "componentVariableID">The ID number of the variable</param> * <param name = "newValue">The variable's new value</param> * <returns>The generated Action</returns> */ public static ActionVarSet CreateNew_Component(Variables variables, int componentVariableID, string newValue) { ActionVarSet newAction = (ActionVarSet)CreateInstance <ActionVarSet>(); newAction.location = VariableLocation.Component; newAction.variables = variables; newAction.variableID = componentVariableID; newAction.stringValue = newValue; return(newAction); }