|
|
|
@ -17,6 +17,7 @@ namespace Fungus
|
|
|
|
|
typeof(FloatVariable), |
|
|
|
|
typeof(StringVariable), |
|
|
|
|
typeof(AnimatorVariable), |
|
|
|
|
typeof(AudioSourceVariable), |
|
|
|
|
typeof(GameObjectVariable))] |
|
|
|
|
[SerializeField] protected Variable variable; |
|
|
|
|
|
|
|
|
@ -35,6 +36,9 @@ namespace Fungus
|
|
|
|
|
[Tooltip("Animator value to compare against")] |
|
|
|
|
[SerializeField] protected AnimatorData animatorData; |
|
|
|
|
|
|
|
|
|
[Tooltip("AudioSource value to compare against")] |
|
|
|
|
[SerializeField] protected AudioSourceData audioSourceData; |
|
|
|
|
|
|
|
|
|
[Tooltip("GameObject value to compare against")] |
|
|
|
|
[SerializeField] protected GameObjectData gameObjectData; |
|
|
|
|
|
|
|
|
@ -72,6 +76,11 @@ namespace Fungus
|
|
|
|
|
AnimatorVariable animatorVariable = (variable as AnimatorVariable); |
|
|
|
|
condition = animatorVariable.Evaluate(compareOperator, animatorData.Value); |
|
|
|
|
} |
|
|
|
|
else if (variable.GetType() == typeof(AudioSourceVariable)) |
|
|
|
|
{ |
|
|
|
|
AudioSourceVariable audioSourceVariable = (variable as AudioSourceVariable); |
|
|
|
|
condition = audioSourceVariable.Evaluate(compareOperator, audioSourceData.Value); |
|
|
|
|
} |
|
|
|
|
else if (variable.GetType() == typeof(GameObjectVariable)) |
|
|
|
|
{ |
|
|
|
|
GameObjectVariable gameObjectVariable = (variable as GameObjectVariable); |
|
|
|
@ -94,6 +103,7 @@ namespace Fungus
|
|
|
|
|
{ typeof(FloatVariable), FloatVariable.compareOperators }, |
|
|
|
|
{ typeof(StringVariable), StringVariable.compareOperators }, |
|
|
|
|
{ typeof(AnimatorVariable), AnimatorVariable.compareOperators }, |
|
|
|
|
{ typeof(AudioSourceVariable), AudioSourceVariable.compareOperators }, |
|
|
|
|
{ typeof(GameObjectVariable), GameObjectVariable.compareOperators } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -132,6 +142,10 @@ namespace Fungus
|
|
|
|
|
{ |
|
|
|
|
summary += animatorData.GetDescription(); |
|
|
|
|
} |
|
|
|
|
else if (variable.GetType() == typeof(AudioSourceVariable)) |
|
|
|
|
{ |
|
|
|
|
summary += audioSourceData.GetDescription(); |
|
|
|
|
} |
|
|
|
|
else if (variable.GetType() == typeof(GameObjectVariable)) |
|
|
|
|
{ |
|
|
|
|
summary += gameObjectData.GetDescription(); |
|
|
|
|