29 lines
704 B
C#
29 lines
704 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
namespace BITKit
|
||
|
{
|
||
|
public class VFXPlayer : MonoBehaviour, IAction
|
||
|
{
|
||
|
public Optional<ParticleSystem[]> allowParticles;
|
||
|
public Optional<Light> allowLight;
|
||
|
public void Excute()
|
||
|
{
|
||
|
if(allowParticles.Allow)
|
||
|
{
|
||
|
foreach (var particle in allowParticles.Value)
|
||
|
{
|
||
|
particle.time = 0;
|
||
|
particle.Play(true);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#if UNITY_EDITOR
|
||
|
[UnityEditor.CustomEditor(typeof(VFXPlayer))]
|
||
|
public class VFXPlayerInspector:BITInspector<VFXPlayer>
|
||
|
{
|
||
|
|
||
|
}
|
||
|
#endif
|
||
|
}
|