public Execution Execute <TCtx>(TCtx ctx, InputTriggerPort port) where TCtx : IGraphInstance
        {
            Entity target = ctx.ReadEntity(Target);

            Assert.AreNotEqual(Entity.Null, target, "Referenced graph must have an entity");
            int index = ctx.GetTriggeredIndex(Inputs, port);

            return(ctx.RunNestedGraph(this, target, index));
        }
예제 #2
0
        public void Execute <TCtx>(TCtx ctx, InputTriggerPort port) where TCtx : IGraphInstance
        {
            var readValue = ctx.ReadValueOfType(Value, VariableType);

            ctx.Write(OutValue, readValue);
            ctx.Trigger(Output);
            if (VariableKind == VariableKind.OutputData)
            {
                ctx.TriggerGraphOutput(UInt32.MaxValue);
            }
        }
예제 #3
0
        public void Execute <TCtx>(TCtx ctx, InputTriggerPort port) where TCtx : IGraphInstance
        {
            bool anyMatched = false;
            var  val        = ctx.ReadInt(Selector);

            for (uint i = 0; i < SwitchValues.DataCount; i++)
            {
                if (ctx.ReadInt(SwitchValues.SelectPort(i)) == val)
                {
                    ctx.Trigger(SwitchTriggers.SelectPort(i));
                    anyMatched = true;
                }
            }
            if (!anyMatched)
            {
                ctx.Trigger(Default);
            }
        }
예제 #4
0
 public void Execute <TCtx>(TCtx ctx, InputTriggerPort port) where TCtx : IGraphInstance
 {
     ctx.Write(State, port.GetPort().Index == SetTrue.GetPort().Index);
     ctx.Trigger(Done);
 }
예제 #5
0
 public Execution Execute <TCtx>(TCtx ctx, InputTriggerPort port) where TCtx : IGraphInstance
 {
     ref State state    = ref ctx.GetState(this);
예제 #6
0
 Execution IStateFlowNode.Execute <TCtx>(TCtx ctx, InputTriggerPort port)
 {
     return(ctx.TriggerGraphOutput(OutputIndex));
 }
예제 #7
0
 public void Execute <TCtx>(TCtx ctx, InputTriggerPort port) where TCtx : IGraphInstance
 {
     ctx.Trigger(ctx.ReadBool(Condition) ? IfTrue : IfFalse);
 }