Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/CollisionParticles.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

261 lines
7.7 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
// Token: 0x0200065B RID: 1627
[Token(Token = "0x200065B")]
public class CollisionParticles : MonoBehaviour
{
// Token: 0x06002F74 RID: 12148 RVA: 0x000C0E28 File Offset: 0x000BF028
[Token(Token = "0x6002F74")]
[Address(RVA = "0x1C54A40", Offset = "0x1C53A40", VA = "0x181C54A40")]
private void Awake()
{
Tool component = base.GetComponent<Tool>();
this.NBHJPDBHDHB = component;
}
// Token: 0x06002F75 RID: 12149 RVA: 0x000C0E44 File Offset: 0x000BF044
[Token(Token = "0x6002F75")]
[Address(RVA = "0x1C54D20", Offset = "0x1C53D20", VA = "0x181C54D20")]
private void OnDestroy()
{
CollisionParticles.ParticlesToLayer[] array = this.particleMappings;
int num = 0;
int length = array.Length;
if (num < length)
{
ParticleSystem particleSystem = array[num].NDIHCPHPFMK();
int num2 = 0;
if (particleSystem != num2)
{
particleSystem.Stop();
global::UnityEngine.Object.Destroy(particleSystem.gameObject);
}
num++;
}
}
// Token: 0x06002F76 RID: 12150 RVA: 0x000C0E9C File Offset: 0x000BF09C
[Token(Token = "0x6002F76")]
[Address(RVA = "0x1C54F00", Offset = "0x1C53F00", VA = "0x181C54F00")]
private void OnEnable()
{
MeleeWeaponCollider[] array = this.meleeWeaponColliders;
int num = 0;
int length = array.Length;
if (num < length)
{
MeleeWeaponCollider meleeWeaponCollider = array[num];
MeleeWeaponCollider.MMFFGBGIAAD mmffgbgiaad = new MeleeWeaponCollider.MMFFGBGIAAD(this.DHOMIDPOPJB);
meleeWeaponCollider.HJKPKBBLGOJ += mmffgbgiaad;
num++;
}
}
// Token: 0x06002F77 RID: 12151 RVA: 0x000C0EE8 File Offset: 0x000BF0E8
[Token(Token = "0x6002F77")]
[Address(RVA = "0x1C54E30", Offset = "0x1C53E30", VA = "0x181C54E30")]
private void OnDisable()
{
MeleeWeaponCollider[] array = this.meleeWeaponColliders;
int num = 0;
int length = array.Length;
if (num < length)
{
MeleeWeaponCollider meleeWeaponCollider = array[num];
MeleeWeaponCollider.MMFFGBGIAAD mmffgbgiaad = new MeleeWeaponCollider.MMFFGBGIAAD(this.DHOMIDPOPJB);
meleeWeaponCollider.HJKPKBBLGOJ -= mmffgbgiaad;
num++;
}
}
// Token: 0x06002F78 RID: 12152 RVA: 0x000C0F34 File Offset: 0x000BF134
[Token(Token = "0x6002F78")]
[Address(RVA = "0x1C54A80", Offset = "0x1C53A80", VA = "0x181C54A80")]
private void DHOMIDPOPJB(MeleeWeaponCollider BCFFGDFHJMK, GHMDIDJLFMC KNLMJBAKCGF)
{
}
// Token: 0x06002F79 RID: 12153 RVA: 0x000C0F44 File Offset: 0x000BF144
[Token(Token = "0x6002F79")]
[Address(RVA = "0x1C54C60", Offset = "0x1C53C60", VA = "0x181C54C60")]
private void OnCollisionEnter(Collision GBJHLKOJGPB)
{
Tool nbhjpdbhdhb = this.NBHJPDBHDHB;
int num = 0;
if (!(nbhjpdbhdhb != num) || !this.NBHJPDBHDHB.FNFNLDBILFE)
{
GameObject gameObject = GBJHLKOJGPB.collider.gameObject;
this.JJALMFBIPKL(gameObject);
}
}
// Token: 0x06002F7A RID: 12154 RVA: 0x000C0F8C File Offset: 0x000BF18C
[Token(Token = "0x6002F7A")]
[Address(RVA = "0x1C54AA0", Offset = "0x1C53AA0", VA = "0x181C54AA0")]
private void JJALMFBIPKL(GameObject PGPKHKFMPLD)
{
CollisionParticles.ParticlesToLayer[] array = this.particleMappings;
int num = 0;
int length = array.Length;
if (num < length)
{
CollisionParticles.ParticlesToLayer particlesToLayer = array[num];
int layer = PGPKHKFMPLD.layer;
float time = Time.time;
if (time > particlesToLayer.InstanceLimitDuration && time < particlesToLayer.InstanceLimitDuration)
{
if (string.IsNullOrEmpty(particlesToLayer.Tag))
{
goto IL_6A;
}
string tag = particlesToLayer.Tag;
if (PGPKHKFMPLD.CompareTag(tag))
{
goto IL_6A;
}
}
num++;
IL_6A:
float time2 = Time.time;
particlesToLayer.<LastInstanceTime>k__BackingField = time2;
ParticleSystem particleSystem = particlesToLayer.NDIHCPHPFMK();
int num2 = 0;
if (particleSystem != num2)
{
particleSystem.Stop();
Transform transform = particleSystem.transform;
Transform transform2 = base.transform;
Vector3 vector;
float z = vector.z;
particleSystem.Play();
}
}
}
// Token: 0x06002F7B RID: 12155 RVA: 0x000C105C File Offset: 0x000BF25C
[Token(Token = "0x6002F7B")]
[Address(RVA = "0x428AD0", Offset = "0x427AD0", VA = "0x180428AD0")]
public CollisionParticles()
{
}
// Token: 0x0400273A RID: 10042
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400273A")]
[SerializeField]
public CollisionParticles.ParticlesToLayer[] particleMappings;
// Token: 0x0400273B RID: 10043
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400273B")]
[SerializeField]
[Tooltip("MeleeWeaponColliders that can trigger the collision audio in addition to normal physics collisions.")]
private MeleeWeaponCollider[] meleeWeaponColliders;
// Token: 0x0400273C RID: 10044
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400273C")]
private Tool NBHJPDBHDHB;
// Token: 0x0200065C RID: 1628
[Token(Token = "0x200065C")]
[Serializable]
public class ParticlesToLayer
{
// Token: 0x1700083A RID: 2106
// (get) Token: 0x06002F7C RID: 12156 RVA: 0x000C1070 File Offset: 0x000BF270
// (set) Token: 0x06002F7D RID: 12157 RVA: 0x000C1084 File Offset: 0x000BF284
[Token(Token = "0x1700083A")]
public float LastInstanceTime
{
[Token(Token = "0x6002F7C")]
[Address(RVA = "0x562390", Offset = "0x561390", VA = "0x180562390")]
get;
[Token(Token = "0x6002F7D")]
[Address(RVA = "0x562AC0", Offset = "0x561AC0", VA = "0x180562AC0")]
set;
}
// Token: 0x06002F7E RID: 12158 RVA: 0x000C1098 File Offset: 0x000BF298
[Token(Token = "0x6002F7E")]
[Address(RVA = "0x1C6C450", Offset = "0x1C6B450", VA = "0x181C6C450")]
public ParticleSystem NDIHCPHPFMK()
{
ParticleSystem particleSystem = this.particleSystemInstance;
int num = 0;
if (particleSystem == num)
{
ParticleSystem particleSystem2 = global::UnityEngine.Object.Instantiate<ParticleSystem>(this.ParticleSystemPrefab);
this.particleSystemInstance = particleSystem2;
}
return this.particleSystemInstance;
}
// Token: 0x06002F7F RID: 12159 RVA: 0x000C10D4 File Offset: 0x000BF2D4
[Token(Token = "0x6002F7F")]
[Address(RVA = "0x1C6C3A0", Offset = "0x1C6B3A0", VA = "0x181C6C3A0")]
public bool BOBJDACCBKO(GameObject NNNMGKGMIFG)
{
int layer = NNNMGKGMIFG.layer;
float time = Time.time;
if (time > this.InstanceLimitDuration && time < this.InstanceLimitDuration)
{
string tag = this.Tag;
if (layer == 0)
{
string tag2 = this.Tag;
if (!NNNMGKGMIFG.CompareTag(tag2))
{
goto IL_53;
}
}
float time2 = Time.time;
this.<LastInstanceTime>k__BackingField = time2;
return true;
}
IL_53:
throw new NullReferenceException();
}
// Token: 0x06002F80 RID: 12160 RVA: 0x000C113C File Offset: 0x000BF33C
[Token(Token = "0x6002F80")]
[Address(RVA = "0x1C6C4F0", Offset = "0x1C6B4F0", VA = "0x181C6C4F0")]
public ParticlesToLayer()
{
}
// Token: 0x0400273D RID: 10045
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400273D")]
public string Name;
// Token: 0x0400273E RID: 10046
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400273E")]
public ParticleSystem ParticleSystemPrefab;
// Token: 0x0400273F RID: 10047
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400273F")]
public LayerMask Layers;
// Token: 0x04002740 RID: 10048
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4002740")]
public string Tag = "";
// Token: 0x04002741 RID: 10049
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4002741")]
[Tooltip("Per particle cooldown to limit the number of consequtive plays. Set it to the particle duration")]
public float InstanceLimitDuration;
// Token: 0x04002743 RID: 10051
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x4002743")]
private ParticleSystem particleSystemInstance;
}
}