Forest_Client/Forest/Assets/PhxhSDK/Phxh/Utils/Utils.ParticleSystem.cs

39 lines
942 B
C#
Raw Normal View History

2024-06-12 15:01:54 +08:00
using UnityEngine;
namespace PhxhSDK
{
public static partial class Utils
{
public static void Play(ParticleSystem ps, bool withChildren)
{
ps?.Play(withChildren);
}
public static void Play(ParticleSystem[] pss, bool withChildren)
{
if (pss != null)
{
for (int i = 0; i < pss.Length; i++)
{
pss[i].Play(withChildren);
}
}
}
public static void Stop(ParticleSystem ps, bool withChildren)
{
ps?.Stop(withChildren);
}
public static void Stop(ParticleSystem[] pss, bool withChildren)
{
if (pss != null)
{
for (int i = 0; i < pss.Length; i++)
{
pss[i].Stop(withChildren);
}
}
}
}
}