r2mods/ilspy_dump/ror2_csproj/OnParticleEndEvent.cs

21 lines
371 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
using UnityEngine.Events;
public class OnParticleEndEvent : MonoBehaviour
{
public ParticleSystem particleSystemToTrack;
public UnityEvent onEnd;
private bool particleEnded;
public void Update()
{
if ((bool)particleSystemToTrack && !particleSystemToTrack.IsAlive() && !particleEnded)
{
particleEnded = true;
onEnd.Invoke();
}
}
}