using CinemaDirector.Helpers;
using System.Collections.Generic;
using UnityEngine;
namespace CinemaDirector
{
///
/// Enable the Actor related to this event.
///
[CutsceneItemAttribute("Particle System", "Stop", CutsceneItemGenre.ActorItem)]
public class StopParticleSystemEvent : CinemaActorEvent
{
///
/// Trigger the particle system to stop.
///
/// The actor to be triggered.
public override void Trigger(GameObject actor)
{
if (actor != null)
{
ParticleSystem ps = actor.GetComponent();
if (ps != null)
{
ps.Stop();
}
}
}
///
/// Reverse this event and play the particle system.
///
/// The actor to reverse this event on.
public override void Reverse(GameObject actor)
{
if (actor != null)
{
ParticleSystem ps = actor.GetComponent();
if (ps != null)
{
ps.Play();
}
}
}
}
}