public VariableDistanceState(VariableState _sub1, VariableState _sub2, float _value = Mathf.NegativeInfinity) : this(_sub1, _value) { description = "Distance of variable <" + _sub1.variableName + "> between " + _sub1.name + " and " + _sub2.name; stateVar2 = _sub2; state2 = _sub2; if (_value == Mathf.NegativeInfinity) { if ((stateVar1 != null && stateVar2 != null) && (stateVar1.GetType() == stateVar2.GetType())) { //Debug.Log(stateVar1.GetType()); //Debug.Log(stateVar2.GetType()); //Debug.Log(stateVar1.Diff(stateVar2)); value = new Parameter <float>(stateVar1.Diff(stateVar2)); } else { value = null; } } else { value = new Parameter <float>(_value); } }
public VariableDistanceState(VariableDistanceState _vds, VariableState _sub2) : this(_vds.stateVar1, _sub2, Mathf.NegativeInfinity) { }
public static bool IsSameVariable(VariableState v1, VariableState v2) { return(v1.HasSameIdentity(v2)); }
public virtual float Diff(VariableState other) { return(999999); }
public AutoVariableState(Terminus _sub, string _variableName, bool _value) { variableState = new BoolVariableState(_sub, _variableName, _value); }
public virtual float Diff(VariableState other) { return(variableState.Diff(other)); }
public AutoVariableState(Terminus _sub, string _variableName, Vector3 _value) { variableState = new VectorVariableState(_sub, _variableName, _value); }
public AutoVariableState(Terminus _sub, string _variableName, float _value) { variableState = new FloatVariableState(_sub, _variableName, _value); }
public AutoVariableState(Terminus _sub, string _variableName, int _value) { variableState = new IntVariableState(_sub, _variableName, _value); }