soundvision/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/script/SmokeBind.cs

14 lines
356 B
C#
Raw Normal View History

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