using UnityEngine;
namespace NextMind.Examples.Feedbacks
{
///
/// Simple component used to trigger a particle burst from a given particle system.
///
public class NeuroTagParticleBurst : MonoBehaviour
{
[SerializeField]
private new ParticleSystem particleSystem = null;
#region Unity Methods
private void Start()
{
particleSystem.Stop();
}
#endregion
#region NeuroTags events
///
/// Play the particles burst when the user focus on the NeuroTag.
/// Triggered by the NeuroTag.
///
public void OnTriggered()
{
particleSystem.Play();
}
///
/// Stop the particles burst when the focus is released from the NeuroTag.
/// Triggered by the NeuroTag.
///
public void OnReleased()
{
particleSystem.Stop();
}
#endregion
}
}