Пример #1
0
 public override void GetOutputs(IList <VariableDefinition> outputs)
 {
     if (InstructionStore.IsOutput(EffectVariable))
     {
         outputs.Add(new VariableDefinition {
             Name = EffectVariable.RootName, Definition = ValueDefinition.Create <GameObject>()
         });
     }
 }
Пример #2
0
 public override void GetOutputs(List <VariableDefinition> outputs)
 {
     foreach (var output in Instruction.Outputs)
     {
         if (InstructionStore.IsOutput(output))
         {
             outputs.Add(output.Definition);
         }
     }
 }
Пример #3
0
 public override void GetOutputs(IList <VariableDefinition> outputs)
 {
     if (Source == InstructionSource.Value)
     {
         foreach (var output in Instruction.Outputs)
         {
             if (InstructionStore.IsOutput(output))
             {
                 outputs.Add(Instruction.GetOutputDefinition(output));
             }
         }
     }
 }
Пример #4
0
        public virtual void GetOutputs(IList <VariableDefinition> outputs)
        {
            var fields = GetType().GetFields(BindingFlags.Instance | BindingFlags.Public);

            foreach (var field in fields)
            {
                if (field.FieldType == typeof(VariableReference))
                {
                    var value = field.GetValue(this) as VariableReference;
                    if (InstructionStore.IsOutput(value))
                    {
                        outputs.Add(new VariableDefinition {
                            Name = value.RootName, Definition = ValueDefinition.Create(VariableType.Empty)
                        });
                    }
                }
                else if (field.FieldType == typeof(Expression))
                {
                    var value = field.GetValue(this) as Expression;
                    value.GetOutputs(outputs, InstructionStore.OutputStoreName);
                }
            }
        }