public void Detach() { if (_manager != null) { _manager.Updated -= Manager_Updated; _manager = null; } }
public void Attach(AutoSplitManager manager) { if (_manager != null) { Detach(); } _manager = manager; _manager.Updated += Manager_Updated; }
public GameMemory() { _ignorePIDs = new List <int>(); AutoSplitManager = new AutoSplitManager(); AutoSplitManager.SplitTriggered += (s, e) => { string debug = e.AutoSplit.Name == "Alduin Defeated" ? $"{AutoSplitManager.AutoSplitList.Count(split => split.Triggered) + 1}/{AutoSplitManager.AutoSplitList.Count()}" : string.Empty; Debug.WriteLine($"[AutoSplitManager] Triggered {e.AutoSplit.Name} {debug} - {_data.FrameCounter}"); FireEvent(OnSplit, this, e); }; }
public void Attach(AutoSplitManager manager) { Detach(); _manager = manager; _manager.Updated += Manager_Updated; }