コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
        /// <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));
            }
        }
コード例 #3
0
        /// <summary>
        /// Called when [command has executed].
        /// </summary>
        /// <param name="evt">The evt.</param>
        private void OnCommandExecuted(QuickUnity.Events.Event evt)
        {
            RemoveCommandEventListeners(evt);

            Next();
        }