public void Remove <T>(AStateVarKey <T> key) { lock (values) { values.Remove(key); } }
public void Set <T>(AStateVarKey <T> key, T value) { lock (values) { values[key] = value; } }
public T Get <T>(AStateVarKey <T> key) { lock (values) { if (!values.ContainsKey(key)) { return(default(T)); } return((T)values[key]); } }
public bool ValueEquals <T>(AStateVarKey <T> thisKey, AStateVarKey <T> otherKey, BGoapState otherState) { return(HasKey(thisKey) && otherState.HasKey(otherKey) && values[thisKey] == otherState.values[otherKey]); }
public void SetFromKey <T>(AStateVarKey <T> thisKey, AStateVarKey <T> otherKey, BGoapState otherState) { values[thisKey] = otherState.values[otherKey]; }
protected void AddParametrizedPrecondition <T>(AStateVarKey <T> key, AStateVarKey <T> variable) { preconditions.Add(new GoapStateParametrizedEntry <T>(key, variable)); variables.Add(variable); }
protected void AddParametrizedGenericPrecondition <T, G>(GenericStateVarKeyTemplate <T, G> key, AStateVarKey <T> variableValue, AStateVarKey <G> variableGeneric) { preconditions.Add(new GoapStateGenericParametrizedEntry <T, G>(key, variableGeneric, variableValue)); variables.Add(variableValue); variables.Add(variableGeneric); }
protected void AddStaticPrecondition <T>(AStateVarKey <T> key, T staticValue) { preconditions.Add(new GoapStateEntry <T>(key, staticValue)); }
protected void AddStaticGenericPrecondition <T, G>(GenericStateVarKeyTemplate <T, G> key, AStateVarKey <G> variable, T staticValue) { preconditions.Add(new GoapStateGenericEntry <T, G>(key, staticValue, variable)); variables.Add(variable); }
protected void AddParametrizedEffect <T>(AStateVarKey <T> key, AStateVarKey <T> variable) { effects.Add(new GoapStateParametrizedEntry <T>(key, variable)); variables.Add(variable); }
public GoapStateGenericParametrizedEntry(GenericStateVarKeyTemplate <T, Generic> key, AStateVarKey <Generic> variableAsGeneric, AStateVarKey <T> variableAsParameter) : base(key, default(T), variableAsGeneric) { this.variableAsParameter = variableAsParameter; }
public GoapStateGenericEntry(GenericStateVarKeyTemplate <T, Generic> key, T value, AStateVarKey <Generic> variableAsGeneric) : base(key, value) { this.variableAsGeneric = variableAsGeneric; }
public GoapStateParametrizedEntry(AStateVarKey <T> key, AStateVarKey <T> variableAsParameter) : base(key, default(T)) { this.variableAsParameter = variableAsParameter; }
protected void AddStaticEffect <T>(AStateVarKey <T> key, T staticValue) { effects.Add(new GoapStateEntry <T>(key, staticValue)); }