protected virtual void Dispose(bool disposing) { if (Disposed) { return; } if (disposing) { OnMiniMap.Dispose(); OnWorld.Dispose(); Others.Dispose(); MenuManager.Factory.Dispose(); } Disposed = true; }
private static void EventsOnOnLoad(object sender, EventArgs eventArgs) { MenuManager.Init(); HeroChecker.Init(); DrawingMiniMap.Init(); Others.Init(); Resolution.Init(); TeleportVision.Init(); Roshan_Dead = false; Roshan_Respawn_Min_Time = 480; Roshan_Respawn_Max_Time = 660; A_Timer = new Timer(1000); A_Timer.Elapsed += OnTimedEvent; A_Timer.AutoReset = true; A_Timer.Enabled = true; me = ObjectManager.LocalHero; Entity.OnParticleEffectAdded += OnParticleEvent; Unit.OnModifierAdded += HeroOnOnModifierAdded; Events.OnLoad -= EventsOnOnLoad; Game.OnFireEvent += Game_OnGameEvent; }
public BeAwarePlusConfig(BeAwarePlus BeAwarePlus) { MenuManager = new MenuManager(); Colors = new Colors(); Dangerous = new Dangerous(); EntityToTexture = new EntityToTexture(); ModifierToTexture = new ModifierToTexture(); ParticleToTexture = new ParticleToTexture(); GlobalMiniMap = new GlobalMiniMap(); GlobalWorld = new GlobalWorld(); MessageCreator = new MessageCreator(MenuManager); Resolution = new Resolution(MessageCreator); SoundPlayer = new SoundPlayer(MenuManager); Others = new Others( MenuManager, BeAwarePlus.Context.Owner, MessageCreator, SoundPlayer); DrawHelper = new DrawHelper( MenuManager, BeAwarePlus.Context.Owner, GlobalMiniMap, GlobalWorld); ParticleSpells = new ParticleSpells( MenuManager, BeAwarePlus.Context.Owner, Dangerous, MessageCreator, SoundPlayer, Colors, DrawHelper); ParticleItems = new ParticleItems( MenuManager, BeAwarePlus.Context.Owner, Dangerous, MessageCreator, SoundPlayer, Colors, DrawHelper); ParticleTeleport = new ParticleTeleport( MenuManager, BeAwarePlus.Context.Owner, MessageCreator, SoundPlayer, Colors, GlobalMiniMap, GlobalWorld); Entities = new Entities( MenuManager, BeAwarePlus.Context.Owner, Dangerous, MessageCreator, SoundPlayer, Colors, GlobalMiniMap, GlobalWorld); Modifiers = new Modifiers( MenuManager, BeAwarePlus.Context.Owner, Dangerous, MessageCreator, SoundPlayer, Colors, GlobalMiniMap, GlobalWorld); OnMiniMap = new OnMiniMap( MenuManager, BeAwarePlus.Render, GlobalMiniMap); OnWorld = new OnWorld( MenuManager, GlobalWorld, ParticleToTexture); }