public override object GetValue(ConnectionPoint point) { SymboleManager.DrawSymbole(GetInstanceID()); double a = System.Convert.ToDouble(GetInputValue <object>("A")); double b = System.Convert.ToDouble(GetInputValue <object>("B")); // After you've gotten your input values, you can perform your calculations and return a value if (point.name == "Result") { switch (m_mathType) { case MathType.Divide: if (b != 0) { return(a / b); } return(0); case MathType.Multiply: return(a * b); case MathType.Add: default: return(a + b); case MathType.Subtract: return(a - b); } } else { return(base.GetValue(point)); } }
public override void Function() { if (InputConnected("A")) { switch (m_debugLogType) { case DebugLogType.Log: SymboleManager.DrawSymbole(GetInstanceID()); object a = GetInputValue <object>("A"); Debug.Log(a); break; } } }
public override object GetValue(ConnectionPoint point) { SymboleManager.DrawSymbole(GetInstanceID()); string name = GetInputValue <string>("Name"); if (!string.IsNullOrEmpty(name)) { Name = name; } if (point.name == "Value") { //var Variable = SymboleManager.GetVariable(Name); if (Variable != null) { return(Value = Variable.value); } } return(base.GetValue(point)); }