public void Unload() { foreach (PointBlankCommand command in PointBlankCommandManager.Commands) { if (typeof(FireworksCommand).IsAssignableFrom(command.GetType())) { PointBlankCommandManager.UnloadCommand(command); } } }
public static void UnregisterCommand(IRocketCommand command) { try { PointBlankCommand cmd = PointBlankCommandManager.Commands.FirstOrDefault(a => typeof(FireworksCommand).IsAssignableFrom(a.GetType()) && ((FireworksCommand)a)._RocketCommand == command); if (cmd == null) { return; } PointBlankCommandManager.UnloadCommand(cmd); } catch (Exception ex) { return; } }