/// <summary> /// Initializes a new instance of the <see cref="ChangeBundle"/> class. /// </summary> /// <param name="i_Property">The numerical property to change.</param> /// <param name="i_Context">The change context.</param> public ChangeBundle(NumericalProperty <TNumerical, TContext, TModifierReader> i_Property, TContext i_Context = default(TContext)) { Log.DebugAssert(i_Property != null, "Invalid null property."); m_Property = i_Property; m_BaseValue = i_Property.m_BaseValue; m_ChangeTypeMask = ENumericalPropertyChangeType.Bundle; m_AddModifiers = new List <INumericalPropertyModifier <TNumerical, TContext, TModifierReader> >(); m_RemoveModifiers = new List <INumericalPropertyModifier <TNumerical, TContext, TModifierReader> >(); m_Context = i_Context; m_Applied = false; }
/// <summary> /// Sets the property base value. /// </summary> /// <param name="i_Value">The new base value.</param> public void SetBaseValue(TNumerical i_Value) { m_ChangeTypeMask |= ENumericalPropertyChangeType.BaseSet; m_BaseValue = i_Value; }