public BehaviorResult Behave(AIContext context) { var result = behaveDelegate(context); OnBehaved?.Invoke(this, new BehaviorInvokationEventArgs(result)); return(result); }
public BehaviorResult Behave(AIContext context) { writeDebugInfo(Environment.NewLine + "Invoking " + debugName); behaviorResult = decoratedNode.Behave(context); writeDebugInfo(debugName + " execution terminated: " + behaviorResult); OnBehaved?.Invoke(this, new BehaviorInvokationEventArgs(behaviorResult)); return(behaviorResult); }
private BehaviorResult InvokeAndReturn() { OnBehaved?.Invoke(this, new BehaviorInvokationEventArgs(behaviorResult)); return(behaviorResult); }