Ejemplo n.º 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));
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 // PRAGMA MARK - ITransition Implementation
 public void ConfigureWithContext(TransitionContext context)
 {
     this._context = context;
 }
Ejemplo n.º 5
0
 // PRAGMA MARK - ITransitionCondition Implementation
 public abstract bool IsConditionMet(TransitionContext context);
Ejemplo n.º 6
0
 public virtual void HandleTransitionUsed(TransitionContext context)
 {
 }
 public override void HandleTransitionUsed(TransitionContext context)
 {
     context.graphContext.ResetTrigger(this._key);
 }