|
|
@ -200,62 +200,62 @@ namespace Fungus |
|
|
|
case "System.Int32": |
|
|
|
case "System.Int32": |
|
|
|
var intvalue = flowChart.GetVariable<IntegerVariable>(item.variableKey); |
|
|
|
var intvalue = flowChart.GetVariable<IntegerVariable>(item.variableKey); |
|
|
|
if (intvalue != null) |
|
|
|
if (intvalue != null) |
|
|
|
objValue = intvalue.value; |
|
|
|
objValue = intvalue.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "System.Boolean": |
|
|
|
case "System.Boolean": |
|
|
|
var boolean = flowChart.GetVariable<BooleanVariable>(item.variableKey); |
|
|
|
var boolean = flowChart.GetVariable<BooleanVariable>(item.variableKey); |
|
|
|
if (boolean != null) |
|
|
|
if (boolean != null) |
|
|
|
objValue = boolean.value; |
|
|
|
objValue = boolean.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "System.Single": |
|
|
|
case "System.Single": |
|
|
|
var floatvalue = flowChart.GetVariable<FloatVariable>(item.variableKey); |
|
|
|
var floatvalue = flowChart.GetVariable<FloatVariable>(item.variableKey); |
|
|
|
if (floatvalue != null) |
|
|
|
if (floatvalue != null) |
|
|
|
objValue = floatvalue.value; |
|
|
|
objValue = floatvalue.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "System.String": |
|
|
|
case "System.String": |
|
|
|
var stringvalue = flowChart.GetVariable<StringVariable>(item.variableKey); |
|
|
|
var stringvalue = flowChart.GetVariable<StringVariable>(item.variableKey); |
|
|
|
if (stringvalue != null) |
|
|
|
if (stringvalue != null) |
|
|
|
objValue = stringvalue.value; |
|
|
|
objValue = stringvalue.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Color": |
|
|
|
case "UnityEngine.Color": |
|
|
|
var color = flowChart.GetVariable<ColorVariable>(item.variableKey); |
|
|
|
var color = flowChart.GetVariable<ColorVariable>(item.variableKey); |
|
|
|
if (color != null) |
|
|
|
if (color != null) |
|
|
|
objValue = color.value; |
|
|
|
objValue = color.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.GameObject": |
|
|
|
case "UnityEngine.GameObject": |
|
|
|
var gameObject = flowChart.GetVariable<GameObjectVariable>(item.variableKey); |
|
|
|
var gameObject = flowChart.GetVariable<GameObjectVariable>(item.variableKey); |
|
|
|
if (gameObject != null) |
|
|
|
if (gameObject != null) |
|
|
|
objValue = gameObject.value; |
|
|
|
objValue = gameObject.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Material": |
|
|
|
case "UnityEngine.Material": |
|
|
|
var material = flowChart.GetVariable<MaterialVariable>(item.variableKey); |
|
|
|
var material = flowChart.GetVariable<MaterialVariable>(item.variableKey); |
|
|
|
if (material != null) |
|
|
|
if (material != null) |
|
|
|
objValue = material.value; |
|
|
|
objValue = material.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Sprite": |
|
|
|
case "UnityEngine.Sprite": |
|
|
|
var sprite = flowChart.GetVariable<SpriteVariable>(item.variableKey); |
|
|
|
var sprite = flowChart.GetVariable<SpriteVariable>(item.variableKey); |
|
|
|
if (sprite != null) |
|
|
|
if (sprite != null) |
|
|
|
objValue = sprite.value; |
|
|
|
objValue = sprite.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Texture": |
|
|
|
case "UnityEngine.Texture": |
|
|
|
var texture = flowChart.GetVariable<TextureVariable>(item.variableKey); |
|
|
|
var texture = flowChart.GetVariable<TextureVariable>(item.variableKey); |
|
|
|
if (texture != null) |
|
|
|
if (texture != null) |
|
|
|
objValue = texture.value; |
|
|
|
objValue = texture.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Vector2": |
|
|
|
case "UnityEngine.Vector2": |
|
|
|
var vector2 = flowChart.GetVariable<Vector2Variable>(item.variableKey); |
|
|
|
var vector2 = flowChart.GetVariable<Vector2Variable>(item.variableKey); |
|
|
|
if (vector2 != null) |
|
|
|
if (vector2 != null) |
|
|
|
objValue = vector2.value; |
|
|
|
objValue = vector2.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Vector3": |
|
|
|
case "UnityEngine.Vector3": |
|
|
|
var vector3 = flowChart.GetVariable<Vector3Variable>(item.variableKey); |
|
|
|
var vector3 = flowChart.GetVariable<Vector3Variable>(item.variableKey); |
|
|
|
if (vector3 != null) |
|
|
|
if (vector3 != null) |
|
|
|
objValue = vector3.value; |
|
|
|
objValue = vector3.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
var obj = flowChart.GetVariable<ObjectVariable>(item.variableKey); |
|
|
|
var obj = flowChart.GetVariable<ObjectVariable>(item.variableKey); |
|
|
|
if (obj != null) |
|
|
|
if (obj != null) |
|
|
|
objValue = obj.value; |
|
|
|
objValue = obj.Value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -273,40 +273,40 @@ namespace Fungus |
|
|
|
switch (returnType) |
|
|
|
switch (returnType) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case "System.Int32": |
|
|
|
case "System.Int32": |
|
|
|
flowChart.GetVariable<IntegerVariable>(key).value = (int)value; |
|
|
|
flowChart.GetVariable<IntegerVariable>(key).Value = (int)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "System.Boolean": |
|
|
|
case "System.Boolean": |
|
|
|
flowChart.GetVariable<BooleanVariable>(key).value = (bool)value; |
|
|
|
flowChart.GetVariable<BooleanVariable>(key).Value = (bool)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "System.Single": |
|
|
|
case "System.Single": |
|
|
|
flowChart.GetVariable<FloatVariable>(key).value = (float)value; |
|
|
|
flowChart.GetVariable<FloatVariable>(key).Value = (float)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "System.String": |
|
|
|
case "System.String": |
|
|
|
flowChart.GetVariable<StringVariable>(key).value = (string)value; |
|
|
|
flowChart.GetVariable<StringVariable>(key).Value = (string)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Color": |
|
|
|
case "UnityEngine.Color": |
|
|
|
flowChart.GetVariable<ColorVariable>(key).value = (UnityEngine.Color)value; |
|
|
|
flowChart.GetVariable<ColorVariable>(key).Value = (UnityEngine.Color)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.GameObject": |
|
|
|
case "UnityEngine.GameObject": |
|
|
|
flowChart.GetVariable<GameObjectVariable>(key).value = (UnityEngine.GameObject)value; |
|
|
|
flowChart.GetVariable<GameObjectVariable>(key).Value = (UnityEngine.GameObject)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Material": |
|
|
|
case "UnityEngine.Material": |
|
|
|
flowChart.GetVariable<MaterialVariable>(key).value = (UnityEngine.Material)value; |
|
|
|
flowChart.GetVariable<MaterialVariable>(key).Value = (UnityEngine.Material)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Sprite": |
|
|
|
case "UnityEngine.Sprite": |
|
|
|
flowChart.GetVariable<SpriteVariable>(key).value = (UnityEngine.Sprite)value; |
|
|
|
flowChart.GetVariable<SpriteVariable>(key).Value = (UnityEngine.Sprite)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Texture": |
|
|
|
case "UnityEngine.Texture": |
|
|
|
flowChart.GetVariable<TextureVariable>(key).value = (UnityEngine.Texture)value; |
|
|
|
flowChart.GetVariable<TextureVariable>(key).Value = (UnityEngine.Texture)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Vector2": |
|
|
|
case "UnityEngine.Vector2": |
|
|
|
flowChart.GetVariable<Vector2Variable>(key).value = (UnityEngine.Vector2)value; |
|
|
|
flowChart.GetVariable<Vector2Variable>(key).Value = (UnityEngine.Vector2)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case "UnityEngine.Vector3": |
|
|
|
case "UnityEngine.Vector3": |
|
|
|
flowChart.GetVariable<Vector3Variable>(key).value = (UnityEngine.Vector3)value; |
|
|
|
flowChart.GetVariable<Vector3Variable>(key).Value = (UnityEngine.Vector3)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
default: |
|
|
|
default: |
|
|
|
flowChart.GetVariable<ObjectVariable>(key).value = (UnityEngine.Object)value; |
|
|
|
flowChart.GetVariable<ObjectVariable>(key).Value = (UnityEngine.Object)value; |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|