|
|
@ -18,6 +18,7 @@ namespace Fungus |
|
|
|
typeof(StringVariable), |
|
|
|
typeof(StringVariable), |
|
|
|
typeof(AnimatorVariable), |
|
|
|
typeof(AnimatorVariable), |
|
|
|
typeof(AudioSourceVariable), |
|
|
|
typeof(AudioSourceVariable), |
|
|
|
|
|
|
|
typeof(ColorVariable), |
|
|
|
typeof(GameObjectVariable))] |
|
|
|
typeof(GameObjectVariable))] |
|
|
|
[SerializeField] protected Variable variable; |
|
|
|
[SerializeField] protected Variable variable; |
|
|
|
|
|
|
|
|
|
|
@ -39,6 +40,9 @@ namespace Fungus |
|
|
|
[Tooltip("AudioSource value to compare against")] |
|
|
|
[Tooltip("AudioSource value to compare against")] |
|
|
|
[SerializeField] protected AudioSourceData audioSourceData; |
|
|
|
[SerializeField] protected AudioSourceData audioSourceData; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("Color value to compare against")] |
|
|
|
|
|
|
|
[SerializeField] protected ColorData colorData; |
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("GameObject value to compare against")] |
|
|
|
[Tooltip("GameObject value to compare against")] |
|
|
|
[SerializeField] protected GameObjectData gameObjectData; |
|
|
|
[SerializeField] protected GameObjectData gameObjectData; |
|
|
|
|
|
|
|
|
|
|
@ -81,6 +85,11 @@ namespace Fungus |
|
|
|
AudioSourceVariable audioSourceVariable = (variable as AudioSourceVariable); |
|
|
|
AudioSourceVariable audioSourceVariable = (variable as AudioSourceVariable); |
|
|
|
condition = audioSourceVariable.Evaluate(compareOperator, audioSourceData.Value); |
|
|
|
condition = audioSourceVariable.Evaluate(compareOperator, audioSourceData.Value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (variable.GetType() == typeof(ColorVariable)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ColorVariable colorVariable = (variable as ColorVariable); |
|
|
|
|
|
|
|
condition = colorVariable.Evaluate(compareOperator, colorData.Value); |
|
|
|
|
|
|
|
} |
|
|
|
else if (variable.GetType() == typeof(GameObjectVariable)) |
|
|
|
else if (variable.GetType() == typeof(GameObjectVariable)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
GameObjectVariable gameObjectVariable = (variable as GameObjectVariable); |
|
|
|
GameObjectVariable gameObjectVariable = (variable as GameObjectVariable); |
|
|
@ -104,6 +113,7 @@ namespace Fungus |
|
|
|
{ typeof(StringVariable), StringVariable.compareOperators }, |
|
|
|
{ typeof(StringVariable), StringVariable.compareOperators }, |
|
|
|
{ typeof(AnimatorVariable), AnimatorVariable.compareOperators }, |
|
|
|
{ typeof(AnimatorVariable), AnimatorVariable.compareOperators }, |
|
|
|
{ typeof(AudioSourceVariable), AudioSourceVariable.compareOperators }, |
|
|
|
{ typeof(AudioSourceVariable), AudioSourceVariable.compareOperators }, |
|
|
|
|
|
|
|
{ typeof(ColorVariable), ColorVariable.compareOperators }, |
|
|
|
{ typeof(GameObjectVariable), GameObjectVariable.compareOperators } |
|
|
|
{ typeof(GameObjectVariable), GameObjectVariable.compareOperators } |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -146,6 +156,10 @@ namespace Fungus |
|
|
|
{ |
|
|
|
{ |
|
|
|
summary += audioSourceData.GetDescription(); |
|
|
|
summary += audioSourceData.GetDescription(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (variable.GetType() == typeof(ColorVariable)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
summary += colorData.GetDescription(); |
|
|
|
|
|
|
|
} |
|
|
|
else if (variable.GetType() == typeof(GameObjectVariable)) |
|
|
|
else if (variable.GetType() == typeof(GameObjectVariable)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
summary += gameObjectData.GetDescription(); |
|
|
|
summary += gameObjectData.GetDescription(); |
|
|
|