Exemplo n.º 1
0
        /// <summary>
        /// Calls <see cref="ConditionalCommand.Condition"/> and runs the proper command.
        /// </summary>
        protected internal override void _Initialize()
        {
            m_chosenCommand = Condition() ? m_onTrue : m_onFalse;

            // This is a hack to make cancelling the chosen command inside a CommandGroup work properly
            m_chosenCommand.ClearRequirements();

            m_chosenCommand.Start();
        }