public void Dispose() { ObjectRegistry?.Dispose(); ObjectRegistry = null; Actions?.Dispose(); Actions = null; Initiative?.Dispose(); Initiative = null; Hotkeys?.Dispose(); Hotkeys = null; BuffDebuff?.Dispose(); BuffDebuff = null; }
public D20System() { Conditions = new ConditionRegistry(); Conditions.Register(GlobalCondition.Conditions); foreach (var conditionSpec in GlobalCondition.Conditions) { Conditions.AttachGlobally(conditionSpec); } Conditions.Register(ContentDiscovery.Conditions); foreach (var(featId, condition) in ContentDiscovery.FeatConditions) { FeatConditionMapping.Mapping[featId] = new FeatConditionMapping.FeatCondition(condition); } Logger.Info("Registered {0} conditions.", Conditions.Count); Conditions.WarnAboutPendingExtensions(); BonusSystem = new BonusSystem(); Status = new D20StatusSystem(); // TODO ObjectRegistry = new D20ObjectRegistry(); Actions = new D20ActionSystem(); Initiative = new D20Initiative(); RadialMenu = new RadialMenuSystem(); Hotkeys = new HotkeySystem(); BuffDebuff = new D20BuffDebuffSystem(); Damage = new D20DamageSystem(); Combat = new D20CombatSystem(); Experience = new D20ExperienceSystem(); }