Nez.Portable/AI/BehaviorTree/Decorators/ConditionalDecorator.cs
/// <summary>
/// executes the conditional either following the shouldReevaluate flag or with an option to force an update. Aborts will force the
/// update to make sure they get the proper data if a Conditional changes.
/// </summary>
/// <returns>The conditional.</returns>
/// <param name="context">Context.</param>
/// <param name="forceUpdate">If set to <c>true</c> force update.</param>
executes the conditional either following the shouldReevaluate flag or with an option to force an update. Aborts will force the
update to make sure they get the proper data if a Conditional changes.
executes the conditional either following the shouldReevaluate flag or with an option to force an update . Aborts will force the update to make sure they get the proper data if a Conditional changes .
internal TaskStatus executeConditional(T context, bool forceUpdate = false)
        {
            if (forceUpdate || _shouldReevaluate || _conditionalStatus == TaskStatus.Invalid)
                _conditionalStatus = _conditional.update(context);
            return _conditionalStatus;
        }
internal TaskStatus executeConditional ( T context , bool forceUpdate = false ) { if ( forceUpdate || _shouldReevaluate || _conditionalStatus == TaskStatus . Invalid ) _conditionalStatus = _conditional . update ( context ) ; return _conditionalStatus ; }
executes the conditional either following the shouldReevaluate flag or with an option to force an update.
executes the conditional either following the shouldReevaluate flag or with an option to force an update .
None
context
T
None
forceUpdate
bool
If set to true
If set to true