/// <summary> /// Adds the specified sense to this SenseManager. /// </summary> /// <param name="sense">The sense to add.</param> public void AddSense(Sense sense) { lock (this.lockObject) { this.senses.Add(sense.SensoryType, sense); } }
/// <summary> /// Determines if the collection of senses contain the specified sense. /// </summary> /// <param name="sense">The sense to search for.</param> /// <returns>True if the collection of senses contains this sense, else false.</returns> public bool Contains(Sense sense) { return this.senses.ContainsKey(sense.SensoryType); }
/// <summary> /// Removes the specified sense from this SenseManager. /// </summary> /// <param name="sense">The sense to remove.</param> public void RemoveSense(Sense sense) { lock (this.lockObject) { this.senses.Remove(sense.SensoryType); } }
/// <summary>Determines if the collection of senses contain the specified sense.</summary> /// <param name="sense">The sense to search for.</param> /// <returns>True if the collection of senses contains this sense, else false.</returns> public bool Contains(Sense sense) { return(SenseDictionary.ContainsKey(sense.SensoryType)); }