Ejemplo n.º 1
0
        /// <summary>
        ///  Helper function used to fire eat events.
        /// </summary>
        /// <param name="e">The eat event arguments.</param>
        /// <param name="clearOnly">Only clear the action, don't fire the event.</param>
        private void OnEatCompleted(EatCompletedEventArgs e, bool clearOnly)
        {
            if (InProgressActions.EatAction != null &&
                e.ActionID == InProgressActions.EatAction.ActionID)
            {
                InProgressActions.SetEatAction(null);
            }

            if (!clearOnly && EatCompleted != null)
            {
                EatCompleted(this, e);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///  Helper function used to fire eat events.
        /// </summary>
        /// <param name="e">The eat event arguments.</param>
        /// <param name="clearOnly">Only clear the action, don't fire the event.</param>
        private void OnEatCompleted(EatCompletedEventArgs e, bool clearOnly)
        {
            if (InProgressActions.EatAction != null &&
                e.ActionID == InProgressActions.EatAction.ActionID)
            {
                InProgressActions.SetEatAction(null);
            }

            if (!clearOnly && EatCompleted != null)
            {
                EatCompleted(this, e);
            }
        }