public void AbortTaskDueToDeath() { foreach (Command command in CommandQueue) { command.AbortDueToDestroy(); } if (CurrentCommand != null) { CurrentCommand.ResultHandler -= OnCommandFinish; CurrentCommand.AbortDueToDestroy(); } Finish(false, true); }