// PRAGMA MARK - ITransitionCondition Implementation public override bool IsConditionMet(TransitionContext context) { if (!context.graphContext.HasBoolParameterKey(this._key)) { return(false); } return(this._targetValue == context.graphContext.GetBool(this._key)); }
// PRAGMA MARK - ITransitionCondition Implementation public override bool IsConditionMet(TransitionContext context) { if (!context.graphContext.HasTriggerParameterKey(this._key)) { return(false); } return(context.graphContext.HasTrigger(this._key)); }
public IList <NodeTransition> GetOutgoingTransitionsForNode(Node node) { IList <NodeTransition> nodeTransitions = this._graphData.GetOutgoingTransitionsForNode(node); foreach (NodeTransition nodeTransition in nodeTransitions) { Transition transition = nodeTransition.transition; if (!transition.HasContext()) { TransitionContext transitionContext = new TransitionContext { graphContext = this._context, nodeContext = new GraphNodeContext(this, node) }; transition.ConfigureWithContext(transitionContext); } } return(nodeTransitions); }
// PRAGMA MARK - ITransition Implementation public void ConfigureWithContext(TransitionContext context) { this._context = context; }
// PRAGMA MARK - ITransitionCondition Implementation public abstract bool IsConditionMet(TransitionContext context);
public virtual void HandleTransitionUsed(TransitionContext context) { }
public override void HandleTransitionUsed(TransitionContext context) { context.graphContext.ResetTrigger(this._key); }