2020-01-13 15:20:47 +00:00
|
|
|
|
using UnityEngine;
|
2020-03-04 20:47:24 +00:00
|
|
|
|
using UnityEngine.VFX;
|
2020-01-13 15:20:47 +00:00
|
|
|
|
|
|
|
|
|
namespace cylvester
|
|
|
|
|
{
|
|
|
|
|
public class VFXValueBinder : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
[SerializeField] private VisualEffect targetVFX_ = null;
|
|
|
|
|
[SerializeField] private string valueName_ = "Value_1";
|
|
|
|
|
|
|
|
|
|
public void OnEnergyChanged(float value)
|
|
|
|
|
{
|
|
|
|
|
targetVFX_.SetFloat(valueName_, value * .1f);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|