348 lines
14 KiB
C#
348 lines
14 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using Cpp2IlInjected;
|
|
using UnityEngine;
|
|
|
|
// Token: 0x0200005E RID: 94
|
|
[Token(Token = "0x200005E")]
|
|
public class MicrophoneToolManager : SingletonMonoBehaviour<MicrophoneToolManager>
|
|
{
|
|
// Token: 0x17000072 RID: 114
|
|
// (get) Token: 0x060002A6 RID: 678 RVA: 0x0000E420 File Offset: 0x0000C620
|
|
// (set) Token: 0x060002A7 RID: 679 RVA: 0x0000E434 File Offset: 0x0000C634
|
|
[Token(Token = "0x17000072")]
|
|
public MicrophoneToolManager.KGMOAFBFDAK PIAMEOFOMKN
|
|
{
|
|
[Token(Token = "0x60002A6")]
|
|
[Address(RVA = "0x430CB0", Offset = "0x42FAB0", VA = "0x180430CB0")]
|
|
get;
|
|
[Token(Token = "0x60002A7")]
|
|
[Address(RVA = "0x52A670", Offset = "0x529470", VA = "0x18052A670")]
|
|
private set;
|
|
}
|
|
|
|
// Token: 0x060002A8 RID: 680 RVA: 0x0000E448 File Offset: 0x0000C648
|
|
[Token(Token = "0x60002A8")]
|
|
[Address(RVA = "0xC415D0", Offset = "0xC403D0", VA = "0x180C415D0", Slot = "4")]
|
|
protected override void Awake()
|
|
{
|
|
base.Awake();
|
|
string[] names = Enum.GetNames(typeof(MicrophoneToolManager.KGMOAFBFDAK));
|
|
MicrophoneToolManager.SpeakerLineLevelThreshold[] array = this.speakerLineLevelThresholds;
|
|
int length = names.Length;
|
|
if (length != array.Length)
|
|
{
|
|
Debug.LogError("Length of Speaker Line Level Thresholds array must be " + length);
|
|
}
|
|
}
|
|
|
|
// Token: 0x060002A9 RID: 681 RVA: 0x0000E498 File Offset: 0x0000C698
|
|
[Token(Token = "0x60002A9")]
|
|
[Address(RVA = "0xC41EA0", Offset = "0xC40CA0", VA = "0x180C41EA0")]
|
|
private void Update()
|
|
{
|
|
this.MPGCDIKMJPE();
|
|
}
|
|
|
|
// Token: 0x060002AA RID: 682 RVA: 0x0000E4AC File Offset: 0x0000C6AC
|
|
[Token(Token = "0x60002AA")]
|
|
[Address(RVA = "0xC41DA0", Offset = "0xC40BA0", VA = "0x180C41DA0")]
|
|
public void ScheduleDestroy()
|
|
{
|
|
if (base.gameObject.activeInHierarchy)
|
|
{
|
|
if (this.MBNDOLGFCMA == (ulong)0L)
|
|
{
|
|
MicrophoneToolManager.GPLAPOKKGAO gplapokkgao;
|
|
gplapokkgao.System.IDisposable.Dispose();
|
|
gplapokkgao.<>1__state = (int)((ulong)0L);
|
|
gplapokkgao.<>4__this = this;
|
|
Coroutine coroutine = base.StartCoroutine(gplapokkgao);
|
|
this.MBNDOLGFCMA = coroutine;
|
|
}
|
|
return;
|
|
}
|
|
global::UnityEngine.Object.Destroy(base.gameObject);
|
|
}
|
|
|
|
// Token: 0x060002AB RID: 683 RVA: 0x0000E50C File Offset: 0x0000C70C
|
|
[Token(Token = "0x60002AB")]
|
|
[Address(RVA = "0xC41740", Offset = "0xC40540", VA = "0x180C41740")]
|
|
private IEnumerator CCNPMLLJNPP()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060002AB)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator MicrophoneToolManager::CCNPMLLJNPP()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
call:void(GPLAPOKKGAO::System.IDisposable.Dispose, ldloc:GPLAPOKKGAO(var_0))
|
|
stfld:int32(GPLAPOKKGAO::<>1__state, ldloc:GPLAPOKKGAO(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
|
stfld:MicrophoneToolManager(GPLAPOKKGAO::<>4__this, ldloc:GPLAPOKKGAO(var_0), ldloc:MicrophoneToolManager(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: 0x060002AC RID: 684 RVA: 0x0000E530 File Offset: 0x0000C730
|
|
[Token(Token = "0x60002AC")]
|
|
[Address(RVA = "0xC41B90", Offset = "0xC40990", VA = "0x180C41B90")]
|
|
public void MicAdded()
|
|
{
|
|
Coroutine mbndolgfcma = this.MBNDOLGFCMA;
|
|
if (mbndolgfcma != 0)
|
|
{
|
|
base.StopCoroutine(mbndolgfcma);
|
|
this.MBNDOLGFCMA = (ulong)0L;
|
|
return;
|
|
}
|
|
this.MBNDOLGFCMA = (ulong)0L;
|
|
}
|
|
|
|
// Token: 0x060002AD RID: 685 RVA: 0x0000E564 File Offset: 0x0000C764
|
|
[Token(Token = "0x60002AD")]
|
|
[Address(RVA = "0xC41CD0", Offset = "0xC40AD0", VA = "0x180C41CD0")]
|
|
public void OnMicUseEvent(Player IEKDDPPNFPF, bool PDGEAOIPNKH)
|
|
{
|
|
List<Player> ecopckkgmdc;
|
|
for (;;)
|
|
{
|
|
ecopckkgmdc = this.ECOPCKKGMDC;
|
|
if (PDGEAOIPNKH)
|
|
{
|
|
break;
|
|
}
|
|
if (ecopckkgmdc.Contains(IEKDDPPNFPF))
|
|
{
|
|
goto Block_2;
|
|
}
|
|
}
|
|
if (!ecopckkgmdc.Contains(IEKDDPPNFPF))
|
|
{
|
|
this.ECOPCKKGMDC.Add(IEKDDPPNFPF);
|
|
}
|
|
return;
|
|
Block_2:
|
|
bool flag = this.ECOPCKKGMDC.Remove(IEKDDPPNFPF);
|
|
}
|
|
|
|
// Token: 0x060002AE RID: 686 RVA: 0x0000E5B0 File Offset: 0x0000C7B0
|
|
[Token(Token = "0x60002AE")]
|
|
[Address(RVA = "0xC41BD0", Offset = "0xC409D0", VA = "0x180C41BD0")]
|
|
public void OnMicSpeakerLinesEvent(float HPNMFCBDOEI, MicrophoneToolManager.KGMOAFBFDAK EMCGAOMOBPB)
|
|
{
|
|
float num = Mathf.Max(HPNMFCBDOEI, HPNMFCBDOEI);
|
|
this.CEFIKHEJJGD = num;
|
|
Coroutine gfnalckjbcj = this.GFNALCKJBCJ;
|
|
this.KKOMEACNLEI = EMCGAOMOBPB;
|
|
if (gfnalckjbcj != 0)
|
|
{
|
|
base.StopCoroutine(gfnalckjbcj);
|
|
}
|
|
MicrophoneToolManager.IBEEJHGJDGN ibeejhgjdgn;
|
|
ibeejhgjdgn.System.IDisposable.Dispose();
|
|
ibeejhgjdgn.micHitAudioDuration = HPNMFCBDOEI;
|
|
ibeejhgjdgn.<>1__state = (int)((ulong)0L);
|
|
ibeejhgjdgn.<>4__this = this;
|
|
Coroutine coroutine = base.StartCoroutine(ibeejhgjdgn);
|
|
this.GFNALCKJBCJ = coroutine;
|
|
}
|
|
|
|
// Token: 0x060002AF RID: 687 RVA: 0x0000E618 File Offset: 0x0000C818
|
|
[Token(Token = "0x60002AF")]
|
|
[Address(RVA = "0xC416E0", Offset = "0xC404E0", VA = "0x180C416E0")]
|
|
private MicrophoneToolManager.KGMOAFBFDAK BPFBOALBBHO(float DKDOBJOOGLC)
|
|
{
|
|
MicrophoneToolManager.SpeakerLineLevelThreshold[] array = this.speakerLineLevelThresholds;
|
|
int length = array.Length;
|
|
if (DKDOBJOOGLC < "{il2cpp array field local2->}")
|
|
{
|
|
}
|
|
MicrophoneToolManager.SpeakerLineLevelThreshold speakerLineLevelThreshold = array[length];
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x060002B0 RID: 688 RVA: 0x0000E64C File Offset: 0x0000C84C
|
|
[Token(Token = "0x60002B0")]
|
|
[Address(RVA = "0xC417A0", Offset = "0xC405A0", VA = "0x180C417A0")]
|
|
private void MPGCDIKMJPE()
|
|
{
|
|
int num2;
|
|
MicrophoneToolManager.KGMOAFBFDAK kkomeacnlei;
|
|
int num8;
|
|
for (;;)
|
|
{
|
|
int num = 0;
|
|
num2 = 0;
|
|
kkomeacnlei = this.KKOMEACNLEI;
|
|
if (kkomeacnlei == MicrophoneToolManager.KGMOAFBFDAK.OFF)
|
|
{
|
|
List<int> list = new List();
|
|
List<Player> ecopckkgmdc = this.ECOPCKKGMDC;
|
|
List<Player> ecopckkgmdc2 = this.ECOPCKKGMDC;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
goto IL_64;
|
|
}
|
|
List<Player> ecopckkgmdc3 = this.ECOPCKKGMDC;
|
|
float num3;
|
|
float num4;
|
|
if (num3 > num4)
|
|
{
|
|
List<Player> ecopckkgmdc4 = this.ECOPCKKGMDC;
|
|
float num5 = num4;
|
|
float num6 = Mathf.InverseLerp(num5, 1f, num5);
|
|
float num7 = Mathf.Max((float)num2, num6);
|
|
goto IL_64;
|
|
}
|
|
IL_6B:
|
|
num++;
|
|
List<Player>.Enumerator enumerator = this.ECOPCKKGMDC.GetEnumerator();
|
|
bool flag2;
|
|
if (flag2)
|
|
{
|
|
List<Player> ecopckkgmdc5 = this.ECOPCKKGMDC;
|
|
}
|
|
num8 = 0;
|
|
if (num == 0)
|
|
{
|
|
break;
|
|
}
|
|
continue;
|
|
IL_64:
|
|
list.Add(num);
|
|
goto IL_6B;
|
|
}
|
|
goto IL_C7;
|
|
}
|
|
MicrophoneToolManager.SpeakerLineLevelThreshold[] array = this.speakerLineLevelThresholds;
|
|
int length = array.Length;
|
|
if (num2 < "{il2cpp array field local29->}")
|
|
{
|
|
this.<JAEJNINAIDF>k__BackingField = (MicrophoneToolManager.KGMOAFBFDAK)num8;
|
|
}
|
|
MicrophoneToolManager.SpeakerLineLevelThreshold speakerLineLevelThreshold = array[length];
|
|
this.<JAEJNINAIDF>k__BackingField = speakerLineLevelThreshold;
|
|
IL_C7:
|
|
this.<JAEJNINAIDF>k__BackingField = kkomeacnlei;
|
|
}
|
|
|
|
// Token: 0x060002B1 RID: 689 RVA: 0x0000E730 File Offset: 0x0000C930
|
|
[Token(Token = "0x60002B1")]
|
|
[Address(RVA = "0xC41560", Offset = "0xC40360", VA = "0x180C41560")]
|
|
private IEnumerator AIBLAJMBBLB(float APLONMPKDID)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060002B1)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator MicrophoneToolManager::AIBLAJMBBLB(System.Single)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
call:void(IBEEJHGJDGN::System.IDisposable.Dispose, ldloc:IBEEJHGJDGN(var_0))
|
|
stfld:float32(IBEEJHGJDGN::micHitAudioDuration, ldloc:IBEEJHGJDGN(var_0), ldloc:float32(APLONMPKDID))
|
|
stfld:int32(IBEEJHGJDGN::<>1__state, ldloc:IBEEJHGJDGN(var_0), conv.u8:uint64[exp:int32](ldc.i8:int64[exp:uint64](0)))
|
|
stfld:MicrophoneToolManager(IBEEJHGJDGN::<>4__this, ldloc:IBEEJHGJDGN(var_0), ldloc:MicrophoneToolManager(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: 0x060002B2 RID: 690 RVA: 0x0000E75C File Offset: 0x0000C95C
|
|
[Token(Token = "0x60002B2")]
|
|
[Address(RVA = "0xC41EB0", Offset = "0xC40CB0", VA = "0x180C41EB0")]
|
|
public MicrophoneToolManager()
|
|
{
|
|
List<Player> list = new List();
|
|
this.ECOPCKKGMDC = list;
|
|
base..ctor();
|
|
}
|
|
|
|
// Token: 0x04000239 RID: 569
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4000239")]
|
|
private List<Player> ECOPCKKGMDC;
|
|
|
|
// Token: 0x0400023A RID: 570
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400023A")]
|
|
private MicrophoneToolManager.KGMOAFBFDAK KKOMEACNLEI;
|
|
|
|
// Token: 0x0400023C RID: 572
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400023C")]
|
|
[SerializeField]
|
|
private MicrophoneToolManager.SpeakerLineLevelThreshold[] speakerLineLevelThresholds;
|
|
|
|
// Token: 0x0400023D RID: 573
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400023D")]
|
|
private float CEFIKHEJJGD;
|
|
|
|
// Token: 0x0400023E RID: 574
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x400023E")]
|
|
private Coroutine MBNDOLGFCMA;
|
|
|
|
// Token: 0x0400023F RID: 575
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x400023F")]
|
|
private Coroutine GFNALCKJBCJ;
|
|
|
|
// Token: 0x0200005F RID: 95
|
|
[Token(Token = "0x200005F")]
|
|
public enum KGMOAFBFDAK
|
|
{
|
|
// Token: 0x04000241 RID: 577
|
|
[Token(Token = "0x4000241")]
|
|
OFF,
|
|
// Token: 0x04000242 RID: 578
|
|
[Token(Token = "0x4000242")]
|
|
LEVEL_1,
|
|
// Token: 0x04000243 RID: 579
|
|
[Token(Token = "0x4000243")]
|
|
LEVEL_2,
|
|
// Token: 0x04000244 RID: 580
|
|
[Token(Token = "0x4000244")]
|
|
LEVEL_3,
|
|
// Token: 0x04000245 RID: 581
|
|
[Token(Token = "0x4000245")]
|
|
LEVEL_4
|
|
}
|
|
|
|
// Token: 0x02000060 RID: 96
|
|
[Token(Token = "0x2000060")]
|
|
[Serializable]
|
|
public struct SpeakerLineLevelThreshold
|
|
{
|
|
// Token: 0x04000246 RID: 582
|
|
[FieldOffset(Offset = "0x0")]
|
|
[Token(Token = "0x4000246")]
|
|
public MicrophoneToolManager.KGMOAFBFDAK lineLevel;
|
|
|
|
// Token: 0x04000247 RID: 583
|
|
[FieldOffset(Offset = "0x4")]
|
|
[Token(Token = "0x4000247")]
|
|
public float volumeThreshold;
|
|
}
|
|
}
|