Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/RecRoom/SparkleOutline.cs
T
2026-04-08 23:40:05 +02:00

328 lines
12 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
using RecRoom.Core.Rendering;
using UnityEngine;
using UnityEngine.Serialization;
namespace RecRoom
{
// Token: 0x02001C57 RID: 7255
[Token(Token = "0x2001C57")]
[StructLayout(3)]
public class SparkleOutline : MonoBehaviour
{
// Token: 0x0600C26A RID: 49770 RVA: 0x002DD5B0 File Offset: 0x002DB7B0
[Token(Token = "0x600C26A")]
[Address(RVA = "0x14F6100", Offset = "0x14F4B00", VA = "0x1814F6100")]
private void Awake()
{
Material material = this.overrideMaterialTemplate;
int num = 0;
if (material != num)
{
Material material2 = SparkleRendererEffect.InstantiateMaterialWithMobileShaderIfNecessary(this.overrideMaterialTemplate);
this.CBFNKJFKEEE = material2;
}
List<MeshRenderer> pclmnnehlng = this.PCLMNNEHLNG;
MeshRenderer[] componentsInChildren = base.GetComponentsInChildren<MeshRenderer>();
pclmnnehlng.AddRange(componentsInChildren);
MeshRenderer[] array = this.ignoredRenderers;
if (array != 0)
{
int num2 = 0;
if (num2 < array.Length)
{
List<MeshRenderer> pclmnnehlng2 = this.PCLMNNEHLNG;
MeshRenderer meshRenderer = array[num2];
bool flag = pclmnnehlng2.Remove(meshRenderer);
MeshRenderer[] array2 = this.ignoredRenderers;
num2++;
}
}
}
// Token: 0x0600C26B RID: 49771 RVA: 0x002DD648 File Offset: 0x002DB848
[Token(Token = "0x600C26B")]
[Address(RVA = "0x14F6650", Offset = "0x14F5050", VA = "0x1814F6650")]
private void OnEnable()
{
this.KGFFMEICLNN();
}
// Token: 0x0600C26C RID: 49772 RVA: 0x002DD65C File Offset: 0x002DB85C
[Token(Token = "0x600C26C")]
[Address(RVA = "0x14F6660", Offset = "0x14F5060", VA = "0x1814F6660")]
private void Update()
{
if (this.NJPHOAJLPMH.OLGMEEIPCAL)
{
if (this.visibleInCamera.GDPKBEBEOBA)
{
Coroutine pkhigoopcmm = this.PKHIGOOPCMM;
if (pkhigoopcmm != 0)
{
base.StopCoroutine(pkhigoopcmm);
this.PKHIGOOPCMM = (ulong)0L;
}
SparkleOutline.HILEPAEOPFA hilepaeopfa;
hilepaeopfa.System.IDisposable.Dispose();
hilepaeopfa.<>1__state = (int)((ulong)0L);
hilepaeopfa.<>4__this = this;
Coroutine coroutine = base.StartCoroutine(hilepaeopfa);
this.PKHIGOOPCMM = coroutine;
}
this.KGFFMEICLNN();
return;
}
}
// Token: 0x0600C26D RID: 49773 RVA: 0x002DD6D4 File Offset: 0x002DB8D4
[Token(Token = "0x600C26D")]
[Address(RVA = "0x14F65B0", Offset = "0x14F4FB0", VA = "0x1814F65B0")]
private void OnDestroy()
{
Material cbfnkjfkeee = this.CBFNKJFKEEE;
int num = 0;
if (cbfnkjfkeee != num)
{
global::UnityEngine.Object.Destroy(this.CBFNKJFKEEE);
}
}
// Token: 0x0600C26E RID: 49774 RVA: 0x002DD700 File Offset: 0x002DB900
[Token(Token = "0x600C26E")]
[Address(RVA = "0x14F6450", Offset = "0x14F4E50", VA = "0x1814F6450")]
private static void NIPJEBDFJBK(float LIMOILDIGKF, out float CLHJLKJMGJG, out float HBDKDAKKJMO)
{
AnimationCurve ffphamgdhhc = SparkleOutline.FFPHAMGDHHC;
float num = Mathf.Clamp01(LIMOILDIGKF);
float num2 = ffphamgdhhc.Evaluate(num);
CLHJLKJMGJG.m_value = num2;
AnimationCurve mnedkohbcho = SparkleOutline.MNEDKOHBCHO;
num = Mathf.Clamp01(LIMOILDIGKF);
float num3 = mnedkohbcho.Evaluate(num);
HBDKDAKKJMO.m_value = num3;
}
// Token: 0x0600C26F RID: 49775 RVA: 0x002DD750 File Offset: 0x002DB950
[Token(Token = "0x600C26F")]
[Address(RVA = "0x14F62E0", Offset = "0x14F4CE0", VA = "0x1814F62E0")]
private void KGFFMEICLNN()
{
MACMLJJGBIM njphoajlpmh = this.NJPHOAJLPMH;
float num = this.maxSparklePeriod;
float num2 = global::UnityEngine.Random.Range(this.minSparklePeriod, num);
num = num2;
num = Mathf.Max(num2, num);
njphoajlpmh.KGFFMEICLNN(num);
}
// Token: 0x0600C270 RID: 49776 RVA: 0x002DD790 File Offset: 0x002DB990
[Token(Token = "0x600C270")]
[Address(RVA = "0x14F6230", Offset = "0x14F4C30", VA = "0x1814F6230")]
private void FKOFNDDOGFB()
{
if (this.visibleInCamera.GDPKBEBEOBA)
{
Coroutine pkhigoopcmm = this.PKHIGOOPCMM;
if (pkhigoopcmm != 0)
{
base.StopCoroutine(pkhigoopcmm);
this.PKHIGOOPCMM = (ulong)0L;
}
SparkleOutline.HILEPAEOPFA hilepaeopfa;
hilepaeopfa.System.IDisposable.Dispose();
hilepaeopfa.<>1__state = (int)((ulong)0L);
hilepaeopfa.<>4__this = this;
Coroutine coroutine = base.StartCoroutine(hilepaeopfa);
this.PKHIGOOPCMM = coroutine;
}
}
// Token: 0x0600C271 RID: 49777 RVA: 0x002DD7F4 File Offset: 0x002DB9F4
[Token(Token = "0x600C271")]
[Address(RVA = "0x14F63C0", Offset = "0x14F4DC0", VA = "0x1814F63C0")]
private void MPCEAFGCNHL()
{
Coroutine pkhigoopcmm = this.PKHIGOOPCMM;
if (pkhigoopcmm != 0)
{
base.StopCoroutine(pkhigoopcmm);
this.PKHIGOOPCMM = (ulong)0L;
}
SparkleOutline.HILEPAEOPFA hilepaeopfa;
hilepaeopfa.System.IDisposable.Dispose();
hilepaeopfa.<>1__state = (int)((ulong)0L);
hilepaeopfa.<>4__this = this;
Coroutine coroutine = base.StartCoroutine(hilepaeopfa);
this.PKHIGOOPCMM = coroutine;
}
// Token: 0x0600C272 RID: 49778 RVA: 0x002DD844 File Offset: 0x002DBA44
[Token(Token = "0x600C272")]
[Address(RVA = "0x145F460", Offset = "0x145DE60", VA = "0x18145F460")]
private void LAIBFHODMMK()
{
Coroutine pkhigoopcmm = this.PKHIGOOPCMM;
if (pkhigoopcmm != 0)
{
base.StopCoroutine(pkhigoopcmm);
this.PKHIGOOPCMM = (ulong)0L;
}
}
// Token: 0x0600C273 RID: 49779 RVA: 0x002DD86C File Offset: 0x002DBA6C
[Token(Token = "0x600C273")]
[Address(RVA = "0x14F6550", Offset = "0x14F4F50", VA = "0x1814F6550")]
private IEnumerator NODHKDEGGPF()
{
/*
An exception occurred when decompiling this method (0600C273)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator RecRoom.SparkleOutline::NODHKDEGGPF()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
call:void(HILEPAEOPFA::System.IDisposable.Dispose, ldloc:HILEPAEOPFA(var_0))
stfld:int32(HILEPAEOPFA::<>1__state, ldloc:HILEPAEOPFA(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
stfld:SparkleOutline(HILEPAEOPFA::<>4__this, ldloc:HILEPAEOPFA(var_0), ldloc:SparkleOutline(this))
}
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
--- End of inner exception stack trace ---
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
*/;
}
// Token: 0x0600C274 RID: 49780 RVA: 0x002DD890 File Offset: 0x002DBA90
[Token(Token = "0x600C274")]
[Address(RVA = "0x14F6B90", Offset = "0x14F5590", VA = "0x1814F6B90")]
public SparkleOutline()
{
MACMLJJGBIM macmljjgbim = new MACMLJJGBIM();
this.NJPHOAJLPMH = macmljjgbim;
List<MeshRenderer> list = new List();
this.PCLMNNEHLNG = list;
base..ctor();
}
// Token: 0x0600C275 RID: 49781 RVA: 0x002DD8D4 File Offset: 0x002DBAD4
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600C275")]
[Address(RVA = "0x14F6730", Offset = "0x14F5130", VA = "0x1814F6730")]
static SparkleOutline()
{
Keyframe[] array = new Keyframe[6];
int num = 0;
array[0] = num;
array[3] = num;
int num2 = 0;
array[3] = num2;
array[6] = num2;
int num3 = 0;
array[7] = num3;
array[10] = num3;
int num4 = 0;
array[10] = num3;
array[13] = num4;
int num5 = 0;
array[14] = num3;
array[17] = num5;
int num6 = 0;
array[17] = num3;
array[20] = num6;
SparkleOutline.MNEDKOHBCHO = new AnimationCurve(array);
Keyframe[] array2 = new Keyframe[3];
int num7 = 0;
array2[0] = num3;
array2[3] = num7;
int num8 = 0;
array2[3] = num3;
array2[6] = num8;
int num9 = 0;
array2[7] = num3;
array2[10] = num9;
SparkleOutline.FFPHAMGDHHC = new AnimationCurve(array2);
}
// Token: 0x0400806F RID: 32879
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400806F")]
[SerializeField]
[OCIDFHDICIP(JIBDPHMGEGO.Self, false, false)]
private Tool tool;
// Token: 0x04008070 RID: 32880
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4008070")]
[SerializeField]
[DDPIINEJFMD(JIBDPHMGEGO.Self, false, false)]
private VisibleInCamera visibleInCamera;
// Token: 0x04008071 RID: 32881
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4008071")]
[SerializeField]
private float minSparklePeriod = 2f;
// Token: 0x04008072 RID: 32882
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
[Token(Token = "0x4008072")]
[SerializeField]
private float maxSparklePeriod = 10f;
// Token: 0x04008073 RID: 32883
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4008073")]
[SerializeField]
[FormerlySerializedAs("overrideMaterial")]
private Material overrideMaterialTemplate;
// Token: 0x04008074 RID: 32884
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4008074")]
private Material CBFNKJFKEEE;
// Token: 0x04008075 RID: 32885
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4008075")]
[SerializeField]
private MeshRenderer[] ignoredRenderers;
// Token: 0x04008076 RID: 32886
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x4008076")]
private MACMLJJGBIM NJPHOAJLPMH;
// Token: 0x04008077 RID: 32887
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x4008077")]
private Coroutine PKHIGOOPCMM;
// Token: 0x04008078 RID: 32888
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x4008078")]
private List<MeshRenderer> PCLMNNEHLNG;
// Token: 0x04008079 RID: 32889
[Token(Token = "0x4008079")]
private static readonly float IFFOAFFAHME;
// Token: 0x0400807A RID: 32890
[Token(Token = "0x400807A")]
private static readonly AnimationCurve MNEDKOHBCHO;
// Token: 0x0400807B RID: 32891
[Token(Token = "0x400807B")]
private static readonly AnimationCurve FFPHAMGDHHC;
}
}