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