/// <summary> /// Removes the command event listeners. /// </summary> /// <param name="evt">The event object.</param> private void RemoveCommandEventListeners(QuickUnity.Events.Event evt) { CommandEvent commandEvent = (CommandEvent)evt; ICommand command = (ICommand)commandEvent.target; if (command != null) { command.RemoveEventListenersByTarget(this); } }
/// <summary> /// Called when [command got error]. /// </summary> /// <param name="evt">The evt.</param> private void OnCommandError(QuickUnity.Events.Event evt) { RemoveCommandEventListeners(evt); if (!m_stopWhenError) { Next(); } else { DispatchEvent(new CommandQueueEvent(CommandQueueEvent.Interrupt)); } }
/// <summary> /// Called when [command has executed]. /// </summary> /// <param name="evt">The evt.</param> private void OnCommandExecuted(QuickUnity.Events.Event evt) { RemoveCommandEventListeners(evt); Next(); }