示例#1
0
        // 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));
        }
示例#3
0
        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;
 }
示例#5
0
 // PRAGMA MARK - ITransitionCondition Implementation
 public abstract bool IsConditionMet(TransitionContext context);
示例#6
0
 public virtual void HandleTransitionUsed(TransitionContext context)
 {
 }
 public override void HandleTransitionUsed(TransitionContext context)
 {
     context.graphContext.ResetTrigger(this._key);
 }