protected override void OnDeactivate() { Game.OnUpdate -= Game_OnUpdate; Player.OnExecuteOrder -= Player_OnExecuteAction; Drawing.OnDraw -= Drawing_OnDraw; ObjectManager.OnAddEntity -= ObjectManager_OnAddEntity; Unit.OnModifierAdded -= Unit_OnModifierAdded; Unit.OnModifierRemoved -= Unit_OnModifierRemoved; Entity.OnParticleEffectAdded -= Entity_OnParticleEffectAdded; evader.OnClose(); }
private void OnClose(object sender, EventArgs e) { Events.OnClose -= OnClose; Game.OnUpdate -= Game_OnUpdate; Player.OnExecuteOrder -= Player_OnExecuteAction; Drawing.OnDraw -= Drawing_OnDraw; ObjectManager.OnAddEntity -= ObjectManager_OnAddEntity; Unit.OnModifierAdded -= Unit_OnModifierAdded; Unit.OnModifierRemoved -= Unit_OnModifierRemoved; Entity.OnParticleEffectAdded -= Entity_OnParticleEffectAdded; evader.OnClose(); }