void GenerateTestAffixContainer() { AffixContainer container = new AffixContainer(); Affix health1 = AffixInfo.GetAffixInfo(AffixType.Health).GenerateAffix(2); container.Add(health1); container.Add(AffixInfo.GetAffixInfo(AffixType.Health).GenerateAffix(2)); container.Add(health1); container.Add(AffixInfo.GetAffixInfo(AffixType.PhysDmgFlat).GenerateAffix(3)); print(container); container.Remove(health1); print(container); Affix fireRate = AffixInfo.GetAffixInfo(AffixType.FireRate).GenerateAffix(5); container.Remove(fireRate); Affix health2 = AffixInfo.GetAffixInfo(AffixType.Health).GenerateAffix(3); container.Remove(health2); }
/// <summary> /// Propagates the removal of an affix upwards. /// </summary> /// <param name="affix"></param> protected void PropagateRemove(Affix affix) { parent?.Remove(affix); }