2019-10-03 09:43:11 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.Experimental.VFX;
|
|
|
|
|
|
|
|
|
|
public class FlareBind : MonoBehaviour
|
|
|
|
|
{
|
2019-10-04 19:58:32 +00:00
|
|
|
|
[SerializeField] private VisualEffect flareEffect = null;
|
2019-10-03 09:43:11 +00:00
|
|
|
|
private static readonly string Spread = "spread";
|
|
|
|
|
|
|
|
|
|
public void OnEnergyChanged(float energy)
|
|
|
|
|
{
|
2019-10-04 18:30:18 +00:00
|
|
|
|
flareEffect.SetFloat(Spread, energy * 0.1f + 0.1f);
|
2019-10-03 09:43:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|