Ejemplo n.º 1
0
		/// <summary>
		/// Creates a <see cref="ModifierCollection" /> object with the given <see cref="Unit" /> as the owner.
		/// </summary>
		/// <param name="unit">the <see cref="Unit" /> that this collection belongs to</param>
		public ModifierCollection(Unit unit)
		{
			m_owner = unit;

            m_modifiers = new ModifierDictionary();

			foreach(ModifierCategory colType in Enum.GetValues(typeof(ModifierCategory)))
			{
                ModifierGroup tempDict = new ModifierGroup();

				foreach(ModifierType statType in Enum.GetValues(typeof(ModifierType)))
				{
					tempDict.Add(statType, 0.0);
				}

                m_modifiers.Add(colType, tempDict);
			}

            m_changes = new LinkedList<ModifierType>();

			m_changeLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
		}
Ejemplo n.º 2
0
 public EquipmentObject()
 {
     modifiers = new ModifierDictionary();
 }