Files
NobetaSource/Cpp2IL/Assembly-CSharp/VoiceController.cs
2023-09-06 22:00:49 +02:00

165 lines
4.4 KiB
C#

using System;
using Cpp2IlInjected;
using UnityEngine;
using UnityEngine.Audio;
// Token: 0x02000027 RID: 39
[Token(Token = "0x2000027")]
public class VoiceController : MonoBehaviour
{
// Token: 0x17000010 RID: 16
// (get) Token: 0x06000141 RID: 321 RVA: 0x00005FC4 File Offset: 0x000041C4
[Token(Token = "0x17000010")]
private VolumeSettings Volume
{
[Token(Token = "0x6000141")]
[Address(RVA = "0x93ACA0", Offset = "0x939AA0", VA = "0x18093ACA0")]
get
{
return Game.Config.volumeSettings;
}
}
// Token: 0x06000142 RID: 322 RVA: 0x00005FE4 File Offset: 0x000041E4
[Token(Token = "0x6000142")]
[Address(RVA = "0x93A300", Offset = "0x939100", VA = "0x18093A300")]
public void InitData()
{
int num;
AudioSource audioSource;
do
{
AudioSource[] array = new AudioSource[2];
this.g_AS = array;
VoiceController.VoiceType[] array2 = new VoiceController.VoiceType[2];
this.g_VoiceType = array2;
AudioSource[] array3 = this.g_AS;
num = 0;
if (num >= array3.Length)
{
goto IL_81;
}
audioSource = base.gameObject.AddComponent<AudioSource>();
}
while (audioSource != 0 && audioSource == 0);
AudioSource audioSource2 = this.g_AS[num];
AudioMixerGroup amg = this.AMG;
audioSource2.outputAudioMixerGroup = amg;
VoiceController.VoiceType[] array4 = this.g_VoiceType;
num++;
array4[0] = (VoiceController.VoiceType)num;
AudioSource[] array5 = this.g_AS;
IL_81:
this.g_iIndex = num;
}
// Token: 0x06000143 RID: 323 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6000143")]
[Address(RVA = "0x93A860", Offset = "0x939660", VA = "0x18093A860")]
public AudioSource PlayVoice(int iIndex)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06000144 RID: 324 RVA: 0x000020D3 File Offset: 0x000002D3
[Token(Token = "0x6000144")]
[Address(RVA = "0x93A4E0", Offset = "0x9392E0", VA = "0x18093A4E0")]
public void PlayDefaultVoice(int Pitch)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06000145 RID: 325 RVA: 0x00006080 File Offset: 0x00004280
[Token(Token = "0x6000145")]
[Address(RVA = "0x93AB10", Offset = "0x939910", VA = "0x18093AB10")]
public void ResetVolume()
{
int num = 0;
AudioSource[] array = this.g_AS;
if (num < array.Length)
{
VoiceController.VoiceType voiceType = this.g_VoiceType[num];
if (voiceType == VoiceController.VoiceType.Default)
{
AudioSource audioSource = array[num];
VolumeSettings volume = this.Volume;
}
if (voiceType == VoiceController.VoiceType.Voice)
{
AudioSource audioSource2 = array[num];
int num2 = 0;
VolumeSettings volume2 = this.Volume;
audioSource2.volume = (float)num2;
}
AudioSource[] array2 = this.g_AS;
num++;
}
}
// Token: 0x06000146 RID: 326 RVA: 0x000060F4 File Offset: 0x000042F4
[Token(Token = "0x6000146")]
[Address(RVA = "0x93AC90", Offset = "0x939A90", VA = "0x18093AC90")]
public VoiceController()
{
}
// Token: 0x040001B5 RID: 437
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40001B5")]
public AudioMixerGroup AMG;
// Token: 0x040001B6 RID: 438
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40001B6")]
public AudioClip DefaultVoice;
// Token: 0x040001B7 RID: 439
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40001B7")]
public float Pitch = 1f;
// Token: 0x040001B8 RID: 440
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40001B8")]
public AudioClip[] Sound;
// Token: 0x040001B9 RID: 441
[Token(Token = "0x40001B9")]
private const int g_iASNum = 2;
// Token: 0x040001BA RID: 442
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x40001BA")]
private AudioSource[] g_AS;
// Token: 0x040001BB RID: 443
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x40001BB")]
private VoiceController.VoiceType[] g_VoiceType;
// Token: 0x040001BC RID: 444
[Token(Token = "0x40001BC")]
private const float g_fDefaultVolume = 0.4f;
// Token: 0x040001BD RID: 445
[Token(Token = "0x40001BD")]
private const float g_fVoiceVolume = 1f;
// Token: 0x040001BE RID: 446
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x40001BE")]
private int g_iIndex;
// Token: 0x02000028 RID: 40
[Token(Token = "0x2000028")]
private enum VoiceType
{
// Token: 0x040001C0 RID: 448
[Token(Token = "0x40001C0")]
Default,
// Token: 0x040001C1 RID: 449
[Token(Token = "0x40001C1")]
Voice
}
}