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