public bool Save(ref XMLRules.VariableType variable) { bool result = true; variable.AddName(new SchemaString(m_Name)); variable.AddType2(new SchemaLong((long)m_Type)); variable.AddValue(GetConstantFromValue(m_Type, m_Value)); if (m_UpdateScript != null) { ScriptReference scriptReference; if (BaseScript.Save(m_UpdateScript, out scriptReference)) { variable.AddUpdateScript(scriptReference); } else { Debug.LogError("Error saving update script for variable " + m_Name); result = false; } } return(result); }
public Value MakeVariable(string name, AiRuleEngine.VariableType type) { Value newValue = new Value(); XMLRules.VariableType newVariable = new XMLRules.VariableType(); newVariable.AddName(new Altova.Types.SchemaString(name)); newVariable.AddType2(new Altova.Types.SchemaLong((long)type)); newValue.AddVariable(newVariable); return newValue; }
public Value MakeVariable(string name, AiRuleEngine.VariableType type) { Value newValue = new Value(); XMLRules.VariableType newVariable = new XMLRules.VariableType(); newVariable.AddName(new Altova.Types.SchemaString(name)); newVariable.AddType2(new Altova.Types.SchemaLong((long)type)); newValue.AddVariable(newVariable); return(newValue); }