Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

261 lines
7.7 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
// Token: 0x02000650 RID: 1616
[Token(Token = "0x2000650")]
public class CollisionParticles : MonoBehaviour
{
// Token: 0x06002EF3 RID: 12019 RVA: 0x000C02D4 File Offset: 0x000BE4D4
[Token(Token = "0x6002EF3")]
[Address(RVA = "0x10E71E0", Offset = "0x10E5FE0", VA = "0x1810E71E0")]
private void Awake()
{
Tool component = base.GetComponent<Tool>();
this.NBHJPDBHDHB = component;
}
// Token: 0x06002EF4 RID: 12020 RVA: 0x000C02F0 File Offset: 0x000BE4F0
[Token(Token = "0x6002EF4")]
[Address(RVA = "0x10E74C0", Offset = "0x10E62C0", VA = "0x1810E74C0")]
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: 0x06002EF5 RID: 12021 RVA: 0x000C0348 File Offset: 0x000BE548
[Token(Token = "0x6002EF5")]
[Address(RVA = "0x10E76A0", Offset = "0x10E64A0", VA = "0x1810E76A0")]
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: 0x06002EF6 RID: 12022 RVA: 0x000C0394 File Offset: 0x000BE594
[Token(Token = "0x6002EF6")]
[Address(RVA = "0x10E75D0", Offset = "0x10E63D0", VA = "0x1810E75D0")]
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: 0x06002EF7 RID: 12023 RVA: 0x000C03E0 File Offset: 0x000BE5E0
[Token(Token = "0x6002EF7")]
[Address(RVA = "0x10E7220", Offset = "0x10E6020", VA = "0x1810E7220")]
private void DHOMIDPOPJB(MeleeWeaponCollider BCFFGDFHJMK, GHMDIDJLFMC KNLMJBAKCGF)
{
}
// Token: 0x06002EF8 RID: 12024 RVA: 0x000C03F0 File Offset: 0x000BE5F0
[Token(Token = "0x6002EF8")]
[Address(RVA = "0x10E7400", Offset = "0x10E6200", VA = "0x1810E7400")]
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: 0x06002EF9 RID: 12025 RVA: 0x000C0438 File Offset: 0x000BE638
[Token(Token = "0x6002EF9")]
[Address(RVA = "0x10E7240", Offset = "0x10E6040", VA = "0x1810E7240")]
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: 0x06002EFA RID: 12026 RVA: 0x000C0508 File Offset: 0x000BE708
[Token(Token = "0x6002EFA")]
[Address(RVA = "0x74EA40", Offset = "0x74D840", VA = "0x18074EA40")]
public CollisionParticles()
{
}
// Token: 0x040026D4 RID: 9940
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40026D4")]
[SerializeField]
public CollisionParticles.ParticlesToLayer[] particleMappings;
// Token: 0x040026D5 RID: 9941
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40026D5")]
[SerializeField]
[Tooltip("MeleeWeaponColliders that can trigger the collision audio in addition to normal physics collisions.")]
private MeleeWeaponCollider[] meleeWeaponColliders;
// Token: 0x040026D6 RID: 9942
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40026D6")]
private Tool NBHJPDBHDHB;
// Token: 0x02000651 RID: 1617
[Token(Token = "0x2000651")]
[Serializable]
public class ParticlesToLayer
{
// Token: 0x17000828 RID: 2088
// (get) Token: 0x06002EFB RID: 12027 RVA: 0x000C051C File Offset: 0x000BE71C
// (set) Token: 0x06002EFC RID: 12028 RVA: 0x000C0530 File Offset: 0x000BE730
[Token(Token = "0x17000828")]
public float LastInstanceTime
{
[Token(Token = "0x6002EFB")]
[Address(RVA = "0xA9DE10", Offset = "0xA9CC10", VA = "0x180A9DE10")]
get;
[Token(Token = "0x6002EFC")]
[Address(RVA = "0xA9DC30", Offset = "0xA9CA30", VA = "0x180A9DC30")]
set;
}
// Token: 0x06002EFD RID: 12029 RVA: 0x000C0544 File Offset: 0x000BE744
[Token(Token = "0x6002EFD")]
[Address(RVA = "0x10FECA0", Offset = "0x10FDAA0", VA = "0x1810FECA0")]
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: 0x06002EFE RID: 12030 RVA: 0x000C0580 File Offset: 0x000BE780
[Token(Token = "0x6002EFE")]
[Address(RVA = "0x10FEBF0", Offset = "0x10FD9F0", VA = "0x1810FEBF0")]
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: 0x06002EFF RID: 12031 RVA: 0x000C05E8 File Offset: 0x000BE7E8
[Token(Token = "0x6002EFF")]
[Address(RVA = "0x10FED40", Offset = "0x10FDB40", VA = "0x1810FED40")]
public ParticlesToLayer()
{
}
// Token: 0x040026D7 RID: 9943
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40026D7")]
public string Name;
// Token: 0x040026D8 RID: 9944
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40026D8")]
public ParticleSystem ParticleSystemPrefab;
// Token: 0x040026D9 RID: 9945
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40026D9")]
public LayerMask Layers;
// Token: 0x040026DA RID: 9946
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40026DA")]
public string Tag = "";
// Token: 0x040026DB RID: 9947
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40026DB")]
[Tooltip("Per particle cooldown to limit the number of consequtive plays. Set it to the particle duration")]
public float InstanceLimitDuration;
// Token: 0x040026DD RID: 9949
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40026DD")]
private ParticleSystem particleSystemInstance;
}
}