public bool Contains(string key, GOAPState state) { if (!_states.ContainsKey(key)) { return(false); } return(_states[key].Equals(state)); }
public void Add(string key, GOAPState state) { if (!GOAPBlanksManager.Instance.Contains(key)) { throw new Exception($"Нет элемента с ключом {key}"); } if (GOAPBlanksManager.Instance.Blanks[key] != state.Type) { throw new Exception($"Нет элемента \"{key}\" с типом {state.Type}"); } _states.Add(key, state); }
public bool Contains(string key, GOAPState state) { if (!_state.HasValue) { return(false); } if (_state.Value.Key != key) { return(false); } return(_state.Value.Value.Equals(state)); }
public void Add(string key, object value) { var goapState = new GOAPState(value); Add(key, goapState); }
public void Set(string key, GOAPState state) { _states[key].SetValue(state); }
public void Set(string key, GOAPState state) { Set(new KeyValuePair <string, GOAPState>(key, state)); }