예제 #1
0
 public void Activate(object value)
 {
     if (value is int)
     {
         NativeFlowNodeMethods.ActivateOutputInt(ParentNodePointer, PortId, System.Convert.ToInt32(value));
     }
     else if (value is float || value is double)
     {
         NativeFlowNodeMethods.ActivateOutputFloat(ParentNodePointer, PortId, System.Convert.ToSingle(value));
     }
     else if (value is EntityId)
     {
         NativeFlowNodeMethods.ActivateOutputEntityId(ParentNodePointer, PortId, (uint)((EntityId)(object)value)._value);
     }
     else if (value is string)
     {
         NativeFlowNodeMethods.ActivateOutputString(ParentNodePointer, PortId, System.Convert.ToString(value));
     }
     else if (value is bool)
     {
         NativeFlowNodeMethods.ActivateOutputBool(ParentNodePointer, PortId, System.Convert.ToBoolean(value));
     }
     else if (value is Vec3)
     {
         NativeFlowNodeMethods.ActivateOutputVec3(ParentNodePointer, PortId, (Vec3)(object)value);
     }
     else
     {
         throw new ArgumentException("Attempted to activate output with invalid value type!");
     }
 }
예제 #2
0
 public void Activate(float value)
 {
     NativeFlowNodeMethods.ActivateOutputFloat(ParentNodePointer, PortId, value);
 }