soundvision/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SmokeBind.cs
2019-10-04 21:58:32 +02:00

13 lines
363 B
C#

using UnityEngine;
using UnityEngine.Experimental.VFX;
public class SmokeBind : MonoBehaviour
{
[SerializeField] private VisualEffect smokeEffect = null;
private static readonly string SmokeAnimSpeed = "smokeAnimSpeed";
public void OnEnergyChanged(float energy)
{
smokeEffect.SetFloat(SmokeAnimSpeed, energy * 0.1f + 8f);
}
}