コード例 #1
0
 public void Remove <T>(AStateVarKey <T> key)
 {
     lock (values)
     {
         values.Remove(key);
     }
 }
コード例 #2
0
 public void Set <T>(AStateVarKey <T> key, T value)
 {
     lock (values)
     {
         values[key] = value;
     }
 }
コード例 #3
0
 public T Get <T>(AStateVarKey <T> key)
 {
     lock (values)
     {
         if (!values.ContainsKey(key))
         {
             return(default(T));
         }
         return((T)values[key]);
     }
 }
コード例 #4
0
 public bool ValueEquals <T>(AStateVarKey <T> thisKey, AStateVarKey <T> otherKey, BGoapState otherState)
 {
     return(HasKey(thisKey) && otherState.HasKey(otherKey) && values[thisKey] == otherState.values[otherKey]);
 }
コード例 #5
0
 public void SetFromKey <T>(AStateVarKey <T> thisKey, AStateVarKey <T> otherKey, BGoapState otherState)
 {
     values[thisKey] = otherState.values[otherKey];
 }
コード例 #6
0
 protected void AddParametrizedPrecondition <T>(AStateVarKey <T> key, AStateVarKey <T> variable)
 {
     preconditions.Add(new GoapStateParametrizedEntry <T>(key, variable));
     variables.Add(variable);
 }
コード例 #7
0
 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);
 }
コード例 #8
0
 protected void AddStaticPrecondition <T>(AStateVarKey <T> key, T staticValue)
 {
     preconditions.Add(new GoapStateEntry <T>(key, staticValue));
 }
コード例 #9
0
 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);
 }
コード例 #10
0
 protected void AddParametrizedEffect <T>(AStateVarKey <T> key, AStateVarKey <T> variable)
 {
     effects.Add(new GoapStateParametrizedEntry <T>(key, variable));
     variables.Add(variable);
 }
コード例 #11
0
 public GoapStateGenericParametrizedEntry(GenericStateVarKeyTemplate <T, Generic> key, AStateVarKey <Generic> variableAsGeneric, AStateVarKey <T> variableAsParameter) : base(key, default(T), variableAsGeneric)
 {
     this.variableAsParameter = variableAsParameter;
 }
コード例 #12
0
 public GoapStateGenericEntry(GenericStateVarKeyTemplate <T, Generic> key, T value, AStateVarKey <Generic> variableAsGeneric) : base(key, value)
 {
     this.variableAsGeneric = variableAsGeneric;
 }
コード例 #13
0
 public GoapStateParametrizedEntry(AStateVarKey <T> key, AStateVarKey <T> variableAsParameter) : base(key, default(T))
 {
     this.variableAsParameter = variableAsParameter;
 }
コード例 #14
0
 protected void AddStaticEffect <T>(AStateVarKey <T> key, T staticValue)
 {
     effects.Add(new GoapStateEntry <T>(key, staticValue));
 }