mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
33 lines
653 B
C#
33 lines
653 B
C#
using UnityEngine;
|
|
|
|
namespace CinemaDirector
|
|
{
|
|
[CutsceneItem("Particle System", "Play", new CutsceneItemGenre[] { CutsceneItemGenre.ActorItem })]
|
|
public class PlayParticleSystemEvent : CinemaActorEvent
|
|
{
|
|
public override void Trigger(GameObject actor)
|
|
{
|
|
if (actor != null)
|
|
{
|
|
ParticleSystem component = actor.GetComponent<ParticleSystem>();
|
|
if (component != null)
|
|
{
|
|
component.Play();
|
|
}
|
|
}
|
|
}
|
|
|
|
public override void Reverse(GameObject actor)
|
|
{
|
|
if (actor != null)
|
|
{
|
|
ParticleSystem component = actor.GetComponent<ParticleSystem>();
|
|
if (component != null)
|
|
{
|
|
component.Stop();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|