private void CreateNewVariable(List <GVar> _vars) { if (_vars == null) { return; } GVar newVariable = new GVar(GetIDArray(_vars)); newVariable.label = variableName; newVariable.type = variableType; newVariable.val = 0; newVariable.textVal = string.Empty; newVariable.floatVal = 0f; newVariable.vector3Val = Vector3.zero; _vars.Add(newVariable); ACDebug.Log("Created new " + location.ToString() + " variable '" + variableName + "'"); if (actionFor != null) { if (actionFor is ActionVarSequence) { ActionVarSequence actionVarSequence = (ActionVarSequence)actionFor; actionVarSequence.variableID = newVariable.id; } } }
private void CreateNewVariable(List <GVar> _vars) { if (_vars == null) { return; } GVar newVariable = new GVar(GetIDArray(_vars)); newVariable.label = variableName; newVariable.type = variableType; _vars.Add(newVariable); //AdvGame.GetReferences ().variablesManager.ShowVariable (newVariable.id, location); ACDebug.Log("Created new " + location.ToString() + " variable '" + variableName + "'"); if (actionFor != null) { if (actionFor is ActionVarSequence) { ActionVarSequence actionVarSequence = (ActionVarSequence)actionFor; actionVarSequence.variableID = newVariable.id; } } }
/** * <summary>Creates a new instance of the 'Variable: Run sequence' Action</summary> * <param name = "numOutcomes">The number of different outcomes</param> * <param name = "doLoop">If True, the first outcome will be run the next time after the last outcome is run</param> * <returns>The generated Action</returns> */ public static ActionVarSequence CreateNew(int numOutcomes, bool doLoop) { ActionVarSequence newAction = (ActionVarSequence)CreateInstance <ActionVarSequence>(); newAction.numSockets = numOutcomes; newAction.doLoop = doLoop; return(newAction); }