using System; using System.Collections.Generic; using Cpp2IlInjected; using MEC; using UnityEngine; // Token: 0x02000019 RID: 25 [Token(Token = "0x2000019")] public class BGM : MonoBehaviour { // Token: 0x06000095 RID: 149 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x6000095")] [Address(RVA = "0xB6AA60", Offset = "0xB69260", VA = "0x180B6AA60")] public void Init() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x06000096 RID: 150 RVA: 0x0000399C File Offset: 0x00001B9C [Token(Token = "0x6000096")] [Address(RVA = "0xB6AC40", Offset = "0xB69440", VA = "0x180B6AC40")] public void PlayBGM(float playingTime = 0f) { if (!this.isPlaying) { float length = this.Begin.length; Debug.LogError("BGM播放長度錯誤"); this.Prepare(); bool flag = this.audioSource.isPlaying; AudioSource audioSource = this.audioSource; if (flag) { AudioClip clip = audioSource.clip; AudioClip begin = this.Begin; if (!(clip == begin)) { goto IL_B9; } AudioClip loop = this.Loop; int num = 0; bool flag2 = loop != num; } AudioClip begin2 = this.Begin; audioSource.clip = begin2; this.audioSource.time = playingTime; this.audioSource.Play(); if (this.Loop) { CoroutineHandle coroutineHandle = MECExtensionMethods1.RunCoroutine(this.WaitForLoop()); this.playProcessor = coroutineHandle; } IL_B9: this.VerifyFadeInProcessor(); } } // Token: 0x06000097 RID: 151 RVA: 0x00003A70 File Offset: 0x00001C70 [Token(Token = "0x6000097")] [Address(RVA = "0xB6AFC0", Offset = "0xB697C0", VA = "0x180B6AFC0")] public void SwitchBGM(float playingTime) { if (!this.isPlaying) { this.Prepare(); if (this.CheckLength.length <= playingTime) { AudioClip checkLength = this.CheckLength; AudioClip loop = this.Loop; float length = checkLength.length; this.audioSource.clip = loop; this.audioSource.time = playingTime; this.audioSource.Play(); } AudioSource audioSource = this.audioSource; AudioClip begin = this.Begin; audioSource.clip = begin; this.audioSource.time = playingTime; this.audioSource.Play(); if (this.Loop) { CoroutineHandle coroutineHandle = MECExtensionMethods1.RunCoroutine(this.WaitForLoop()); this.playProcessor = coroutineHandle; } this.VerifyFadeInProcessor(); } } // Token: 0x06000098 RID: 152 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x6000098")] [Address(RVA = "0xB6AE30", Offset = "0xB69630", VA = "0x180B6AE30")] private void Prepare() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x06000099 RID: 153 RVA: 0x00003B34 File Offset: 0x00001D34 [Token(Token = "0x6000099")] [Address(RVA = "0xB6ABE0", Offset = "0xB693E0", VA = "0x180B6ABE0")] private void PlayAudio(AudioClip clip, float playingTime = 0f) { this.audioSource.clip = clip; this.audioSource.time = playingTime; this.audioSource.Play(); } // Token: 0x0600009A RID: 154 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x600009A")] [Address(RVA = "0xB6B320", Offset = "0xB69B20", VA = "0x180B6B320")] private IEnumerator WaitForLoop() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600009B RID: 155 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x600009B")] [Address(RVA = "0xB6B220", Offset = "0xB69A20", VA = "0x180B6B220")] private void VerifyFadeInProcessor() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600009C RID: 156 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x600009C")] [Address(RVA = "0xB6A830", Offset = "0xB69030", VA = "0x180B6A830")] private IEnumerator FadeIn() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600009D RID: 157 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x600009D")] [Address(RVA = "0xB6A910", Offset = "0xB69110", VA = "0x180B6A910")] public float GetPlayingTime() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600009E RID: 158 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x600009E")] [Address(RVA = "0xB6AEA0", Offset = "0xB696A0", VA = "0x180B6AEA0")] public void StopBGM() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x0600009F RID: 159 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x600009F")] [Address(RVA = "0xB6A8A0", Offset = "0xB690A0", VA = "0x180B6A8A0")] private IEnumerator FadeOut() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060000A0 RID: 160 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x60000A0")] [Address(RVA = "0xB6B140", Offset = "0xB69940", VA = "0x180B6B140")] public void UpdateVolume(VolumeSettings settings) { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060000A1 RID: 161 RVA: 0x00003B6C File Offset: 0x00001D6C [Token(Token = "0x60000A1")] [Address(RVA = "0xB6B170", Offset = "0xB69970", VA = "0x180B6B170")] public void UpdateVolume() { /* An exception occurred when decompiling this method (060000A1) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BGM::UpdateVolume() ---> System.ArgumentOutOfRangeException: Non-negative number required. (Parameter 'length') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length) at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackSlot.ModifyStack(StackSlot[] stack, Int32 popCount, Int32 pushCount, ByteCode pushDefinition) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 51 at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackAnalysis(MethodDef methodDef) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 401 at ICSharpCode.Decompiler.ILAst.ILAstBuilder.Build(MethodDef methodDef, Boolean optimize, DecompilerContext context) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 276 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 112 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 1618 */; } // Token: 0x060000A2 RID: 162 RVA: 0x000020D3 File Offset: 0x000002D3 [Token(Token = "0x60000A2")] [Address(RVA = "0xB6A780", Offset = "0xB68F80", VA = "0x180B6A780")] public void Dispose() { throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method."); } // Token: 0x060000A3 RID: 163 RVA: 0x00003BA8 File Offset: 0x00001DA8 [Token(Token = "0x60000A3")] [Address(RVA = "0x33E460", Offset = "0x33CC60", VA = "0x18033E460")] public BGM() { } // Token: 0x040000FC RID: 252 [FieldOffset(Offset = "0x18")] [Token(Token = "0x40000FC")] public AudioClip Begin; // Token: 0x040000FD RID: 253 [FieldOffset(Offset = "0x20")] [Token(Token = "0x40000FD")] public AudioClip Loop; // Token: 0x040000FE RID: 254 [FieldOffset(Offset = "0x28")] [Token(Token = "0x40000FE")] public AudioClip CheckLength; // Token: 0x040000FF RID: 255 [FieldOffset(Offset = "0x30")] [Token(Token = "0x40000FF")] public float g_fPlayFadeIn; // Token: 0x04000100 RID: 256 [FieldOffset(Offset = "0x34")] [Token(Token = "0x4000100")] [SerializeField] private float originalVolume; // Token: 0x04000101 RID: 257 [FieldOffset(Offset = "0x38")] [Token(Token = "0x4000101")] [SerializeField] private float volumeFactor; // Token: 0x04000102 RID: 258 [FieldOffset(Offset = "0x3C")] [Token(Token = "0x4000102")] [SerializeField] private bool isPlaying; // Token: 0x04000103 RID: 259 [FieldOffset(Offset = "0x40")] [Token(Token = "0x4000103")] private AudioSource audioSource; // Token: 0x04000104 RID: 260 [Token(Token = "0x4000104")] private const float STOP_FADE_OUT_DURATION = 4f; // Token: 0x04000105 RID: 261 [FieldOffset(Offset = "0x48")] [Token(Token = "0x4000105")] private CoroutineHandle playProcessor; // Token: 0x04000106 RID: 262 [FieldOffset(Offset = "0x4C")] [Token(Token = "0x4000106")] private CoroutineHandle fadingProcessor; }