89 lines
3.2 KiB
C#
89 lines
3.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000151 RID: 337
|
|
public static class ParticlePhysicsExtensions
|
|
{
|
|
// Token: 0x060018CE RID: 6350 RVA: 0x0001EB80 File Offset: 0x0001CD80
|
|
public static int GetSafeCollisionEventSize(this ParticleSystem ps)
|
|
{
|
|
return ParticleSystemExtensionsImpl.GetSafeCollisionEventSize(ps);
|
|
}
|
|
|
|
// Token: 0x060018CF RID: 6351 RVA: 0x0001EB9C File Offset: 0x0001CD9C
|
|
public static int GetCollisionEvents(this ParticleSystem ps, GameObject go, List<ParticleCollisionEvent> collisionEvents)
|
|
{
|
|
if (go == null)
|
|
{
|
|
throw new ArgumentNullException("go");
|
|
}
|
|
if (collisionEvents == null)
|
|
{
|
|
throw new ArgumentNullException("collisionEvents");
|
|
}
|
|
return ParticleSystemExtensionsImpl.GetCollisionEvents(ps, go, collisionEvents);
|
|
}
|
|
|
|
// Token: 0x060018D0 RID: 6352 RVA: 0x0001EBE4 File Offset: 0x0001CDE4
|
|
[Obsolete("GetCollisionEvents function using ParticleCollisionEvent[] is deprecated. Use List<ParticleCollisionEvent> instead.", false)]
|
|
public static int GetCollisionEvents(this ParticleSystem ps, GameObject go, ParticleCollisionEvent[] collisionEvents)
|
|
{
|
|
if (go == null)
|
|
{
|
|
throw new ArgumentNullException("go");
|
|
}
|
|
if (collisionEvents == null)
|
|
{
|
|
throw new ArgumentNullException("collisionEvents");
|
|
}
|
|
return ParticleSystemExtensionsImpl.GetCollisionEventsDeprecated(ps, go, collisionEvents);
|
|
}
|
|
|
|
// Token: 0x060018D1 RID: 6353 RVA: 0x0001EC2C File Offset: 0x0001CE2C
|
|
public static int GetSafeTriggerParticlesSize(this ParticleSystem ps, ParticleSystemTriggerEventType type)
|
|
{
|
|
return ParticleSystemExtensionsImpl.GetSafeTriggerParticlesSize(ps, (int)type);
|
|
}
|
|
|
|
// Token: 0x060018D2 RID: 6354 RVA: 0x0001EC48 File Offset: 0x0001CE48
|
|
public static int GetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles)
|
|
{
|
|
if (particles == null)
|
|
{
|
|
throw new ArgumentNullException("particles");
|
|
}
|
|
return ParticleSystemExtensionsImpl.GetTriggerParticles(ps, (int)type, particles);
|
|
}
|
|
|
|
// Token: 0x060018D3 RID: 6355 RVA: 0x0001EC78 File Offset: 0x0001CE78
|
|
public static void SetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles, int offset, int count)
|
|
{
|
|
if (particles == null)
|
|
{
|
|
throw new ArgumentNullException("particles");
|
|
}
|
|
if (offset >= particles.Count)
|
|
{
|
|
throw new ArgumentOutOfRangeException("offset", "offset should be smaller than the size of the particles list.");
|
|
}
|
|
if (offset + count >= particles.Count)
|
|
{
|
|
throw new ArgumentOutOfRangeException("count", "offset+count should be smaller than the size of the particles list.");
|
|
}
|
|
ParticleSystemExtensionsImpl.SetTriggerParticles(ps, (int)type, particles, offset, count);
|
|
}
|
|
|
|
// Token: 0x060018D4 RID: 6356 RVA: 0x0001ECE0 File Offset: 0x0001CEE0
|
|
public static void SetTriggerParticles(this ParticleSystem ps, ParticleSystemTriggerEventType type, List<ParticleSystem.Particle> particles)
|
|
{
|
|
if (particles == null)
|
|
{
|
|
throw new ArgumentNullException("particles");
|
|
}
|
|
ParticleSystemExtensionsImpl.SetTriggerParticles(ps, (int)type, particles, 0, particles.Count);
|
|
}
|
|
}
|
|
}
|