using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using ExitGames.Client.Photon; using HarmonyLib; using Peak.Afflictions; using Photon.Pun; using Photon.Realtime; using UnityEngine; using UnityEngine.Rendering; using Zorro.Core; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("peakmod")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("peakmod")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("151563ae-3187-4437-8520-701a4dbc2edc")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace PeakCloudArena; [BepInPlugin("songt.peak.cloudarena", "PEAK Party Games", "5.21.6")] public class Plugin : BaseUnityPlugin, IOnEventCallback { public enum GameState { Idle, SpawningArena, RoundStarting, Running, RoundEnding, GameEnding } public enum RoundGameType { CloudDynamite, ShelfHook, BounceFrisbee, DoubleCloudCoconut, RhythmGame, ColorCloudSurvival, ButtonMashRace, StarGrid, MemoryMatch, HalliGalli, DinoRun } public enum DirectPrefabMode { AutoFromItem, ManualPath } private enum Round6CloudColor { Green, Yellow, Orange, Purple, Red } private class ArenaTile { public GameObject obj; public Vector3 position; public int layerIndex; public ArenaTile(GameObject obj, Vector3 position, int layerIndex) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) this.obj = obj; this.position = position; this.layerIndex = layerIndex; } } private sealed class FungusFrameLocker : MonoBehaviour { private Transform[] transforms; private Vector3[] localPositions; private Quaternion[] localRotations; private Vector3[] localScales; public void Capture(Transform root) { //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)root == (Object)null) { return; } transforms = ((Component)root).GetComponentsInChildren(true); localPositions = (Vector3[])(object)new Vector3[transforms.Length]; localRotations = (Quaternion[])(object)new Quaternion[transforms.Length]; localScales = (Vector3[])(object)new Vector3[transforms.Length]; for (int i = 0; i < transforms.Length; i++) { Transform val = transforms[i]; if (!((Object)(object)val == (Object)null)) { localPositions[i] = val.localPosition; localRotations[i] = val.localRotation; localScales[i] = val.localScale; } } } private void LateUpdate() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (transforms == null) { return; } for (int i = 0; i < transforms.Length; i++) { Transform val = transforms[i]; if (!((Object)(object)val == (Object)null)) { try { val.localPosition = localPositions[i]; val.localRotation = localRotations[i]; val.localScale = localScales[i]; } catch { } } } } } [CompilerGenerated] private sealed class <>c__DisplayClass881_0 { public RoundGameType roundType; internal void b__0(RoundGameType selected) { roundType = selected; } } [CompilerGenerated] private sealed class d__881 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private int 5__1; private <>c__DisplayClass881_0 <>8__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__881(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.finalEndingTriggered = false; <>4__this.finalScoreboardActive = false; <>4__this.roundBetweenMovementLockUntil = -1f; <>4__this.firstRoundStartedAfterMapLoad = true; <>4__this.BuildRoundOrder(); <>4__this.currentRoundIndex = 0; <>4__this.mainRoundPlayedCount = 0; <>4__this.votedPlayedRounds.Clear(); <>4__this.ClearRoundResultPodiums(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnRoundResultPodiumsForGameRoutine()); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = Mathf.Clamp((<>4__this.totalMainRounds != null) ? <>4__this.totalMainRounds.Value : 7, 1, 7); 5__1 = 7; goto IL_0329; case 2: <>1__state = -1; if (!<>4__this.gameStart.Value) { goto IL_035a; } if (!<>4__this.votedPlayedRounds.Contains(<>8__2.roundType)) { <>4__this.votedPlayedRounds.Add(<>8__2.roundType); } <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRoundRoutine(<>8__2.roundType, testMode: false)); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.WaitForRoundEndPresentationCompleteRoutine("AfterRunRoundRoutine")); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.mainRoundPlayedCount++; if (<>4__this.gameStart.Value && <>4__this.mainRoundPlayedCount < 5__1) { <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, <>4__this.roundRestartDelay.Value)); <>1__state = 5; return true; } goto IL_0321; case 5: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.WaitForRoundEndPresentationCompleteRoutine("BeforeNextVote")); <>1__state = 6; return true; case 6: <>1__state = -1; goto IL_0321; case 7: <>1__state = -1; <>4__this.TriggerFinalWinnersByScore(); <>4__this.FullGameEndCleanup(startProtection: true); <>4__this.ClearRoundResultPodiums(); <>2__current = (object)new WaitForSeconds(0.15f); <>1__state = 8; return true; case 8: <>1__state = -1; goto IL_0416; case 9: { <>1__state = -1; <>4__this.gameState = GameState.Idle; return false; } IL_035a: if (<>4__this.gameStart.Value && !<>4__this.finalEndingTriggered) { <>4__this.gameState = GameState.GameEnding; <>4__this.SyncScoresToAll(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ShowFinalScoreboardRoutine(7f)); <>1__state = 7; return true; } goto IL_0416; IL_0321: <>8__2 = null; goto IL_0329; IL_0416: <>4__this.mainGameRoutine = null; <>4__this.TurnOffAllStartTriggers(); <>4__this.ClearArena(); <>2__current = null; <>1__state = 9; return true; IL_0329: if (<>4__this.gameStart.Value && <>4__this.mainRoundPlayedCount < 5__1) { <>8__2 = new <>c__DisplayClass881_0(); <>8__2.roundType = RoundGameType.CloudDynamite; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRoundVoteSelectionRoutine(<>4__this.mainRoundPlayedCount + 1, 5__1, delegate(RoundGameType selected) { <>8__2.roundType = selected; })); <>1__state = 2; return true; } goto IL_035a; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1259 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject obj; public float warningSeconds; public Plugin <>4__this; private Color 5__1; private Color 5__2; private Color 5__3; private float 5__4; private float 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1259(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Expected O, but got Unknown //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Expected O, but got Unknown //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)obj == (Object)null) { return false; } 5__1 = new Color(1f, 0.92f, 0.02f, 1f); 5__2 = new Color(1f, 0.48f, 0.02f, 1f); 5__3 = new Color(1f, 0.03f, 0.01f, 1f); if (warningSeconds < 1f) { <>4__this.ApplyCloudWarningSolidMaterialToObjectLocal(obj, 5__2, 2.6f); <>2__current = (object)new WaitForSeconds(Mathf.Max(0.05f, warningSeconds)); <>1__state = 1; return true; } 5__4 = Mathf.Max(0.5f, warningSeconds); 5__5 = 5__4 / 3f; <>4__this.ApplyCloudWarningSolidMaterialToObjectLocal(obj, 5__1, 1.8f); <>2__current = (object)new WaitForSeconds(5__5); <>1__state = 2; return true; case 1: <>1__state = -1; if ((Object)(object)obj != (Object)null) { <>4__this.activeCloudWarningTintRoutines.Remove(obj); } return false; case 2: <>1__state = -1; if ((Object)(object)obj == (Object)null) { return false; } <>4__this.ApplyCloudWarningSolidMaterialToObjectLocal(obj, 5__2, 2.4f); <>2__current = (object)new WaitForSeconds(5__5); <>1__state = 3; return true; case 3: <>1__state = -1; if ((Object)(object)obj == (Object)null) { return false; } <>4__this.ApplyCloudWarningSolidMaterialToObjectLocal(obj, 5__3, 3f); <>2__current = (object)new WaitForSeconds(5__5); <>1__state = 4; return true; case 4: <>1__state = -1; if ((Object)(object)obj != (Object)null) { <>4__this.ApplyCloudWarningSolidMaterialToObjectLocal(obj, 5__3, 3.2f); <>4__this.activeCloudWarningTintRoutines.Remove(obj); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1246 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public ArenaTile tile; public float delay; public Plugin <>4__this; private Vector3

5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1246(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (tile != null && (Object)(object)tile.obj != (Object)null) { <>4__this.ApplyOrangeWarningTintToTileLocal(tile); if (PhotonNetwork.InRoom && <>4__this.IsHostOrOffline()) {

5__1 = tile.position; <>4__this.RaiseSimpleEvent(112, new object[4] {

5__1.x,

5__1.y,

5__1.z, Mathf.Max(0.5f, delay) }, (ReceiverGroup)0); } } <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, delay)); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.pendingStandingTileDeletes.Remove(tile); if (<>4__this.gameState != GameState.Running) { return false; } if (tile == null || (Object)(object)tile.obj == (Object)null) { return false; } if (!<>4__this.activeTiles.Contains(tile)) { return false; } <>4__this.PlayCloudDisappearSound(); if (PhotonNetwork.InRoom && <>4__this.IsHostOrOffline()) { <>4__this.RaiseSimpleEvent(114, Array.Empty(), (ReceiverGroup)0); } <>4__this.RemoveTile(tile); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1237 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public ArenaTile tile; public float warningSeconds; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1237(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, warningSeconds)); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.DeleteRound1MarkedTileNow(tile); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1321 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Item item; public Plugin <>4__this; private Character 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1321(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Max(1f, <>4__this.thrownFrisbeeDeleteSeconds.Value)); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)item == (Object)null) { return false; } try { 5__1 = ((Component)item).GetComponentInParent(); if ((Object)(object)5__1 != (Object)null) { return false; } 5__1 = null; } catch { } <>4__this.DestroyItemObject(((Component)item).gameObject); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1264 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject obj; public float seconds; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1264(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, seconds)); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)obj != (Object)null) { Object.Destroy((Object)(object)obj); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1267 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject obj; public float seconds; public Plugin <>4__this; private PhotonView 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1267(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, seconds)); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)this.obj == (Object)null) { return false; } try { <>4__this.podiumTeleportTestObjects.Remove(this.obj); } catch { } try { 5__1 = this.obj.GetComponent(); if ((Object)(object)5__1 != (Object)null && PhotonNetwork.InRoom) { if (5__1.IsMine || <>4__this.IsHostOrOffline()) { PhotonNetwork.Destroy(this.obj); } else { Object.Destroy((Object)(object)this.obj); } } else { Object.Destroy((Object)(object)this.obj); } 5__1 = null; } catch { try { Object.Destroy((Object)(object)this.obj); } catch { } } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__833 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__833(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(3f); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1312 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private List.Enumerator <>s__1; private Character 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1312(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (<>4__this.gameState == GameState.Running) { <>s__1 = <>4__this.alivePlayers.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if ((Object)(object)5__2 == (Object)null) { continue; } if (<>4__this.HasDynamiteInInventory(5__2)) { <>4__this.CancelPendingDynamiteGive(5__2); continue; } if (!<>4__this.dynamiteDelayRoutines.ContainsKey(5__2)) { <>4__this.dynamiteDelayRoutines[5__2] = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.GiveDynamiteAfterMissingDelayRoutine(5__2)); } 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); <>2__current = (object)new WaitForSeconds(Mathf.Max(0.1f, <>4__this.dynamiteCheckInterval.Value)); <>1__state = 1; return true; } <>4__this.ClearPendingDynamiteRoutines(); <>4__this.EndRhythmRoundLocal(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1273 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private bool 5__1; private int 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1273(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!<>4__this.IsHostOrOffline()) { return false; } 5__1 = <>4__this.roundResultPodiumObjects.Count < RoundResultPodiumSpawnPositions.Length; if (!5__1) { 5__2 = 0; while (5__2 < RoundResultPodiumSpawnPositions.Length) { if (5__2 >= <>4__this.roundResultPodiumObjects.Count || (Object)(object)<>4__this.roundResultPodiumObjects[5__2] == (Object)null) { 5__1 = true; break; } 5__2++; } } if (!5__1) { return false; } ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)"[TeleportGuard] Result podiums missing before round-end teleport. Respawning podiums now."); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnRoundResultPodiumsForGameRoutine()); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.15f); <>1__state = 2; return true; case 2: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1046 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string reason; public Plugin <>4__this; private string 5__1; private bool 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1046(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Expected O, but got Unknown //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Expected O, but got Unknown //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Expected O, but got Unknown //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (<>4__this.IsRoundStartFinishGuardActive()) { ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)("[RoundGuard] Finish coroutine delayed during round start guard. reason=" + reason + ", type=" + <>4__this.currentRoundType)); 5__3 = <>4__this.roundStartFinishGuardUntil; goto IL_00d7; } goto IL_00fa; case 1: <>1__state = -1; goto IL_00d7; case 2: <>1__state = -1; <>4__this.roundResultPanelActive = false; <>4__this.roundResultPanelForcedLines = null; <>4__this.roundResultPanelForcedTitle = ""; 5__2 = <>4__this.ShouldReviveDeadPlayersAtRoundEnd(<>4__this.currentRoundType); <>4__this.CleanupRoundEndStateForAllPlayers(5__2); <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 3; return true; case 3: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.EnsureRoundResultPodiumsExistRoutine()); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.TeleportRoundPlayersToRoundResultPodiums(5__2); <>4__this.ResetLocalMovementLockAnchor(); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 5; return true; case 5: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PlayLocalRoundEndEmoteSequenceRoutine()); <>1__state = 6; return true; case 6: <>1__state = -1; <>4__this.ShowAutoScoreboardAfterRoundEnd(); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 7; return true; case 7: { <>1__state = -1; if (<>4__this.currentRoundIsTestMode) { <>4__this.gameState = GameState.Idle; <>4__this.TurnOffAllStartTriggers(); <>4__this.ClearArena(); } else { <>4__this.gameState = GameState.Idle; } <>4__this.roundFinishInProgress = false; <>4__this.flareReadyActive = false; <>4__this.flareReadyLocalConfirmed = false; <>4__this.flareReadyThirdPersonLockUntil = -999f; <>4__this.flareReadyByActor.Clear(); <>4__this.flareReadyActorOrder.Clear(); <>4__this.flareReadyActorNames.Clear(); if (<>4__this.flareReadyRoutine != null) { try { ((MonoBehaviour)<>4__this).StopCoroutine(<>4__this.flareReadyRoutine); } catch { } <>4__this.flareReadyRoutine = null; } <>4__this.roundEndStartedAt = -1f; <>4__this.currentRoundHardTimeoutAt = -1f; <>4__this.roundEndPresentationComplete = true; <>4__this.finishRoundRoutineHandle = null; ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[RoundEnd] FinishCurrentRoundRoutine EXIT reason=" + reason + ", type=" + <>4__this.currentRoundType)); return false; } IL_00d7: if (<>4__this.gameState == GameState.Running && Time.time < 5__3) { <>2__current = null; <>1__state = 1; return true; } goto IL_00fa; IL_00fa: if (!<>4__this.CanFinishCurrentRoundNow(reason, out 5__1)) { ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)("[RoundGuard] Finish coroutine blocked after recheck. reason=" + reason + ", block=" + 5__1 + ", type=" + <>4__this.currentRoundType.ToString() + ", alive=" + <>4__this.alivePlayers.Count + ", players=" + <>4__this.roundPlayers.Count)); <>4__this.finishRoundRoutineHandle = null; return false; } if (<>4__this.roundFinishInProgress) { return false; } if (<>4__this.gameState != GameState.Running && <>4__this.gameState != GameState.RoundEnding) { ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)("[RoundEnd] FinishCurrentRoundRoutine rejected. reason=" + reason + ", state=" + <>4__this.gameState.ToString() + ", type=" + <>4__this.currentRoundType)); <>4__this.finishRoundRoutineHandle = null; return false; } <>4__this.EndRoundStartFinishGuard("FinishCurrentRoundRoutine"); <>4__this.roundFinishInProgress = true; <>4__this.roundEndPresentationComplete = false; <>4__this.gameState = GameState.RoundEnding; <>4__this.roundEndStartedAt = Time.time; <>4__this.currentRoundHardTimeoutAt = -1f; <>4__this.round6AnswerGaugeActive = false; ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[RoundEnd] FinishCurrentRoundRoutine ENTER reason=" + reason + ", type=" + <>4__this.currentRoundType.ToString() + ", alive=" + <>4__this.alivePlayers.Count + ", eliminated=" + <>4__this.eliminatedPlayers.Count)); <>4__this.StopRoundRoutines(); if (<>4__this.currentRoundType == RoundGameType.CloudDynamite) { <>4__this.BroadcastForceClearAllPlayerInventories("CloudDynamiteRoundEnd"); } <>4__this.AddCurrentRoundScoresToTotal(); <>4__this.SyncScoresToAll(); <>4__this.RaiseSimpleEvent(106, <>4__this.BuildRoundEndEventData(reason), (ReceiverGroup)0); <>4__this.centerNoticeText = ""; <>4__this.centerNoticeUntil = 0f; <>4__this.ShowRoundResultPanelForCurrentRound(4f); <>4__this.roundBetweenMovementLockUntil = Mathf.Max(<>4__this.roundBetweenMovementLockUntil, Time.time + 12.2f); <>2__current = (object)new WaitForSeconds(4f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__858 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private object[] 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__858(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.flareReadySequence++; if (<>4__this.flareReadySequence <= 0) { <>4__this.flareReadySequence = 1; } <>4__this.BuildFlareReadyActorList(); 5__1 = <>4__this.BuildFlareReadyStartEventData(); <>4__this.ApplyFlareReadyStartLocal(5__1); <>4__this.RaiseMiniGameEvent(138, 5__1, (ReceiverGroup)0); ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[FlareReady] Ready phase started. seq=" + <>4__this.flareReadySequence + " players=" + <>4__this.flareReadyActorOrder.Count)); break; case 1: <>1__state = -1; break; } if (<>4__this.flareReadyActive) { if (<>4__this.gameState != 0 || <>4__this.mainGameRoutine != null || <>4__this.singleRoundTestRunning) { ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[FlareReady] Ready phase cancelled by state. gameState=" + <>4__this.gameState)); <>4__this.ApplyFlareReadyEndLocal(new object[2] { <>4__this.flareReadySequence, false }); <>4__this.RaiseMiniGameEvent(140, new object[2] { <>4__this.flareReadySequence, false }, (ReceiverGroup)0); <>4__this.flareReadyRoutine = null; return false; } if (!<>4__this.AreAllFlareReadyActorsReady()) { <>2__current = null; <>1__state = 1; return true; } } ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)"[FlareReady] All players ready. Starting Party Games."); <>4__this.ApplyFlareReadyEndLocal(new object[2] { <>4__this.flareReadySequence, true }); <>4__this.RaiseMiniGameEvent(140, new object[2] { <>4__this.flareReadySequence, true }, (ReceiverGroup)0); <>4__this.flareReadyRoutine = null; <>4__this.TryStartAutoGame(); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__927 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Character character; public float seconds; public Plugin <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__927(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Time.time + Mathf.Max(0.1f, seconds); break; case 1: <>1__state = -1; break; } if ((Object)(object)character != (Object)null && Time.time < 5__1) { try { if ((Object)(object)character.data != (Object)null) { character.data.SetSkeleton(false); character.data.dead = false; character.data.passedOut = false; character.data.fullyPassedOut = false; } } catch { } <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1073 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject obj; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1073(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.ForceShelfInstalledFinalFrame(obj); <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.ForceShelfInstalledFinalFrame(obj); <>2__current = (object)new WaitForSeconds(0.15f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.ForceShelfInstalledFinalFrame(obj); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1355 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private List.Enumerator <>s__1; private Character 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1355(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (<>4__this.gameState == GameState.Running) { <>s__1 = <>4__this.alivePlayers.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if ((Object)(object)5__2 != (Object)null) { <>4__this.ForceFrisbeeSlotOne(5__2); } 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1313 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Character character; public Plugin <>4__this; private float 5__1; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1313(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Mathf.Max(0.1f, <>4__this.dynamiteMissingDelay.Value); if (<>4__this.IsLocalCharacter(character)) { <>4__this.showDynamiteChargeBar = true; <>4__this.localDynamiteChargeActive = true; <>4__this.dynamiteChargeStartTime = Time.time; <>4__this.dynamiteChargeDuration = 5__1; } 5__2 = 0f; break; case 1: <>1__state = -1; break; } if (5__2 < 5__1) { if ((Object)(object)character == (Object)null || <>4__this.gameState != GameState.Running || !<>4__this.alivePlayers.Contains(character)) { if (<>4__this.IsLocalCharacter(character)) { <>4__this.showDynamiteChargeBar = false; <>4__this.localDynamiteChargeActive = false; } return false; } if (<>4__this.HasDynamiteInInventory(character)) { if (<>4__this.IsLocalCharacter(character)) { <>4__this.showDynamiteChargeBar = false; <>4__this.localDynamiteChargeActive = false; } <>4__this.dynamiteDelayRoutines.Remove(character); return false; } 5__2 += Time.deltaTime; <>2__current = null; <>1__state = 1; return true; } if (<>4__this.IsLocalCharacter(character)) { <>4__this.showDynamiteChargeBar = false; <>4__this.localDynamiteChargeActive = false; } if ((Object)(object)character == (Object)null || <>4__this.gameState != GameState.Running || !<>4__this.alivePlayers.Contains(character)) { return false; } if (!<>4__this.HasDynamiteInInventory(character)) { <>4__this.GiveLitDynamite(character); } <>4__this.dynamiteDelayRoutines.Remove(character); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1303 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Character character; public string source; public Vector3 target; public float delay; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1303(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, delay)); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.LogTeleportPositionNow(character, source + "+" + delay.ToString("0.00") + "s", target); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1231 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject obj; public float targetY; public float duration; public Plugin <>4__this; private Vector3 5__1; private Vector3 5__2; private float 5__3; private float 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1231(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)obj == (Object)null) { return false; } 5__1 = obj.transform.position; 5__2 = new Vector3(5__1.x, targetY, 5__1.z); 5__3 = 0f; break; case 1: <>1__state = -1; break; } if ((Object)(object)obj != (Object)null && 5__3 < duration) { 5__3 += Time.deltaTime; 5__4 = Mathf.Clamp01(5__3 / duration); <>4__this.SetTileObjectWorldPosition(obj, Vector3.Lerp(5__1, 5__2, 5__4)); <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)obj != (Object)null) { <>4__this.SetTileObjectWorldPosition(obj, 5__2); <>4__this.activeTileLowerRoutines.Remove(obj); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1048 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1048(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.ShowRoundResultPanelForCurrentRound(4f); <>4__this.roundBetweenMovementLockUntil = Mathf.Max(<>4__this.roundBetweenMovementLockUntil, Time.time + 12.2f); <>2__current = (object)new WaitForSeconds(4f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.roundResultPanelActive = false; <>4__this.roundResultPanelForcedLines = null; <>4__this.roundResultPanelForcedTitle = ""; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; case 2: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PlayLocalRoundEndEmoteSequenceRoutine()); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.ShowAutoScoreboardAfterRoundEnd(); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.roundEndEmoteRoutine = null; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1049 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1049(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.PlayClientRoundEndPresentationRoutine()); <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1050 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private string 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1050(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.GetLocalRoundEndEmoteAnimationFromScores(); if (!string.IsNullOrEmpty(5__1)) { <>4__this.PlayLocalRoundEndEmote(5__1); <>4__this.StartRoundEndDedicatedOverlayCameraForSeconds(5f); <>2__current = (object)new WaitForSeconds(2f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; <>4__this.PlayLocalRoundEndEmote(5__1); <>2__current = (object)new WaitForSeconds(1f); <>1__state = 2; return true; case 2: <>1__state = -1; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1266 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool useAssisted; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1266(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1305 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Character character; public Vector3 target; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1305(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1396 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject root; public Plugin <>4__this; private float 5__1; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1396(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if ((Object)(object)root == (Object)null) { return false; } 5__1 = Mathf.Clamp(<>4__this.effectCleanupDuration.Value, 0.1f, 5f); 5__2 = 0f; break; case 1: <>1__state = -1; break; } if (5__2 < 5__1) { if ((Object)(object)root == (Object)null) { return false; } <>4__this.RemoveEffectObjectsNow(root); 5__2 += 0.1f; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; } if ((Object)(object)root != (Object)null) { <>4__this.RemoveEffectObjectsNow(root); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1346 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private List.Enumerator <>s__1; private Character 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1346(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator); 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (<>4__this.gameState == GameState.Running) { <>s__1 = <>4__this.alivePlayers.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if ((Object)(object)5__2 != (Object)null) { <>4__this.ForceRescueHookToPlayer(5__2); } 5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); <>4__this.ConfigureAllRescueHooksForArenaMode(); <>2__current = (object)new WaitForSeconds(Mathf.Max(0.1f, <>4__this.rescueHookMaintainInterval.Value)); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1234 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private float 5__1; private float 5__2; private List 5__3; private float 5__4; private int 5__5; private ArenaTile 5__6; private Vector3

5__7; private int 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1234(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Expected O, but got Unknown //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.standingTileDeleteStarted = false; 5__1 = Mathf.Max(0f, (<>4__this.round1EdgeCollapseStartDelay != null) ? <>4__this.round1EdgeCollapseStartDelay.Value : 3f); 5__2 = Time.time + 5__1; goto IL_00a2; case 1: <>1__state = -1; goto IL_00a2; case 2: <>1__state = -1; break; case 3: { <>1__state = -1; 5__8 = 0; while (5__8 < 5__3.Count) { <>4__this.DeleteRound1MarkedTileNow(5__3[5__8]); 5__8++; } 5__3 = null; break; } IL_00a2: if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.CloudDynamite && Time.time < 5__2) { <>2__current = null; <>1__state = 1; return true; } <>4__this.standingTileDeleteStarted = true; break; } if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.CloudDynamite) { <>4__this.ClearDeadTiles(); if (<>4__this.activeTiles.Count != 0) { 5__3 = <>4__this.PickCurrentOuterCloudTileRowForCollapse(); if (5__3 == null || 5__3.Count == 0) { <>2__current = null; <>1__state = 2; return true; } 5__4 = <>4__this.GetRound1EdgeCollapseWarningSeconds(); 5__5 = 0; while (5__5 < 5__3.Count) { 5__6 = 5__3[5__5]; if (5__6 != null && !((Object)(object)5__6.obj == (Object)null) && !<>4__this.pendingStandingTileDeletes.Contains(5__6)) { <>4__this.pendingStandingTileDeletes.Add(5__6); <>4__this.StartCloudWarningTintToTileLocal(5__6, 5__4); if (PhotonNetwork.InRoom && <>4__this.IsHostOrOffline()) {

5__7 = 5__6.position; <>4__this.RaiseSimpleEvent(112, new object[4] {

5__7.x,

5__7.y,

5__7.z, 5__4 }, (ReceiverGroup)0); } 5__6 = null; } 5__5++; } <>2__current = (object)new WaitForSeconds(Mathf.Max(0f, 5__4)); <>1__state = 3; return true; } } <>4__this.standingTileDeleteStarted = false; <>4__this.standingTileDeleteRoutine = null; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1322 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1322(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Max(0.1f, <>4__this.coconutSpawnInterval.Value)); <>1__state = 1; return true; case 1: <>1__state = -1; break; case 2: <>1__state = -1; break; } if (<>4__this.gameState == GameState.Running) { <>4__this.SpawnCoconutOnRandomExistingCloudTile(); <>2__current = (object)new WaitForSeconds(Mathf.Max(0.1f, <>4__this.coconutSpawnInterval.Value)); <>1__state = 2; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1327 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1327(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1329 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1329(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1326 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1326(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1155 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1155(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.round9WrongRevealUntil = Time.time + 0.7f; <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.round9FirstPickIndex = -1; <>4__this.round9TempRevealIndex = -1; <>4__this.round9WrongRevealUntil = -1f; <>4__this.round9WrongRevealRoutine = null; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__909 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RoundGameType roundType; public Plugin <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__909(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Time.time; goto IL_005b; case 1: <>1__state = -1; goto IL_005b; case 2: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("Start", 0.8f, new Color(1f, 0.68f, 0.38f, 1f), thickRounded: true); <>2__current = (object)new WaitForSeconds(0.8f); <>1__state = 3; return true; case 3: { <>1__state = -1; return false; } IL_005b: if (<>4__this.activeTiles.Count == 0 && Time.time < 5__1 + 2f) { <>2__current = null; <>1__state = 1; return true; } <>4__this.TeleportRoundPlayersToSafeArenaTiles(roundType); <>4__this.gameState = GameState.RoundStarting; <>4__this.RaiseCenterNoticeToAll("Ready", 3f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(3f); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__975 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private string 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__975(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.arrowRoundSubmissions.Clear(); 5__1 = <>4__this.BuildRound3GridTargetSequence(); <>4__this.BeginArrowRoundLocal(5__1); <>4__this.RaiseMiniGameEvent(103, new object[1] { 5__1 }, (ReceiverGroup)0); 5__2 = Mathf.Max(3f, <>4__this.arrowRoundTimeLimit.Value); 5__3 = -1f; goto IL_019c; case 1: <>1__state = -1; goto IL_019c; case 2: { <>1__state = -1; return false; } IL_019c: if (<>4__this.gameState == GameState.Running && Time.time < <>4__this.arrowRoundStartLocalTime + 5__2 && (!testMode || <>4__this.IsRoundToggleStillOn(<>4__this.currentRoundType)) && (testMode || <>4__this.gameStart.Value)) { if (<>4__this.arrowRoundSubmissions.Count >= Mathf.Max(1, <>4__this.roundPlayers.Count)) { if (5__3 < 0f) { 5__3 = Time.time; } if (Time.time >= 5__3 + 1.25f) { goto IL_01cf; } } else { 5__3 = -1f; } <>2__current = null; <>1__state = 1; return true; } goto IL_01cf; IL_01cf: <>4__this.EndArrowRoundLocal(); <>4__this.AwardArrowRoundScores(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("GRID_STAR_FINISH")); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__966 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private string 5__1; private float[] 5__2; private float 5__3; private float 5__4; private float 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__966(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_00ed: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.rhythmRoundSubmissions.Clear(); <>4__this.rhythmRoundProgressByActor.Clear(); <>4__this.rhythmCenterResultPanelActive = false; <>4__this.rhythmCenterResultPanelUntil = -1f; 5__1 = <>4__this.BuildRandomArrowSequence(30); 5__2 = <>4__this.BuildRandomRhythmNoteTargetOffsets(5__1.Length); <>4__this.BeginRhythmRoundLocal(5__1, 5__2); <>4__this.RaiseMiniGameEvent(110, new object[2] { 5__1, 5__2 }, (ReceiverGroup)0); <>4__this.ShowCenterNotice("WASD 리듬", 1.2f, Color.white, thickRounded: true); 5__3 = Time.time; 5__4 = Mathf.Max(4f, <>4__this.rhythmNoteTravelSeconds.Value + <>4__this.GetRhythmLastNoteTargetOffset() + 2f); 5__5 = Mathf.Max(5__4, <>4__this.rhythmRoundTimeLimit.Value); goto IL_01f7; case 1: <>1__state = -1; goto IL_01f7; case 2: { <>1__state = -1; return false; } IL_01f7: if (<>4__this.gameState == GameState.Running && Time.time - 5__3 < 5__5 && (!testMode || <>4__this.IsRoundToggleStillOn(<>4__this.currentRoundType)) && (testMode || <>4__this.gameStart.Value) && <>4__this.rhythmRoundSubmissions.Count < Mathf.Max(1, <>4__this.roundPlayers.Count)) { <>2__current = null; <>1__state = 1; return true; } <>4__this.SubmitRhythmResultIfNeeded(); <>4__this.EndRhythmRoundLocal(); <>4__this.AwardRhythmRoundScores(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("RHYTHM_FINISH")); <>1__state = 2; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1113 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private float 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1113(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Expected O, but got Unknown //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.EndRound10HalliGalliLocal(); <>4__this.round10ScoresByActor.Clear(); <>4__this.currentRoundScores.Clear(); <>4__this.RefreshActorNamesFromCharacters(); <>4__this.RaiseCenterNoticeToAll("할리갈리", 1.2f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("3", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("2", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("1", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("시작", 0.45f, new Color(1f, 0.68f, 0.38f, 1f), thickRounded: true); <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 5; return true; case 5: <>1__state = -1; if (<>4__this.IsHostOrOffline()) { <>4__this.BeginRound10HalliGalliAsHost(); } 5__1 = Time.time; goto IL_0229; case 6: <>1__state = -1; goto IL_0229; case 7: <>1__state = -1; goto IL_0332; case 8: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("HALLI_GALLI_FINISH")); <>1__state = 9; return true; case 9: { <>1__state = -1; return false; } IL_0229: if (!<>4__this.round10HalliActive && Time.time < 5__1 + 3f) { <>2__current = null; <>1__state = 6; return true; } goto IL_0332; IL_0332: if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.HalliGalli && (!testMode || <>4__this.IsRoundToggleStillOn(RoundGameType.HalliGalli)) && (testMode || <>4__this.gameStart.Value)) { if (<>4__this.IsHostOrOffline() && <>4__this.round10HalliActive && !<>4__this.round10BellLocked && Time.time >= <>4__this.round10NextDrawTime && <>4__this.round10SuccessCount < 10) { <>4__this.DrawNextRound10CardAsHost(); } if (<>4__this.round10SuccessCount < 10) { <>2__current = null; <>1__state = 7; return true; } } if (<>4__this.round10SuccessCount >= 10) { <>4__this.round10Completed = true; } <>4__this.AwardRound10RankScoresFromSuccessCounts(); <>4__this.SyncScoresToAll(); <>4__this.EndRound10HalliGalliLocal(resetCompletedFlag: false); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 8; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1089 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private float[] 5__1; private int[] 5__2; private int 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1089(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.LogRound11Debug("RunRound11DinoRunRoutine ENTER testMode=" + testMode + ", " + <>4__this.GetRound11StateString()); <>4__this.EndRound11DinoLocal(); <>4__this.round11DinoPassedByActor.Clear(); <>4__this.round11DinoFailedByActor.Clear(); <>4__this.round11DinoPenaltyByActor.Clear(); <>4__this.round11DinoScoreByActor.Clear(); <>4__this.round11DinoFinalSubmittedActors.Clear(); <>4__this.currentRoundScores.Clear(); <>4__this.BuildRound11DinoObstaclePattern(out 5__1, out 5__2); 5__3 = Random.Range(100000, 999999); <>4__this.BeginRound11DinoLocal(5__1, 5__2, 5__3); ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("Round 11 DinoRun started. Obstacles: " + ((5__1 != null) ? 5__1.Length.ToString() : "0") + ", nonce: " + 5__3)); <>4__this.LogRound11Debug("After BeginRound11DinoLocal " + <>4__this.GetRound11StateString()); <>4__this.RaiseMiniGameEvent(134, new object[3] { 5__3, 5__1, 5__2 }, (ReceiverGroup)0); 5__4 = <>4__this.GetRound11ObstacleTravelSeconds(); 5__5 = 3f + ((5__1 != null && 5__1.Length != 0) ? 5__1[5__1.Length - 1] : 28f) + 5__4 + 2f; 5__6 = Time.unscaledTime; 5__7 = 5__6 + 3f + Mathf.Max(4f, 5__4 + 2.6f); goto IL_037a; case 1: <>1__state = -1; goto IL_037a; case 2: <>1__state = -1; goto IL_037a; case 3: { <>1__state = -1; return false; } IL_037a: if (<>4__this.round11DinoActive && <>4__this.currentRoundType == RoundGameType.DinoRun && Time.unscaledTime - 5__6 < 5__5) { if (<>4__this.gameState != GameState.Running) { <>4__this.LogRound11Debug("RunLoop corrected gameState from " + <>4__this.gameState.ToString() + " to Running. " + <>4__this.GetRound11StateString()); <>4__this.gameState = GameState.Running; } if (testMode || <>4__this.gameStart.Value) { if (<>4__this.HaveAllRound11DinoParticipantsSubmitted()) { if (<>4__this.round11DinoGlobalEndAllowedTime > 0f && Time.unscaledTime < <>4__this.round11DinoGlobalEndAllowedTime) { <>2__current = null; <>1__state = 1; return true; } if (Time.unscaledTime >= 5__7 || <>4__this.round11DinoGlobalEndAllowedTime > 0f) { goto IL_03b6; } } <>2__current = null; <>1__state = 2; return true; } } goto IL_03b6; IL_03b6: <>4__this.LogRound11Debug("Loop EXIT before final submit. elapsed=" + (Time.unscaledTime - 5__6).ToString("0.00") + ", limit=" + 5__5.ToString("0.00") + ", " + <>4__this.GetRound11StateString()); if (!<>4__this.round11DinoActive || <>4__this.currentRoundType != RoundGameType.DinoRun) { ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)("Round 11 DinoRun was interrupted before normal finish. State: " + <>4__this.gameState.ToString() + ", Type: " + <>4__this.currentRoundType)); <>4__this.round11DinoAllowLocalEnd = true; <>4__this.EndRound11DinoLocal(); return false; } <>4__this.SubmitRound11DinoResultIfNeeded(failed: false); <>4__this.AwardRound11DinoScores(); <>4__this.round11DinoAllowLocalEnd = true; <>4__this.EndRound11DinoLocal(); <>4__this.SyncScoresToAll(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("DINO_RUN_FINISH")); <>1__state = 3; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1194 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private int 5__1; private Round6CloudColor 5__2; private float 5__3; private HashSet 5__4; private float 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1194(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Expected O, but got Unknown //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Expected O, but got Unknown //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.CaptureRound6OriginalStateForAllTiles(); 5__1 = 0; goto IL_03a1; case 1: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("3", 0.85f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.85f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("2", 0.85f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.85f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("1", 0.85f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.85f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.AssignRound6RandomCloudColorsAndSync(5__2); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 5; return true; case 5: <>1__state = -1; 5__3 = <>4__this.GetRound6AnswerWindowSeconds(); <>4__this.StartRound6AnswerGaugeToAll(5__3, 5__2); 5__4 = new HashSet(); 5__5 = Time.time + 5__3; goto IL_029d; case 6: <>1__state = -1; goto IL_029d; case 7: <>1__state = -1; if (<>4__this.gameState != GameState.Running || <>4__this.currentRoundType != RoundGameType.ColorCloudSurvival) { return false; } <>4__this.RestoreRound6AllTilesAndSync(); <>2__current = (object)new WaitForSeconds(0.65f); <>1__state = 8; return true; case 8: <>1__state = -1; 5__4 = null; 5__1++; goto IL_03a1; case 9: { <>1__state = -1; break; } IL_029d: if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.ColorCloudSurvival && Time.time < 5__5) { <>2__current = null; <>1__state = 6; return true; } <>4__this.AwardRound6PlayersNearestTargetColorAtFinalMoment(5__2, 5__4); <>4__this.round6AnswerGaugeActive = false; <>4__this.SyncScoresToAll(); <>4__this.ShowRound6PersonalResultNoticeToAll(5__4); <>2__current = (object)new WaitForSeconds(0.85f); <>1__state = 7; return true; IL_03a1: if (5__1 < 4) { if (<>4__this.gameState != GameState.Running || <>4__this.currentRoundType != RoundGameType.ColorCloudSurvival) { return false; } if (testMode) { if (!<>4__this.IsRoundToggleStillOn(RoundGameType.ColorCloudSurvival)) { return false; } } else if (!<>4__this.gameStart.Value) { return false; } 5__2 = <>4__this.PickRandomRound6TargetColor(); <>4__this.RaiseCenterNoticeToAll(<>4__this.GetRound6ColorName(5__2), 1.2f, <>4__this.GetRound6ColorValue(5__2), thickRounded: true); <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; } if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.ColorCloudSurvival) { <>4__this.LockRound6ScoresAtEnd(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("ROUND6_ALL_CYCLES_DONE")); <>1__state = 9; return true; } break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1179 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private float 5__1; private float 5__2; private float 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1179(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Expected O, but got Unknown //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.round7ProgressByActor.Clear(); <>4__this.round7FinishTimes.Clear(); <>4__this.round7RankByActor.Clear(); <>4__this.round8PositionsByActor.Clear(); <>4__this.round8StarsByActor.Clear(); <>4__this.round8ParalyzedUntilByActor.Clear(); <>4__this.ClearRound8ElectricCells(); <>4__this.round8StarsEatenTotal = 0; <>4__this.EndRound7ButtonMashLocal(); <>4__this.RefreshActorNamesFromCharacters(); <>4__this.RaiseCenterNoticeToAll("달리기", 1.2f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("3", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("2", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("1", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("시작", 0.45f, new Color(1f, 0.68f, 0.38f, 1f), thickRounded: true); <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 5; return true; case 5: <>1__state = -1; <>4__this.BeginRound7ButtonMashLocal(); <>4__this.RaiseMiniGameEvent(119, Array.Empty(), (ReceiverGroup)0); 5__1 = Time.time; 5__2 = Mathf.Max(5f, (<>4__this.round7TimeLimitSeconds != null) ? <>4__this.round7TimeLimitSeconds.Value : 20f); 5__3 = -1f; goto IL_0388; case 6: <>1__state = -1; goto IL_0388; case 7: { <>1__state = -1; return false; } IL_0388: if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.ButtonMashRace && (!testMode || <>4__this.IsRoundToggleStillOn(RoundGameType.ButtonMashRace)) && (testMode || <>4__this.gameStart.Value)) { if (5__3 < 0f && <>4__this.HaveAllRound7ParticipantsFinished()) { 5__3 = Time.time; } if (5__3 >= 0f) { if (!(Time.time >= 5__3 + 5f)) { goto IL_0370; } } else if (!(Time.time - 5__1 >= 5__2)) { goto IL_0370; } } <>4__this.EndRound7ButtonMashLocal(); <>4__this.AwardRound7ButtonMashScores(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("BUTTON_MASH_FINISH")); <>1__state = 7; return true; IL_0370: <>2__current = null; <>1__state = 6; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1160 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private float 5__1; private int 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1160(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.EndRound8StarGridLocal(); <>4__this.round8PositionsByActor.Clear(); <>4__this.round8StarsByActor.Clear(); <>4__this.round8ParalyzedUntilByActor.Clear(); <>4__this.ClearRound8ElectricCells(); <>4__this.round8StarsEatenTotal = 0; <>4__this.RaiseCenterNoticeToAll("별 먹기", 1.1f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(1.1f); <>1__state = 1; return true; case 1: <>1__state = -1; if (<>4__this.IsHostOrOffline()) { <>4__this.BeginRound8StarGridAsHost(); } 5__1 = Time.time; goto IL_0117; case 2: <>1__state = -1; goto IL_0117; case 3: <>1__state = -1; goto IL_01d4; case 4: { <>1__state = -1; return false; } IL_01d4: if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.StarGrid && (!testMode || <>4__this.IsRoundToggleStillOn(RoundGameType.StarGrid)) && (testMode || <>4__this.gameStart.Value) && <>4__this.round8StarsEatenTotal < 5__2) { <>2__current = null; <>1__state = 3; return true; } <>4__this.EndRound8StarGridLocal(); <>4__this.AwardRound8StarGridScores(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("STAR_GRID_FINISH")); <>1__state = 4; return true; IL_0117: if (!<>4__this.round8StarGridActive && Time.time < 5__1 + 3f) { <>2__current = null; <>1__state = 2; return true; } 5__2 = <>4__this.GetRound8TotalStars(); goto IL_01d4; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1134 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private float 5__1; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1134(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Expected O, but got Unknown //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.round9FinishTimes.Clear(); <>4__this.round9PairScores.Clear(); <>4__this.EndRound9MemoryLocal(); <>4__this.RefreshActorNamesFromCharacters(); <>4__this.RaiseCenterNoticeToAll("과일 그림 짝맞추기", 1.2f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("3", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("2", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("1", 0.75f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("시작", 0.45f, new Color(1f, 0.68f, 0.38f, 1f), thickRounded: true); <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 5; return true; case 5: <>1__state = -1; if (<>4__this.IsHostOrOffline()) { <>4__this.BeginRound9MemoryAsHost(); } 5__1 = Time.time; goto IL_0222; case 6: <>1__state = -1; goto IL_0222; case 7: <>1__state = -1; goto IL_0342; case 8: { <>1__state = -1; return false; } IL_0222: if (!<>4__this.round9MemoryActive && Time.time < 5__1 + 3f) { <>2__current = null; <>1__state = 6; return true; } 5__2 = -1f; goto IL_0342; IL_036a: <>4__this.AwardRound9MemoryScores(); <>4__this.EndRound9MemoryLocal(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("MEMORY_MATCH_FINISH")); <>1__state = 8; return true; IL_0342: if (<>4__this.gameState == GameState.Running && <>4__this.currentRoundType == RoundGameType.MemoryMatch && (!testMode || <>4__this.IsRoundToggleStillOn(RoundGameType.MemoryMatch)) && (testMode || <>4__this.gameStart.Value) && !(Time.time >= <>4__this.round9MemoryInputStartTime + 45f)) { if (<>4__this.HaveAllRound9ParticipantsFinished()) { if (5__2 < 0f) { 5__2 = Time.time; } if (Time.time >= 5__2 + 5f) { goto IL_036a; } } else { 5__2 = -1f; } <>2__current = null; <>1__state = 7; return true; } goto IL_036a; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__907 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RoundGameType roundType; public bool testMode; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__907(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.currentRoundIsTestMode = testMode; <>4__this.currentRoundType = roundType; <>4__this.currentRoundIndex = (testMode ? <>4__this.GetRoundNumberForType(roundType) : Mathf.Clamp(<>4__this.mainRoundPlayedCount + 1, 1, 11)); <>4__this.activeRoundLifecycleNonce = ++<>4__this.roundLifecycleNonce; <>4__this.roundEndPresentationComplete = false; <>4__this.finishRoundRoutineHandle = null; ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[RoundFlow] RunRoundRoutine START nonce=" + <>4__this.activeRoundLifecycleNonce + ", type=" + roundType.ToString() + ", test=" + testMode)); <>4__this.gameState = GameState.SpawningArena; <>4__this.StopRoundRoutines(); <>4__this.ResetCurrentRoundState(); <>4__this.InitRoundPlayersAllCurrent(); if (<>4__this.clearOldBeforeSpawn.Value) { <>4__this.ClearArena(); <>2__current = null; <>1__state = 1; return true; } goto IL_021c; case 1: <>1__state = -1; goto IL_021c; case 2: <>1__state = -1; if (roundType == RoundGameType.ColorCloudSurvival) { <>4__this.CaptureRound6OriginalStateForAllTiles(); <>2__current = (object)new WaitForSeconds(0.15f); <>1__state = 3; return true; } goto IL_0289; case 3: <>1__state = -1; goto IL_0289; case 4: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RoundReadyAndTeleportRoutine(roundType)); <>1__state = 5; return true; case 5: <>1__state = -1; <>4__this.GiveRoundStartItems(roundType); <>4__this.gameState = GameState.Running; <>4__this.currentRoundRunningStartTime = Time.time; <>4__this.BeginRoundStartFinishGuard("RunRoundRoutineRunning"); <>4__this.currentRoundHardTimeoutAt = Time.time + <>4__this.GetRoundHardTimeoutSeconds(roundType); <>4__this.roundEndStartedAt = -1f; <>4__this.standingTileDeleteStarted = false; <>4__this.showDynamiteChargeBar = false; <>4__this.ApplyUiRoundStartLocal(roundType, <>4__this.currentRoundIndex); <>4__this.RaiseSimpleEvent(105, new object[2] { (int)roundType, <>4__this.currentRoundIndex }, (ReceiverGroup)0); <>4__this.SyncScoresToAll(); if (roundType == RoundGameType.ShelfHook) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunTimingRoundRoutine(testMode)); <>1__state = 6; return true; } if (roundType == RoundGameType.BounceFrisbee) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunArrowRoundRoutine(testMode)); <>1__state = 7; return true; } if (<>4__this.enableStandingTileDelete.Value && roundType == RoundGameType.CloudDynamite) { <>4__this.standingTileDeleteRoutine = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.Round1OuterCloudCollapseRoutine()); } else if (<>4__this.enableStandingTileDelete.Value && roundType == RoundGameType.DoubleCloudCoconut) { <>4__this.standingTileDeleteRoutine = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.StandingTileDeleteRoutine()); } if (roundType == RoundGameType.CloudDynamite) { <>4__this.dynamiteRoutine = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.DynamiteGiveRoutine()); } else if (roundType == RoundGameType.DoubleCloudCoconut) { <>4__this.coconutSpawnRoutine = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.Round4CoconutSpawnRoutine()); } else { if (roundType == RoundGameType.RhythmGame) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRhythmRoundRoutine(testMode)); <>1__state = 8; return true; } if (roundType == RoundGameType.ColorCloudSurvival) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRound6ColorSurvivalRoutine(testMode)); <>1__state = 9; return true; } if (roundType == RoundGameType.ButtonMashRace) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRound7ButtonMashRoutine(testMode)); <>1__state = 10; return true; } if (roundType == RoundGameType.StarGrid) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRound8StarGridRoutine(testMode)); <>1__state = 11; return true; } if (roundType == RoundGameType.MemoryMatch) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRound9MemoryMatchRoutine(testMode)); <>1__state = 12; return true; } if (roundType == RoundGameType.HalliGalli) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRound10HalliGalliRoutine(testMode)); <>1__state = 13; return true; } if (roundType == RoundGameType.DinoRun) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRound11DinoRunRoutine(testMode)); <>1__state = 14; return true; } } goto IL_0814; case 6: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 7: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 8: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 9: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 10: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 11: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 12: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 13: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 14: <>1__state = -1; <>4__this.StopRoundRoutines(); return false; case 15: <>1__state = -1; goto IL_0814; case 16: { <>1__state = -1; goto IL_08c2; } IL_07fb: <>2__current = null; <>1__state = 15; return true; IL_0814: if (<>4__this.gameState == GameState.Running) { if (testMode) { if (<>4__this.IsRoundToggleStillOn(roundType)) { goto IL_07fb; } } else if (<>4__this.gameStart.Value) { goto IL_07fb; } } if (<>4__this.gameState != GameState.Running || ((!testMode || !<>4__this.IsRoundToggleStillOn(roundType)) && (testMode || !<>4__this.gameStart.Value))) { break; } ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)("[RoundFlow] Generic round loop exited while still Running. Keeping round alive instead of forcing finish. type=" + roundType)); goto IL_08c2; IL_021c: <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnArenaForRoundRoutine(roundType)); <>1__state = 2; return true; IL_08c2: if (<>4__this.gameState == GameState.Running && ((testMode && <>4__this.IsRoundToggleStillOn(roundType)) || (!testMode && <>4__this.gameStart.Value))) { <>2__current = null; <>1__state = 16; return true; } break; IL_0289: <>4__this.gameState = GameState.RoundStarting; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ShowRoundIntroDescriptionRoutine(roundType)); <>1__state = 4; return true; } <>4__this.StopRoundRoutines(); ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[RoundFlow] RunRoundRoutine END nonce=" + <>4__this.activeRoundLifecycleNonce + ", type=" + roundType.ToString() + ", state=" + <>4__this.gameState)); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__884 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public int voteRoundNumber; public int roundsToPlay; public Action onSelected; public Plugin <>4__this; private RoundGameType[] 5__1; private int 5__2; private object[] 5__3; private float 5__4; private float 5__5; private float 5__6; private int 5__7; private RoundGameType 5__8; private string 5__9; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__884(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; 5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.WaitForRoundEndPresentationCompleteRoutine("VoteRoutineEnter")); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.gameState = GameState.RoundStarting; <>4__this.StopRoundRoutines(); <>4__this.ResetCurrentRoundState(); <>4__this.ClearCenterNoticeOnly(); <>4__this.roundIntroUntil = -1f; <>4__this.roundIntroTitleText = ""; <>4__this.InitRoundPlayersAllCurrent(); <>4__this.SyncScoresToAll(); 5__1 = <>4__this.PickRoundVoteOptions(); 5__2 = Random.Range(100000, 999999); 5__3 = new object[7] { 5__2, voteRoundNumber, roundsToPlay, (int)5__1[0], (int)5__1[1], (int)5__1[2], 20f }; <>4__this.ApplyRoundVoteStartLocal(5__3); <>4__this.RaiseMiniGameEvent(136, 5__3, (ReceiverGroup)1); 5__4 = Time.time; 5__5 = 5__4 + 20f; 5__6 = -1f; goto IL_021f; case 2: <>1__state = -1; goto IL_021f; case 3: { <>1__state = -1; if (onSelected != null) { onSelected(5__8); } return false; } IL_024a: 5__7 = <>4__this.ResolveRoundVoteWinnerIndex(); 5__8 = 5__1[Mathf.Clamp(5__7, 0, 2)]; <>4__this.roundVoteActive = false; <>4__this.roundVoteLocalChoice = -1; <>4__this.roundVoteLocalHoverChoice = 1; <>4__this.roundVoteByActor.Clear(); 5__9 = <>4__this.GetRoundVoteDisplayName(5__8); ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[Vote] Selected game: " + 5__9)); <>4__this.ClearCenterNoticeOnly(); <>4__this.roundIntroUntil = -1f; <>4__this.roundIntroTitleText = ""; <>2__current = (object)new WaitForSeconds(0.35f); <>1__state = 3; return true; IL_021f: if (<>4__this.gameStart.Value && Time.time < 5__5) { if (<>4__this.AllCurrentPlayersVoted()) { if (5__6 < 0f) { 5__6 = Time.time; } if (Time.time >= 5__6 + 2f) { goto IL_024a; } } <>2__current = null; <>1__state = 2; return true; } goto IL_024a; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__958 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public bool testMode; public Plugin <>4__this; private float 5__1; private float 5__2; private float 5__3; private float 5__4; private float 5__5; private float 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__958(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.timingRoundSubmissions.Clear(); 5__1 = Mathf.Min(<>4__this.timingTargetMinSeconds.Value, <>4__this.timingTargetMaxSeconds.Value); 5__2 = Mathf.Max(<>4__this.timingTargetMinSeconds.Value, <>4__this.timingTargetMaxSeconds.Value); 5__3 = Random.Range(5__1, 5__2); 5__3 = Mathf.Round(5__3 * 100f) / 100f; <>4__this.timingRoundTargetSeconds = 5__3; <>4__this.timingLocalSubmitted = false; <>4__this.timingLocalPressedSeconds = -1f; <>4__this.timingLastTickSecond = -1; <>4__this.RaiseCenterNoticeToAll("목표 " + 5__3.ToString("0.00") + "초", 1.8f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(1.8f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("3", 0.7f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("2", 0.7f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("1", 0.7f, Color.white, thickRounded: true); <>2__current = (object)new WaitForSeconds(0.7f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.RaiseCenterNoticeToAll("시작", 0.45f, new Color(1f, 0.68f, 0.38f, 1f), thickRounded: true); <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 5; return true; case 5: <>1__state = -1; <>4__this.BeginTimingRoundLocal(5__3); <>4__this.RaiseMiniGameEvent(101, new object[1] { 5__3 }, (ReceiverGroup)0); 5__4 = Mathf.Max(1f, 5__3 + Mathf.Max(0.5f, <>4__this.timingSubmitWindowExtraSeconds.Value)); 5__5 = -1f; goto IL_040c; case 6: <>1__state = -1; goto IL_040c; case 7: { <>1__state = -1; return false; } IL_040c: if (<>4__this.gameState == GameState.Running && (!testMode || <>4__this.IsRoundToggleStillOn(<>4__this.currentRoundType)) && (testMode || <>4__this.gameStart.Value)) { 5__6 = Mathf.Max(0f, Time.time - <>4__this.timingRoundStartLocalTime); if (5__5 < 0f && <>4__this.HaveAllTimingParticipantsSubmitted()) { 5__5 = Time.time; } if (5__5 >= 0f) { if (!(Time.time >= 5__5 + 5f)) { goto IL_03f4; } } else if (!(5__6 >= 5__4)) { goto IL_03f4; } } <>4__this.EndTimingRoundLocal(); <>4__this.AwardTimingRoundScores(); <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.FinishCurrentRoundRoutine("TIMING_FINISH")); <>1__state = 7; return true; IL_03f4: <>2__current = null; <>1__state = 6; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1295 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Character character; public Vector3 pos; public int reviveSegment; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1295(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__793 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float seconds; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__793(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.BroadcastFinalScoreboard(seconds); <>2__current = (object)new WaitForSeconds(Mathf.Max(0.1f, seconds)); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.finalScoreboardActive = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__788 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RoundGameType roundType; public Plugin <>4__this; private object[] 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__788(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.BuildRoundIntroDescriptionData(roundType); <>4__this.ApplyRoundIntroDescriptionEventLocal(5__1); <>4__this.RaiseSimpleEvent(131, 5__1, (ReceiverGroup)0); <>2__current = (object)new WaitForSeconds(7f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.roundIntroUntil = -1f; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__902 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RoundGameType roundType; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__902(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.finalEndingTriggered = false; <>4__this.finalScoreboardActive = false; <>4__this.roundBetweenMovementLockUntil = -1f; <>4__this.firstRoundStartedAfterMapLoad = true; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.RunRoundRoutine(roundType, testMode: true)); <>1__state = 1; return true; case 1: <>1__state = -1; if (roundType == RoundGameType.DinoRun && <>4__this.round11DinoActive) { <>4__this.LogRound11Debug("SingleRoundTestRoutine cleanup blocked because Round 11 is still active. " + <>4__this.GetRound11StateString()); <>4__this.mainGameRoutine = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.WaitAndCleanupRound11SingleTestRoutine()); return false; } <>4__this.singleRoundTestRunning = false; <>4__this.mainGameRoutine = null; <>4__this.FullGameEndCleanup(startProtection: false); <>4__this.TurnOffAllStartTriggers(); <>4__this.ClearArena(); <>4__this.gameState = GameState.Idle; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1063 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RoundGameType roundType; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1063(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (roundType == RoundGameType.ShelfHook) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 1; return true; } if (roundType == RoundGameType.BounceFrisbee) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 2; return true; } if (roundType == RoundGameType.DoubleCloudCoconut) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnArenaLayerRoutine(RoundGameType.CloudDynamite, <>4__this.arenaY.Value, 0)); <>1__state = 3; return true; } if (roundType == RoundGameType.RhythmGame) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 5; return true; } if (roundType == RoundGameType.ButtonMashRace) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 6; return true; } if (roundType == RoundGameType.StarGrid) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 7; return true; } if (roundType == RoundGameType.MemoryMatch) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 8; return true; } if (roundType == RoundGameType.HalliGalli) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 9; return true; } if (roundType == RoundGameType.DinoRun) { <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnShelfCornerArenaRoutine()); <>1__state = 10; return true; } <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnArenaLayerRoutine(roundType, <>4__this.arenaY.Value, 0)); <>1__state = 11; return true; case 1: <>1__state = -1; return false; case 2: <>1__state = -1; return false; case 3: <>1__state = -1; <>2__current = ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.SpawnArenaLayerRoutine(RoundGameType.CloudDynamite, <>4__this.round4UpperArenaY.Value, 1)); <>1__state = 4; return true; case 4: <>1__state = -1; return false; case 5: <>1__state = -1; return false; case 6: <>1__state = -1; return false; case 7: <>1__state = -1; return false; case 8: <>1__state = -1; return false; case 9: <>1__state = -1; return false; case 10: <>1__state = -1; return false; case 11: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1064 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RoundGameType roundType; public float y; public int layerIndex; public Plugin <>4__this; private string 5__1; private float 5__2; private float 5__3; private float 5__4; private float 5__5; private float 5__6; private float 5__7; private int 5__8; private float 5__9; private float 5__10; private float 5__11; private Vector3 5__12; private GameObject 5__13; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1064(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__13 = null; <>1__state = -2; } private bool MoveNext() { //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; 5__13 = null; 5__11 += 5__7; goto IL_02ec; } <>1__state = -1; 5__1 = <>4__this.ResolveInstalledPrefabPath(roundType); if (string.IsNullOrWhiteSpace(5__1)) { ((BaseUnityPlugin)<>4__this).Logger.LogError((object)$"설치 완료 프리팹 경로를 찾지 못했습니다. RoundType: {roundType}"); return false; } 5__2 = <>4__this.GetRoundSpacing(roundType); 5__3 = Mathf.Min(<>4__this.arenaStartX.Value, <>4__this.arenaEndX.Value); 5__4 = Mathf.Max(<>4__this.arenaStartX.Value, <>4__this.arenaEndX.Value); 5__5 = <>4__this.ForcedArenaMinZ(); 5__6 = <>4__this.ForcedArenaMaxZ(); 5__7 = Mathf.Clamp(5__2, 0.5f, 100f); 5__8 = Mathf.Max(1, <>4__this.maxSpawnPerSecond.Value); 5__9 = 1f / (float)5__8; ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("Arena layer spawn started. Type: " + roundType.ToString() + ", Path: " + 5__1 + ", Y: " + y + ", Z: " + 5__5 + "~" + 5__6 + ", Spacing: " + 5__7)); 5__10 = 5__3; goto IL_031e; IL_02ec: if (5__11 <= 5__6 + 0.01f) { 5__12 = new Vector3(5__10, y, 5__11); 5__13 = <>4__this.SpawnInstalledFungus(5__1, 5__12, <>4__this.GetSpawnRotation(), roundType); if ((Object)(object)5__13 != (Object)null) { <>4__this.spawnedArenaObjects.Add(5__13); <>4__this.activeTiles.Add(new ArenaTile(5__13, 5__12, layerIndex)); } <>2__current = (object)new WaitForSeconds(5__9); <>1__state = 1; return true; } 5__10 += 5__7; goto IL_031e; IL_031e: if (5__10 <= 5__4 + 0.01f) { 5__11 = 5__5; goto IL_02ec; } ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)$"Arena layer spawn finished. Total tiles: {<>4__this.activeTiles.Count}"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1038 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private string 5__1; private Vector3[] 5__2; private int 5__3; private GameObject 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1038(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.ResolveInstalledPrefabPath(RoundGameType.CloudDynamite); if (string.IsNullOrWhiteSpace(5__1)) { return false; } 5__2 = <>4__this.GetArenaCornerPositions(<>4__this.arenaY.Value); 5__3 = 0; break; case 1: <>1__state = -1; 5__4 = null; 5__3++; break; } if (5__3 < 5__2.Length) { 5__4 = <>4__this.SpawnInstalledFungus(5__1, 5__2[5__3], <>4__this.GetSpawnRotation(), RoundGameType.CloudDynamite); if ((Object)(object)5__4 != (Object)null) { <>4__this.spawnedArenaObjects.Add(5__4); <>4__this.activeTiles.Add(new ArenaTile(5__4, 5__2[5__3], 0)); } <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1272 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private string 5__1; private int 5__2; private GameObject 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1272(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!<>4__this.IsHostOrOffline()) { return false; } 5__1 = <>4__this.ResolveInstalledPrefabPath(RoundGameType.ShelfHook); if (string.IsNullOrWhiteSpace(5__1)) { ((BaseUnityPlugin)<>4__this).Logger.LogError((object)"결과 선반균류 소환 실패: 설치 완료 선반균류 프리팹 경로가 비어 있습니다."); return false; } <>4__this.ClearRoundResultPodiums(); 5__2 = 0; break; case 1: <>1__state = -1; 5__3 = null; 5__2++; break; } if (5__2 < RoundResultPodiumSpawnPositions.Length) { 5__3 = <>4__this.SpawnInstalledFungus(5__1, RoundResultPodiumSpawnPositions[5__2], <>4__this.GetSpawnRotation(), RoundGameType.ShelfHook); if ((Object)(object)5__3 != (Object)null) { ((Object)5__3).name = "PEAKPartyGames_ResultPodium_" + (5__2 + 1); <>4__this.roundResultPodiumObjects.Add(5__3); } else { ((BaseUnityPlugin)<>4__this).Logger.LogError((object)("결과 선반균류 소환 실패. Index: " + 5__2 + ", Pos: " + ((object)(Vector3)(ref RoundResultPodiumSpawnPositions[5__2])).ToString())); } <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1037 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private string 5__1; private Vector3[] 5__2; private int 5__3; private GameObject 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1037(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = <>4__this.ResolveInstalledPrefabPath(RoundGameType.ShelfHook); if (string.IsNullOrWhiteSpace(5__1)) { ((BaseUnityPlugin)<>4__this).Logger.LogError((object)"선반균류 4모서리 경기장 소환 실패: 설치 완료 프리팹 경로가 비어 있습니다."); return false; } 5__2 = <>4__this.GetArenaCornerPositions(<>4__this.arenaY.Value); ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)$"Shelf corner arena spawn started. Path: {5__1}, Count: {5__2.Length}"); 5__3 = 0; break; case 1: <>1__state = -1; 5__4 = null; 5__3++; break; } if (5__3 < 5__2.Length) { 5__4 = <>4__this.SpawnInstalledFungus(5__1, 5__2[5__3], <>4__this.GetSpawnRotation(), RoundGameType.ShelfHook); if ((Object)(object)5__4 != (Object)null) { <>4__this.spawnedArenaObjects.Add(5__4); <>4__this.activeTiles.Add(new ArenaTile(5__4, 5__2[5__3], 0)); } else { ((BaseUnityPlugin)<>4__this).Logger.LogError((object)$"선반균류 모서리 소환 실패. Index: {5__3}, Path: {5__1}, Pos: {5__2[5__3]}"); } <>2__current = (object)new WaitForSeconds(0.05f); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__1241 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; private float 5__1; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1241(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.standingTileDeleteStarted = false; 5__1 = <>4__this.GetStandingTileStartDelayForCurrentRound(); 5__2 = Time.time + Mathf.Max(0f, 5__1); goto IL_0080; case 1: <>1__state = -1; goto IL_0080; case 2: { <>1__state = -1; break; } IL_0080: if (<>4__this.gameState == GameState.Running && Time.time < 5__2) { <>2__current = null; <>1__state = 1; return true; } <>4__this.standingTileDeleteStarted = true; break; } if (<>4__this.gameState == GameState.Running && <>4__this.activeTiles.Count > 0) { <>4__this.MarkStandingTilesToAlivePlayers(); <>2__current = (object)new WaitForSeconds(Mathf.Max(0.05f, <>4__this.standingTileCheckInterval.Value)); <>1__state = 2; return true; } <>4__this.standingTileDeleteStarted = false; <>4__this.standingTileDeleteRoutine = null; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__903 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Plugin <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__903(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (<>4__this.round11DinoActive && <>4__this.currentRoundType == RoundGameType.DinoRun) { if (<>4__this.gameState != GameState.Running) { <>4__this.gameState = GameState.Running; } <>2__current = null; <>1__state = 1; return true; } <>4__this.singleRoundTestRunning = false; <>4__this.mainGameRoutine = null; <>4__this.FullGameEndCleanup(startProtection: false); <>4__this.TurnOffAllStartTriggers(); <>4__this.ClearArena(); <>4__this.gameState = GameState.Idle; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__883 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string reason; public Plugin <>4__this; private float 5__1; private bool 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__883(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Time.time; 5__2 = false; break; case 1: <>1__state = -1; break; } if (<>4__this.gameStart.Value && <>4__this.IsRoundEndPresentationStillActive()) { if (!5__2) { 5__2 = true; ((BaseUnityPlugin)<>4__this).Logger.LogInfo((object)("[RoundFlow] Waiting round end presentation before next vote. reason=" + reason + ", state=" + <>4__this.gameState.ToString() + ", roundFinish=" + <>4__this.roundFinishInProgress + ", resultPanel=" + <>4__this.roundResultPanelActive + ", emoteRoutine=" + (<>4__this.roundEndEmoteRoutine != null) + ", autoScoreLeft=" + Mathf.Max(0f, <>4__this.autoScoreboardUntil - Time.time).ToString("0.00"))); } if (!(Time.time > 5__1 + 35f)) { <>2__current = null; <>1__state = 1; return true; } ((BaseUnityPlugin)<>4__this).Logger.LogWarning((object)("[RoundFlow] Round end presentation wait timed out. Forcing local cleanup. reason=" + reason)); <>4__this.roundFinishInProgress = false; <>4__this.roundEndPresentationComplete = true; <>4__this.finishRoundRoutineHandle = null; <>4__this.flareReadyActive = false; <>4__this.flareReadyLocalConfirmed = false; FastBlockThirdPersonVInput = false; <>4__this.flareReadyThirdPersonLockUntil = -999f; <>4__this.flareReadyByActor.Clear(); <>4__this.flareReadyActorOrder.Clear(); <>4__this.flareReadyActorNames.Clear(); if (<>4__this.flareReadyRoutine != null) { try { ((MonoBehaviour)<>4__this).StopCoroutine(<>4__this.flareReadyRoutine); } catch { } <>4__this.flareReadyRoutine = null; } <>4__this.roundEndStartedAt = -1f; <>4__this.roundResultPanelActive = false; <>4__this.roundResultPanelForcedLines = null; <>4__this.roundResultPanelForcedTitle = ""; <>4__this.autoScoreboardUntil = -1f; <>4__this.roundEndEmoteRoutine = null; <>4__this.StopRoundEndFrontCamera(); <>4__this.ForceEndAllLocalRoundUiStates("RoundFlowWaitTimeout"); <>4__this.gameState = GameState.Idle; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string PluginGuid = "songt.peak.cloudarena"; public const string PluginName = "PEAK Party Games"; public const string PluginVersion = "5.21.6"; private bool useEnglishUi = true; private const string LanguagePrefsKey = "PEAKPartyGames.Language"; private bool settingsMenuOpen = false; private GUIStyle settingsMenuPanelStyle; private GUIStyle settingsMenuTitleStyle; private GUIStyle settingsMenuButtonStyle; private GUIStyle settingsMenuSmallStyle; private bool settingsMenuCursorWasVisible; private CursorLockMode settingsMenuPreviousLockState; private int settingsMenuSelectedIndex = 0; private float settingsMenuInputIgnoreUntil = -999f; private GUIStyle settingsMenuSelectedButtonStyle; private GUIStyle settingsMenuHintTopLeftStyle; private bool menuMovementZeroApplied = false; private Character menuMovementZeroCharacter = null; private readonly Dictionary menuMovementSavedFloatFields = new Dictionary(); private readonly Dictionary menuMovementSavedIntFields = new Dictionary(); private static readonly Dictionary UiEnglishExact = new Dictionary { { "게임준비 : V", "Ready : V" }, { "V를 눌러 3인칭 Ready", "Press V for Third Person Ready" }, { "다음 게임 선택", "Next Game Selection" }, { "게임 선택", "Game Selection" }, { "게임선택", "Game Selection" }, { "선택된 게임", "Selected Game" }, { "선택 완료", "Selection Complete" }, { "확정", "Confirm" }, { "취소", "Cancel" }, { "남은 선택 시간", "Selection Time Left" }, { "선택 대기중", "Waiting for Selection" }, { "투표", "Vote" }, { "투표 완료", "Vote Complete" }, { "랜덤 선택", "Random Selection" }, { "이번 게임", "This Game" }, { "다음 라운드", "Next Round" }, { "게임 후보", "Game Candidates" }, { "라운드 설명을 확인하세요.", "Check the round description." }, { "라운드 결과", "Round Result" }, { "2라운드 결과", "Round 2 Result" }, { "리듬 게임 결과", "Rhythm Game Result" }, { "최종 점수판", "Final Scoreboard" }, { "시작", "Start" }, { "준비 ", "Ready " }, { "도착!", "FINISH!" }, { "도착 완료", "Finished" }, { "리턴 표시까지 이동!", "Move to the return mark!" }, { "별까지 내려가기!", "Go down to the star!" }, { "성공 현황", "Success Count" }, { "아직 성공 없음", "No success yet" }, { "정지중", "Locked" }, { "정지중 ", "Locked " }, { "목표와의 차이", "Difference from target" }, { "클리어 순위", "Clear Ranking" }, { "클리어 시간", "Clear Time" }, { "다이너마이트", "Dynamite" }, { "성공률", "Success Rate" }, { "미완료 +0P", "Incomplete +0P" }, { "5초 동안 위치를 기억해!", "Memorize the positions for 5 seconds!" }, { "가리는 중...", "Hiding..." }, { "틀림! 0.7초 확인 후 다시 선택", "Wrong! Re-select after 0.7 seconds" }, { "같은 과일 합계가 정확히 5개면 Space!", "Press Space when matching fruit total is exactly 5!" }, { "개인전: WASD 이동 / Space 선택", "Solo: WASD move / Space select" }, { "WASD로 이동 / 상대 칸 진입 불가", "Move with WASD / cannot enter occupied tiles" }, { "과일 그림 짝맞추기", "Fruit Memory Match" }, { "별 먹기", "Star Collect" }, { "방향키 레이스", "Arrow Race" }, { "별 도착 레이스", "Star Maze Race" }, { "폭탄 구름섬", "Bomb Cloud Island" }, { "구름섬 서바이벌", "Cloud Island Survival" }, { "타이밍 PVP", "Timing PVP" }, { "기억력 PVP", "Memory PVP" }, { "리듬게임", "Rhythm Game" }, { "WASD 리듬", "WASD Rhythm" }, { "색깔구름", "Color Cloud" }, { "달리기", "Running" }, { "할리갈리", "Halli Galli" }, { "애니멀 점프", "Animal Jump" }, { "애니멀점프 ", "Animal Jump " }, { "라운드 종료", "Round End" }, { "클리어!", "CLEAR!" }, { "성공", "Success" }, { "실패", "Fail" }, { "빈칸", "Blank" }, { "선택 ", "Select " }, { "A/D 순환 이동 · Space 확정 · ", "A/D Move · Space Confirm · " }, { "Space 키를 목표 시간에 맞춰 누르기", "Press Space at the target time" }, { "9라운드 과일 그림 짝맞추기", "Round 9 Fruit Memory Match" }, { "10라운드 할리갈리", "Round 10 Halli Galli" }, { "[ 최종 점수판 ]", "[ Final Scoreboard ]" }, { "[ 생존시간에 따라 점수가 지급됩니다 ]", "[ Points are awarded based on survival time ]" }, { "[ 정확도에 따라 20p 15p 10p 5p ]", "[ 20p / 15p / 10p / 5p based on accuracy ]" }, { "[ 도착 순서에 따라 20p 15p 10p 5p ]", "[ 20p / 15p / 10p / 5p based on finish order ]" }, { "[ 성공률에 따라 20p 15p 10p 5p ]", "[ 20p / 15p / 10p / 5p based on success rate ]" }, { "[ 게임당 5p (4번) ]", "[ 5p per success, 4 attempts ]" }, { "[ 선착순에 따라 20p 15p 10p 5p ]", "[ 20p / 15p / 10p / 5p based on finish order ]" }, { "[ 별갯수 등수에 따라 20p 15p 10p 5p ]", "[ 20p / 15p / 10p / 5p based on star ranking ]" }, { "[ 성공횟수 등수에 따라 20p 15p 10p 5p ]", "[ 20p / 15p / 10p / 5p based on success ranking ]" }, { "[ 기본 20점 / 충돌 1회당 -3p ]", "[ Base 20 points / -3p per collision ]" }, { "바깥쪽 구름균류부터 사라집니다.\n다이너마이트로 상대를 추락시키세요.", "Outer cloud mushrooms disappear first.\nUse dynamite to knock opponents down." }, { "목표 시간에 맞춰 Space 키를 누르세요.\n목표 시간에 가까울수록 높은 점수를 얻습니다.", "Press Space at the target time.\nThe closer you are, the higher your score." }, { "7x11 격자판에서 WASD로 이동하세요.\n3 2 1 START 후 마지막 별 위치에 가장 빨리 도착하면 승리합니다.", "Move on the 7x11 grid with WASD.\nAfter 3 2 1 START, reach the final star as fast as possible." }, { "1층과 2층 구름균류 맵에서 플레이합니다.\n밟은 구름균류가 빠르게 사라집니다.", "Play on a two-floor cloud mushroom arena.\nCloud mushrooms disappear quickly after being stepped on." }, { "화면에 나오는 리듬 입력을 정확한 타이밍에 맞추세요.\n성공한 개수가 많은 순서대로 점수를 얻습니다.", "Hit the rhythm inputs on screen with accurate timing.\nPlayers with more successful hits get more points." }, { "정답 색이 공개된 뒤 카운트다운이 시작됩니다.\n제한 시간 안에 같은 색 발판을 밟으면 점수를 얻습니다.", "After the target color is shown, a countdown begins.\nStep on a platform of the same color within the limit to score." }, { "각자 화면에 표시되는 WASD 아무 키를 입력해 앞으로 달리세요.\n플레이어마다 다른 랜덤 키 순서가 나오며, 잘못 누르면 뒤로 밀려납니다.", "Press the random WASD keys shown on your screen to run forward.\nEach player has a different sequence, and wrong inputs push you back." }, { "7x7 보드에서 WASD로 이동해 별을 먹으세요.\n전기칸에 닿으면 잠시 움직일 수 없습니다.", "Move on the 7x7 board with WASD and collect stars.\nTouching an electric tile stuns you briefly." }, { "과일 그림 위치를 기억한 뒤 같은 그림을 맞추세요.", "Memorize the fruit positions, then match the same pictures." }, { "카드에 표시된 같은 과일 개수의 합이 5가 되면 Space를 누르세요.\n잘못 누르면 3초 동안 입력이 정지됩니다.", "Press Space when the total number of the same fruit shown on the cards becomes 5.\nIf you press incorrectly, your input is locked for 3 seconds." }, { "Space 키로 점프해서 선인장 장애물을 넘으세요.\n총 40개의 장애물이 같은 패턴으로 등장합니다.", "Press Space to jump over cactus obstacles.\nA total of 40 obstacles appear in the same pattern." }, { "별 쟁탈전", "Star Battle" }, { "A: 전 페이지 D: 다음 페이지 ", "A: Previous Page D: Next Page " }, { "아무키나 눌러서 TIP을 종료합니다", "Press any key to close TIP" }, { "한국어로 변경됨", "Changed to Korean" }, { "바깥쪽부터 구름균류가 사라집니다", "Cloud Mushrooms disappear from the outside first" }, { "밟은 구름균류가 사라집니다", "Cloud Mushrooms disappear when stepped on" }, { "발판 사라짐 시작까지", "Tile collapse starts in" }, { "바깥쪽 구름균류 붕괴까지", "Outer Cloud Mushroom collapse starts in" }, { "초", " sec" }, { "게임은 2명에서 4명까지 함께 플레이하는 것을 기준으로 만들어졌습니다.", "This game is designed for 2 to 4 players." } }; private static readonly KeyValuePair[] UiEnglishReplace = new KeyValuePair[97] { new KeyValuePair("게임 선택", "Game Selection"), new KeyValuePair("선택된 게임", "Selected Game"), new KeyValuePair("선택 완료", "Selection Complete"), new KeyValuePair("남은 선택 시간", "Selection Time Left"), new KeyValuePair("투표", "Vote"), new KeyValuePair("랜덤 선택", "Random Selection"), new KeyValuePair("후보", "Candidate"), new KeyValuePair("라운드 선택", "Round Selection"), new KeyValuePair("아무키나 눌러서 TIP을 종료합니다", "Press any key to close TIP"), new KeyValuePair("표시된 WASD 아무 키를 눌러라!", "Press the shown random WASD key!"), new KeyValuePair("리턴 표시까지 이동!", "Move to the return mark!"), new KeyValuePair("별까지 내려가기!", "Go down to the star!"), new KeyValuePair("목표와의 차이", "Difference from Target"), new KeyValuePair("투표자 : 없음", "Voters: None"), new KeyValuePair("번째 게임 / 7", " / 7 Game"), new KeyValuePair("다음 페이지", "Next Page"), new KeyValuePair("입력이 정지", "Input Locked"), new KeyValuePair("라운드 종료", " Round End"), new KeyValuePair("라운드 결과", " Round Result"), new KeyValuePair("가리는 중...", "Hiding..."), new KeyValuePair("클리어 시간", "Clear Time"), new KeyValuePair("W / A / S / D 중 아무 키나 누르면 1칸 전진", "Next direction: "), new KeyValuePair("남은 시간 ", "Time Left "), new KeyValuePair("목표 시간 ", "Target Time "), new KeyValuePair("전 페이지", "Previous Page"), new KeyValuePair("도착 순서", "Finish Order"), new KeyValuePair("제한 시간", "Time Limit"), new KeyValuePair("과일 그림", "Fruit Picture"), new KeyValuePair("같은 그림", "Same Picture"), new KeyValuePair("남은 시간", "Time Left"), new KeyValuePair("목표 시간", "Target Time"), new KeyValuePair("성공 현황", "Success Count"), new KeyValuePair("게임준비", "Game Ready"), new KeyValuePair("생존시간", "Survival Time"), new KeyValuePair("성공횟수", "Successes"), new KeyValuePair("바깥쪽부터 구름균류가 사라집니다", "Cloud Mushrooms disappear from the outside first"), new KeyValuePair("밟은 구름균류가 사라집니다", "Cloud Mushrooms disappear when stepped on"), new KeyValuePair("바깥쪽 구름균류 붕괴까지", "Outer Cloud Mushroom collapse starts in"), new KeyValuePair("발판 사라짐 시작까지", "Tile collapse starts in"), new KeyValuePair("구름균류", "Cloud Mushroom"), new KeyValuePair("선반균류", "Shelf Mushroom"), new KeyValuePair("깃발까지", "to the flag"), new KeyValuePair("투표자 : ", "Voters: "), new KeyValuePair("파인애플", "Pineapple"), new KeyValuePair("블루베리", "Blueberry"), new KeyValuePair("WASD 이동", "WASD Move"), new KeyValuePair("정답 색", "Target Color"), new KeyValuePair("초 차이", " sec diff"), new KeyValuePair("라운드", "Round"), new KeyValuePair("Space 키", "Space key"), new KeyValuePair("정확도", "Accuracy"), new KeyValuePair("선착순", "Finish Order"), new KeyValuePair("별갯수", "Stars"), new KeyValuePair("미완료", "Incomplete"), new KeyValuePair("패널티", "Penalty"), new KeyValuePair("페널티", "Penalty"), new KeyValuePair("장애물", "Obstacle"), new KeyValuePair("바나나", "Banana"), new KeyValuePair("토마토", "Tomato"), new KeyValuePair("입력: ", "Input: "), new KeyValuePair("차이: ", "Diff: "), new KeyValuePair("선택 ", "Selected "), new KeyValuePair("목표 ", "Target "), new KeyValuePair("목표", "Target"), new KeyValuePair("게임", "Game"), new KeyValuePair("기본", "Base"), new KeyValuePair("충돌", "Collision"), new KeyValuePair("회당", "each"), new KeyValuePair("상대", "Opponent"), new KeyValuePair("추락", "Fall"), new KeyValuePair("위치", "Position"), new KeyValuePair("기억", "Memory"), new KeyValuePair("정지", "Locked"), new KeyValuePair("성공", "Success"), new KeyValuePair("실패", "Fail"), new KeyValuePair("완료", "Complete"), new KeyValuePair("도착", "Finish"), new KeyValuePair("준비", "Ready"), new KeyValuePair("시작", "Start"), new KeyValuePair("점수", "Score"), new KeyValuePair("선택", "Select"), new KeyValuePair("딸기", "Strawberry"), new KeyValuePair("사과", "Apple"), new KeyValuePair("포도", "Grape"), new KeyValuePair("레몬", "Lemon"), new KeyValuePair("체리", "Cherry"), new KeyValuePair("키위", "Kiwi"), new KeyValuePair("초록", "Green"), new KeyValuePair("노랑", "Yellow"), new KeyValuePair("주황", "Orange"), new KeyValuePair("보라", "Purple"), new KeyValuePair("키: ", "Key: "), new KeyValuePair("키", "Key"), new KeyValuePair("초", " sec"), new KeyValuePair("등", "th"), new KeyValuePair("명", " players"), new KeyValuePair("개", "") }; private const float FixedArenaStartZ = -330f; private const float FixedArenaEndZ = -290f; private const byte FinalWinnersEventCode = 100; private const byte TimingRoundStartEventCode = 101; private const byte TimingRoundSubmitEventCode = 102; private const byte ArrowRoundStartEventCode = 103; private const byte ArrowRoundSubmitEventCode = 104; private const byte UiRoundStartEventCode = 105; private const byte UiRoundEndEventCode = 106; private const byte ScoreSyncEventCode = 107; private const byte MatchResetEventCode = 108; private const byte UiCenterNoticeEventCode = 109; private const byte RhythmRoundStartEventCode = 110; private const byte RhythmRoundSubmitEventCode = 111; private const byte TileWarningTintEventCode = 112; private const byte ForceNightEventCode = 113; private const byte CloudDisappearSoundEventCode = 114; private const byte TileSolidColorEventCode = 115; private const byte TileLowerEventCode = 116; private const byte TileResetEventCode = 117; private const byte Round6AnswerGaugeEventCode = 118; private const byte Round7ButtonMashStartEventCode = 119; private const byte Round7ButtonMashProgressEventCode = 120; private const byte Round7ButtonMashSubmitEventCode = 121; private const byte FlareStartRequestEventCode = 122; private const byte Round8StarGridStateEventCode = 123; private const byte Round8StarGridMoveRequestEventCode = 124; private const byte Round9MemoryStartEventCode = 125; private const byte Round9MemorySubmitEventCode = 126; private const byte Round10HalliGalliStateEventCode = 127; private const byte Round10HalliGalliBellEventCode = 128; private const byte FinalScoreboardEventCode = 129; private const byte Round6PersonalResultNoticeEventCode = 130; private const byte RoundIntroDescriptionEventCode = 131; private const byte Round9FinishListEventCode = 132; private const byte RhythmRoundProgressEventCode = 133; private const byte Round11DinoStartEventCode = 134; private const byte Round11DinoSubmitEventCode = 135; private const byte RoundVoteStartEventCode = 136; private const byte RoundVoteSubmitEventCode = 137; private const byte FlareReadyStartEventCode = 138; private const byte FlareReadySubmitEventCode = 139; private const byte FlareReadyEndEventCode = 140; private const byte ForceClearAllInventoriesEventCode = 141; internal static Plugin Instance; internal static bool FastBlockThirdPersonVInput; private Harmony harmony; private float lastFlareStartRequestTime = -999f; private ConfigEntry enableMod; private ConfigEntry gameStart; private ConfigEntry round1Start; private ConfigEntry round2Start; private ConfigEntry round3Start; private ConfigEntry round4Start; private ConfigEntry round5Start; private ConfigEntry round6Start; private ConfigEntry round7Start; private ConfigEntry round8Start; private ConfigEntry round9Start; private ConfigEntry round10Start; private ConfigEntry round11Start; private ConfigEntry hostOnly; private ConfigEntry forceNightOnGameStart; private ConfigEntry forcedNightTimeOfDay; private ConfigEntry roundEndFrontCameraEnabled; private ConfigEntry roundEndFrontCameraDuration; private ConfigEntry roundEndFrontCameraDistance; private ConfigEntry roundEndFrontCameraHeightOffset; private ConfigEntry roundEndFrontCameraLookAtHeight; private ConfigEntry roundEndFrontCameraSideOffset; private ConfigEntry roundEndFrontCameraSmoothSpeed; private ConfigEntry roundEndFrontCameraCollisionCheck; private ConfigEntry roundEndFrontCameraCollisionRadius; private ConfigEntry roundEndFrontCameraUseCustomFov; private ConfigEntry roundEndFrontCameraFov; private ConfigEntry forceThirdPersonDuringGame; private ConfigEntry thirdPersonCameraDistance; private ConfigEntry thirdPersonCameraHeightOffset; private ConfigEntry thirdPersonCameraLookAtHeight; private ConfigEntry thirdPersonCameraSideOffset; private ConfigEntry thirdPersonCameraSmoothSpeed; private ConfigEntry thirdPersonCameraCollisionCheck; private ConfigEntry thirdPersonCameraCollisionRadius; private ConfigEntry thirdPersonCameraUseCustomFov; private ConfigEntry thirdPersonCameraFov; private ConfigEntry roundDurationPoints; private ConfigEntry totalMainRounds; private ConfigEntry showScoreboardOnTab; private ConfigEntry winnerScoreValue; private ConfigEntry maxRoundScore; private ConfigEntry standardSurvivalRoundSeconds; private ConfigEntry timingTargetMinSeconds; private ConfigEntry timingTargetMaxSeconds; private ConfigEntry timingStopwatchVisibleSeconds; private ConfigEntry timingSubmitWindowExtraSeconds; private ConfigEntry timingTickSoundEnabled; private ConfigEntry timingTickSoundVolume; private ConfigEntry timingBgmEnabled; private ConfigEntry timingBgmVolume; private ConfigEntry arrowSequenceLength; private ConfigEntry arrowRoundTimeLimit; private ConfigEntry arrowInputSoundVolume; private ConfigEntry rhythmRoundTimeLimit; private ConfigEntry rhythmNoteTravelSeconds; private ConfigEntry rhythmNoteInterval; private ConfigEntry rhythmHitWindow; private ConfigEntry round6AnswerWindowSeconds; private ConfigEntry round7TargetPresses; private ConfigEntry round7TimeLimitSeconds; private ConfigEntry round8TotalStars; private ConfigEntry round11ObstacleTravelSeconds; private ConfigEntry round11JumpDurationSeconds; private ConfigEntry directPrefabMode; private ConfigEntry arenaStartX; private ConfigEntry arenaEndX; private ConfigEntry arenaY; private ConfigEntry round4UpperArenaY; private ConfigEntry arenaStartZ; private ConfigEntry arenaEndZ; private ConfigEntry cloudRoundSpacing; private ConfigEntry shelfRoundSpacing; private ConfigEntry bounceRoundSpacing; private ConfigEntry maxSpawnPerSecond; private ConfigEntry clearOldBeforeSpawn; private ConfigEntry randomRotation; private ConfigEntry freezeSpawnedObjects; private ConfigEntry cloudItemPrefabPath; private ConfigEntry shelfItemPrefabPath; private ConfigEntry bounceItemPrefabPath; private ConfigEntry cloudInstalledPrefabPath; private ConfigEntry shelfInstalledPrefabPath; private ConfigEntry bounceInstalledPrefabPath; private ConfigEntry dynamiteItemPath; private ConfigEntry rescueHookItemPaths; private ConfigEntry frisbeeItemPath; private ConfigEntry coconutItemPath; private ConfigEntry poppycornItemPaths; private ConfigEntry rescueHookMaintainInterval; private ConfigEntry thrownFrisbeeDeleteSeconds; private ConfigEntry dynamiteMissingDelay; private ConfigEntry dynamiteCheckInterval; private ConfigEntry dynamiteExplosionRadius; private float nextDynamiteExplosionPatchTime = -999f; private ConfigEntry centerNoticeFontSize; private ConfigEntry centerNoticeTextY; private ConfigEntry roundEndNoticeDuration; private ConfigEntry beachReturnYOffset; private ConfigEntry enableStandingTileDelete; private ConfigEntry standingTileCheckInterval; private ConfigEntry round1EdgeCollapseStartDelay; private ConfigEntry round4StandingTileStartDelay; private ConfigEntry cloudStandingTileDeleteDelay; private ConfigEntry standingTileRayDistance; private ConfigEntry cloudDisappearSoundEnabled; private ConfigEntry cloudDisappearSoundVolume; private ConfigEntry coconutSpawnInterval; private ConfigEntry coconutSpawnYOffset; private ConfigEntry round5FallPenaltyPoints; private ConfigEntry round5FallResetCooldown; private ConfigEntry poppyDrowsyAmount; private ConfigEntry clearItemsOnRoundEnd; private ConfigEntry clearInventoryOnRoundEnd; private ConfigEntry clearDebuffsOnRoundEnd; private ConfigEntry fallEliminationY; private ConfigEntry playerTeleportYOffset; private ConfigEntry roundRestartDelay; private ConfigEntry clearExtraStaminaOnRoundEnd; private ConfigEntry effectCleanupDuration; private ConfigEntry resolverSpawnY; private ConfigEntry logResolvedPrefabNames; private ConfigEntry beachTreesEnabled; private ConfigEntry hardDeleteBeachObjects; private ConfigEntry beachObjectMinZ; private ConfigEntry beachObjectMaxZ; private ConfigEntry beachObjectNameKeywords; private bool lastGameStartValue; private bool suppressGameStartToggleEvents; private bool lastRound1StartValue; private bool lastRound2StartValue; private bool lastRound3StartValue; private bool lastRound4StartValue; private bool lastRound5StartValue; private bool lastRound6StartValue; private bool lastRound7StartValue; private bool lastRound8StartValue; private bool lastRound9StartValue; private bool lastRound10StartValue; private bool lastRound11StartValue; private bool lastBeachTreesEnabledValue; private GameState gameState = GameState.Idle; private bool roundFinishInProgress = false; private int roundLifecycleNonce = 0; private int activeRoundLifecycleNonce = 0; private bool roundEndPresentationComplete = true; private Coroutine finishRoundRoutineHandle = null; private const float RoundStartFinishGuardSeconds = 2f; private const float AutoFinishMinimumSeconds = 5f; private bool roundStartFinishGuardActive = false; private float roundStartFinishGuardUntil = -999f; private float currentRoundHardTimeoutAt = -1f; private float roundEndStartedAt = -1f; private readonly HashSet actorsNeedingReviveAtRoundEnd = new HashSet(); private RoundGameType currentRoundType = RoundGameType.CloudDynamite; private RoundGameType activeSingleRoundTestType = RoundGameType.CloudDynamite; private bool singleRoundTestRunning; private bool suppressRoundStartToggleEvents; private int currentRoundIndex = 0; private int mainRoundPlayedCount = 0; private bool currentRoundIsTestMode; private const float Round6MoveSpeedBoostAmount = 0.3f; private bool round6LocalSpeedBoostApplied; private Character round6LocalSpeedBoostCharacter; private Coroutine mainGameRoutine; private Coroutine dynamiteRoutine; private Coroutine hookMaintainRoutine; private Coroutine frisbeeRoutine; private Coroutine standingTileDeleteRoutine; private Coroutine coconutSpawnRoutine; private Coroutine round5ScoreRoutine; private Coroutine round5FallResetRoutine; private Coroutine round5PoppyTransferRoutine; private readonly Dictionary dynamiteDelayRoutines = new Dictionary(); private readonly List roundPlayers = new List(); private readonly List alivePlayers = new List(); private readonly List eliminatedPlayers = new List(); private readonly List spawnedArenaObjects = new List(); private readonly List roundResultPodiumObjects = new List(); private readonly List podiumTeleportTestObjects = new List(); private bool podiumTestCameraOnlyMode; private float podiumTestCameraOnlyUntil = -999f; private float podiumTestCameraDebugNextLogTime = -999f; private int podiumTestCameraDebugPoseCalls; private int podiumTestCameraDebugCharacterCamPrefixCalls; private int podiumTestCameraDebugCharacterCamBlockedCalls; private int podiumTestCameraDebugUpdateTicks; private int podiumTestCameraDebugPreCullSkipped; private float podiumTestCameraDebugLastCharacterCamPrefixTime = -999f; private int podiumTestCameraDebugLateFallbackCalls; private Vector3 podiumTestCameraDebugLastAppliedPos = Vector3.zero; private Quaternion podiumTestCameraDebugLastAppliedRot = Quaternion.identity; private int podiumTestCameraMethod = 0; private Camera podiumTestDedicatedCamera; private GameObject podiumTestDedicatedCameraObject; private int podiumTestCameraDebugDedicatedTicks; private int podiumTestCameraDebugPreCullApplyCalls; private float nextPodiumTeleportTestAllowedTime = -999f; private bool pureOriginalPodiumTeleportTestActive; private float pureOriginalPodiumTeleportTestUntil = -999f; private Vector3 pureOriginalPodiumTeleportTestTarget = Vector3.zero; private int pureOriginalPodiumTeleportTestActor = -999; private readonly HashSet assistedPodiumTeleportTestActors = new HashSet(); private readonly List disabledBeachObjects = new List(); private readonly List activeTiles = new List(); private readonly HashSet pendingStandingTileDeletes = new HashSet(); private readonly Dictionary activeCloudWarningTintRoutines = new Dictionary(); private readonly Dictionary savedBeachStartPositions = new Dictionary(); private readonly List currentRoundOrder = new List(); private readonly List votedPlayedRounds = new List(); private readonly Dictionary roundVoteByActor = new Dictionary(); private RoundGameType[] roundVoteOptions = new RoundGameType[3]; private bool roundVoteActive; private float roundVoteEndTime; private int roundVoteLocalChoice = -1; private int roundVoteLocalHoverChoice = 1; private int roundVoteSequence; private GUIStyle roundVoteTitleStyle; private GUIStyle roundVoteOptionStyle; private GUIStyle roundVoteSmallStyle; private GUIStyle roundVotePlayerStyle; private GUIStyle roundVoteCornerStyle; private AudioSource roundVoteAudioSource; private AudioClip roundVoteSelectClip; private bool flareReadyActive; private int flareReadySequence; private bool flareReadyLocalConfirmed; private float flareReadyStartedAt; private Coroutine flareReadyRoutine; private readonly Dictionary flareReadyByActor = new Dictionary(); private readonly List flareReadyActorOrder = new List(); private readonly Dictionary flareReadyActorNames = new Dictionary(); private GUIStyle flareReadyTitleStyle; private GUIStyle flareReadyLineStyle; private GUIStyle flareReadyHintStyle; private float flareReadyThirdPersonLockUntil = -999f; private bool localMovementLockAnchored; private int localMovementLockRoundIndex = -999; private RoundGameType localMovementLockRoundType = RoundGameType.CloudDynamite; private Vector3 localMovementLockPosition; private readonly Dictionary totalScores = new Dictionary(); private readonly Dictionary currentRoundScores = new Dictionary(); private readonly HashSet currentRoundScoreLocked = new HashSet(); private readonly Dictionary actorNames = new Dictionary(); private readonly Dictionary lastRound5FallPenaltyTime = new Dictionary(); private readonly Dictionary lastDrowsyStatus = new Dictionary(); private string cachedCloudInstalledPath; private string cachedShelfInstalledPath; private string cachedBounceInstalledPath; private Item cachedDynamitePrefabItem; private Item cachedRescueHookPrefabItem; private Item cachedFrisbeePrefabItem; private Item cachedPoppycornPrefabItem; private Character round5CursedCharacter; private bool round5CurseActive; private string centerNoticeText = ""; private float centerNoticeUntil = 0f; private float centerNoticeStartTime = 0f; private float centerNoticeDuration = 0f; private GUIStyle centerNoticeStyle; private Font roundEndNoticeFont; private Color centerNoticeColor = Color.white; private bool centerNoticeThickRounded; private bool centerNoticeRoundEndStyle; private GUIStyle leftPointStyle; private GUIStyle scoreBoardStyle; private GUIStyle scoreBoardTitleStyle; private float autoScoreboardUntil = -1f; private bool roundResultPanelActive; private float roundResultPanelUntil = -1f; private string roundResultPanelTitle = ""; private List roundResultPanelForcedLines = null; private string roundResultPanelForcedTitle = ""; private GUIStyle roundResultTitleStyle; private GUIStyle roundResultLineStyle; private GUIStyle dynamiteChargeTextStyle; private GUIStyle tileDeleteTimerStyle; private GUIStyle minigameTitleStyle; private GUIStyle minigameMainStyle; private GUIStyle minigameSmallStyle; private string roundIntroTitleText = ""; private string roundIntroBodyText = ""; private string roundIntroFooterText = ""; private float roundIntroUntil = -1f; private GUIStyle roundIntroTitleStyle; private GUIStyle roundIntroBodyStyle; private GUIStyle roundIntroFooterStyle; private Texture2D arrowTextureRight; private Texture2D arrowTextureLeft; private Texture2D arrowTextureUp; private Texture2D arrowTextureDown; private Texture2D arrowBoxTexture; private Texture2D rhythmSlotTexture; private Texture2D rhythmNoteTexture; private Texture2D rhythmHitTexture; private bool firstRoundStartedAfterMapLoad; private bool showDynamiteChargeBar; private bool localDynamiteChargeActive; private float dynamiteChargeStartTime; private float dynamiteChargeDuration = 3f; private float currentRoundRunningStartTime; private bool standingTileDeleteStarted; private bool finalEndingTriggered; private bool finalScoreboardActive; private float finalScoreboardUntil; private GUIStyle finalScoreboardTitleStyle; private GUIStyle finalScoreboardLineStyle; private Coroutine roundEndEmoteRoutine; private float roundBetweenMovementLockUntil = -1f; private bool roundStartTeleportWindow; private bool roundEndTeleportWindow; private bool round6FallRescueTeleportWindow; private readonly Dictionary round6FallRescueCooldownUntilByActor = new Dictionary(); private float lastBlockedUnexpectedTeleportLogTime = -999f; private float roundEndFrontCameraUntil = -1f; private bool roundEndFrontCameraActive; private float roundEndFrontCameraOriginalFov = -1f; private bool roundEndFrontCameraHasOriginalFov; private Transform roundEndFrontCameraTransformCache; private Camera roundEndFrontCameraCameraCache; private bool roundEndCameraSmoothInitialized; private Vector3 roundEndCameraSmoothPosition; private Quaternion roundEndCameraSmoothRotation = Quaternion.identity; private Vector3 roundEndCameraSmoothLookTarget; private float roundEndCameraLastSmoothTime = -1f; private float roundEndCameraPerfNextLogTime = -1f; private int roundEndCameraPerfFrameCount; private int roundEndCameraPerfPoseCalls; private int roundEndCameraPerfPreCullCalls; private int roundEndCameraPerfCharacterCamBlocks; private int roundEndCameraPerfThirdPersonSuppressCalls; private double roundEndCameraPerfPoseMsTotal; private double roundEndCameraPerfInputMsTotal; private float roundEndCameraNextThirdPersonOffAttempt = -1f; private bool roundEndCameraThirdPersonOffAppliedOnce; private bool forcedThirdPersonCameraActive; private float forcedThirdPersonOriginalFov = -1f; private bool forcedThirdPersonHasOriginalFov; private Transform forcedThirdPersonCameraTransformCache; private Camera forcedThirdPersonCameraCameraCache; private Type thirdPersonTogglePluginType; private FieldInfo thirdPersonToggleEnabledField; private FieldInfo thirdPersonToggleKeyField; private FieldInfo thirdPersonToggleZoomSpeedField; private FieldInfo thirdPersonToggleLerpRateField; private FieldInfo thirdPersonToggleMinDistanceField; private FieldInfo thirdPersonToggleDefaultDistanceField; private FieldInfo thirdPersonToggleCurrentDistanceField; private FieldInfo thirdPersonToggleMaxDistanceField; private object thirdPersonTogglePluginInstance; private object thirdPersonToggleOriginalKey; private bool thirdPersonToggleHasOriginalKey; private object thirdPersonToggleOriginalZoomSpeed; private object thirdPersonToggleOriginalMinDistance; private object thirdPersonToggleOriginalDefaultDistance; private object thirdPersonToggleOriginalCurrentDistance; private object thirdPersonToggleOriginalMaxDistance; private bool thirdPersonToggleHasOriginalDistanceValues; private float nextThirdPersonToggleLookupTime; private bool thirdPersonToggleManagedActive; private bool thirdPersonToggleWasAlreadyOnBeforePartyGames; private bool roundEndCameraDisabledThirdPersonToggle; private bool roundEndCameraThirdPersonWasOn; private float lastScoreSyncTime; private float lastIslandMapCacheTime = -999f; private bool cachedIsInIslandMap; private const float IslandMapCacheSeconds = 0.35f; private bool islandEntryCleanupActive; private float islandEntryCleanupUntil = -1f; private float nextIslandEntryCleanupTime = -1f; private float nextIslandDamageCleanupTime = -1f; private bool wasInIslandMapForEntryCleanup; private const float IslandEntryCleanupDuration = 8f; private const float IslandEntryCleanupInterval = 0.5f; private const float IslandInvincibilityDuration = 999999f; private float lastRoundProgressCheckTime = -999f; private const float RoundProgressCheckInterval = 0.1f; private float lastLocalDynamiteUiCheckTime = -999f; private bool cachedLocalHasDynamite; private bool timingRoundActive; private float timingRoundTargetSeconds; private float timingRoundStartLocalTime; private bool timingLocalSubmitted; private float timingLocalPressedSeconds = -1f; private readonly Dictionary timingRoundSubmissions = new Dictionary(); private AudioClip timingTickClip; private AudioSource timingAudioSource; private AudioSource timingBgmAudioSource; private AudioClip timingBgmClip; private int timingLastTickSecond = -1; private bool arrowRoundActive; private string arrowRoundSequence = ""; private float arrowRoundStartLocalTime; private int arrowLocalInputIndex; private bool arrowLocalSubmitted; private const int Round3GridWidth = 7; private const int Round3GridHeight = 11; private const float Round3GridCountdownSeconds = 3.25f; private static readonly string[] Round3GridDefaultMazeRowsTopToBottom = new string[11] { "xxxrxxx", "ooooooo", "oxxxxxx", "ooooooo", "xxxxxox", "ooooooo", "xoxxxxx", "ooooooo", "xxxxxxo", "ooooooo", "xxxsxxx" }; private string[] round3GridMazeRowsTopToBottom = new string[11] { "xxxrxxx", "ooooooo", "oxxxxxx", "ooooooo", "xxxxxox", "ooooooo", "xoxxxxx", "ooooooo", "xxxxxxo", "ooooooo", "xxxsxxx" }; private const string Round3GridOpenEmoji = ""; private const string Round3GridBlockedEmoji = "⬛"; private const string Round3GridPlayerEmoji = "\ud83d\udc64"; private const string Round3GridStarEmoji = "⭐"; private const string Round3GridReturnEmoji = "\ud83d\udd03"; private int round3GridPhase = 1; private float round3GridReturnTime = -1f; private string[] round3GridSecondMazeRowsTopToBottom = null; private bool round3GridSecondMazeReceivedFromHost = false; private float round3GridLocalFinishTime = -1f; private float round3GridLocalClearPopupUntil = -1f; private AudioClip round3BlockedClip; private int round3GridLocalX; private int round3GridLocalY; private int round3GridStartX = 3; private int round3GridStartY = 0; private int round3GridStarX = 3; private int round3GridStarY = 10; private readonly Dictionary arrowRoundSubmissions = new Dictionary(); private AudioClip arrowCorrectClip; private AudioClip arrowWrongClip; private AudioSource arrowInputAudioSource; private AudioClip cloudDisappearClip; private AudioSource cloudDisappearAudioSource; private bool rhythmRoundActive; private const int RhythmNoteCount = 30; private readonly KeyCode[] rhythmKeys; private string rhythmSequence; private float[] rhythmNoteTargetOffsets; private float rhythmRoundStartLocalTime; private int rhythmLocalInputIndex; private int rhythmLocalHitCount; private bool rhythmLocalSubmitted; private readonly Dictionary rhythmRoundSubmissions; private readonly Dictionary rhythmRoundProgressByActor; private bool rhythmCenterResultPanelActive; private float rhythmCenterResultPanelUntil; private readonly float[] rhythmSlotPopUntil; private readonly bool[] rhythmNoteJudged; private readonly bool[] rhythmNoteHit; private AudioClip rhythmHitClip; private AudioClip rhythmFailClip; private AudioSource rhythmAudioSource; private AudioClip round8MoveClip; private AudioClip round8StarClip; private AudioSource round8AudioSource; private AudioClip round10CardFlipClip; private AudioClip round10SuccessClip; private AudioSource round10AudioSource; private AudioSource round11DinoAudioSource; private AudioClip round11DinoBoingClip; private readonly Dictionary round6TileColors; private readonly Dictionary activeTileLowerRoutines; private readonly Dictionary round6OriginalPositions; private readonly Dictionary round6OriginalRendererMaterials; private const float Round6LowerDuration = 1f; private const float Round6RestoreDuration = 1f; private const int Round6RepeatCount = 4; private const float Round6StayLoweredSeconds = 3f; private const int Round6ScorePerCycle = 5; private bool round6AnswerGaugeActive; private float round6AnswerGaugeStartTime; private float round6AnswerGaugeEndTime; private Round6CloudColor round6AnswerGaugeColor; private bool round7ButtonMashActive; private float round7StartLocalTime; private int round7LocalProgress; private bool round7LocalSubmitted; private KeyCode round7CurrentKey; private KeyCode[] round7LocalRandomKeySequence; private readonly Dictionary round7ProgressByActor; private readonly Dictionary round7FinishTimes; private readonly Dictionary round7RankByActor; private GUIStyle round7NameStyle; private GUIStyle round7TrackStyle; private GUIStyle round7RankStyle; private Texture2D round7RunnerTexture; private const int Round8GridSize = 7; private bool round8StarGridActive; private int round8StarsEatenTotal; private Vector2Int round8StarCell; private readonly Vector2Int[] round8ElectricCells; private readonly Dictionary round8PositionsByActor; private readonly Dictionary round8StarsByActor; private readonly Dictionary round8ParalyzedUntilByActor; private GUIStyle round8TitleStyle; private GUIStyle round8CellStyle; private GUIStyle round8NameStyle; private GUIStyle round8StarStyle; private GUIStyle round8ElectricStyle; private Texture2D round8AvatarTexture; private bool round9MemoryActive; private bool round9MemoryInputEnabled; private bool round9MemorySubmitted; private float round9MemoryShowAllUntil; private float round9MemoryInputStartTime; private float round9WrongRevealUntil; private int round9SelectedIndex; private int round9ProgressIndex; private int round9FirstPickIndex; private int round9TempRevealIndex; private int round9CurrentTurnOrderIndex; private readonly int[] round9BoardNumbers; private readonly bool[] round9Revealed; private readonly List round9TurnOrder; private readonly Dictionary round9PairScores; private readonly Dictionary round9FinishTimes; private Coroutine round9WrongRevealRoutine; private GUIStyle round9TitleStyle; private GUIStyle round9CellStyle; private GUIStyle round9SmallStyle; private bool round10HalliActive; private bool round10BellLocked; private float round10NextDrawTime; private int round10SuccessCount; private bool round10Completed; private int round10NextSlotIndex; private readonly int[] round10CardFruit; private readonly int[] round10CardCount; private readonly List round10Deck; private readonly Dictionary round10ScoresByActor; private readonly Dictionary round10BellPenaltyUntilByActor; private GUIStyle round10TitleStyle; private GUIStyle round10CardStyle; private GUIStyle round10SmallStyle; private GUIStyle round10FruitStyle; private const int Round11DinoObstacleCount = 40; private const float Round11DinoObstacleStartDelay = 3f; private bool round11DinoActive; private bool round11DinoExternalResetGuard; private float round11DinoExternalResetGuardUntil; private bool round11DinoAllowLocalEnd; private bool round11DinoManualResetInProgress; private bool round11DinoSubmitted; private bool round11DinoFailed; private float round11DinoStartTime; private float round11DinoJumpStartTime; private float round11DinoLastSpaceHeldJumpTime; private bool round11DinoSpaceWasDown; private int round11DinoPassedCount; private int round11DinoNextPassIndex; private float[] round11DinoObstacleTimes; private int[] round11DinoObstacleTypes; private bool round11DinoFailFreezeActive; private float round11DinoFailFreezeEndTime; private float round11DinoFailFreezeRawElapsed; private float round11DinoFailFreezeJumpY; private bool round11DinoClearFreezeActive; private float round11DinoClearFreezeEndTime; private float round11DinoClearFreezeRawElapsed; private float round11DinoClearFreezeJumpY; private float round11DinoGlobalEndAllowedTime; private int round11DinoNonce; private float round11DebugNextLogTime; private float round11DebugNextGuiLogTime; private readonly Dictionary round11DinoPassedByActor; private readonly Dictionary round11DinoFailedByActor; private readonly Dictionary round11DinoPenaltyByActor; private string languageSwitchNoticeText; private float languageSwitchNoticeUntil; private GUIStyle languageSwitchNoticeStyle; private bool tipGuideVisible; private int tipGuidePage; private float tipGuideInputIgnoreUntil; private GUIStyle tipGuideTitleStyle; private GUIStyle tipGuideBodyStyle; private GUIStyle tipGuideFooterStyle; private readonly Dictionary round11DinoScoreByActor; private readonly HashSet round11DinoFinalSubmittedActors; private int round11DinoPenaltyPoints; private float round11DinoPenaltyNoticeUntil; private float round11DinoPenaltyNoticeStartTime; private GUIStyle round11TitleStyle; private GUIStyle round11DinoStyle; private GUIStyle round11SmallStyle; private static readonly string Round7RunnerPngBase64 = "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAQAAABpN6lAAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAACYktHRAD/h4/MvwAAAAd0SU1FB+oFARQtF7OBrtUAAAJlSURBVHja7ZrRdoQgDESlp///y/SJo652iZrJBJz70nbdItyghuCyCCGEEEIIIYQQQoh3UdgdOFBj+5ZJQD39FNzDPALql2PAXuYQ8N+0D7gcMghowyw3jk4gwDLAiuvrD3v8huG3o9XS0GgCgLEdQ4AV2BzgCqDHny3gCiBN4wgAMZoA97vAaALcGU2A+51gNAHujCMAkgeyBQBT3DEE2IGlTGwB9DnAFtCohqOQXJBfD3h9QWQ7yJeWxPZDDe5lDgGkijBXwHHQ5ePIdBsjvYcdJRj4k/aHHbwZtuc3/pRJ7jtBnemnMO0bpPpglkyw0btgqnfajBVgj78t9tOVxff0FkaQiwQp4Er8ra25k2kGfJsDsOQIJ8Aa3XLyVz1ta7qCiHVSQ1NjlIB78V8/qYZvphbQp//E3/6EJUgYAc86vf0/eH6Iarp2Wu4NbDs/oOkx6hLw6zR4dcB8CpSbxyYQYHkAlhgRjHqAlelKYo0Ebwat5FoLvEhAkvgzBFA3wzMISEb0VKSWwHMJSCIhtgv7EngKCRwB6+90CfF7g8fFLlUCV8CnBIKGuBN+T4BpcyFLHlA2ww5NlaJsWxdAoS9HLEueGdCYdHf46gI4UEO2GRC+VIoQkDj+2WYAYamMF5A6/uii6LWIUkolKAF3E9zwx6C3gPu7uqRSmZ+AsA1tXzw66TF02l7B0xmQrsR1lWdd9ipxEveKPO4BA8Z9JUMmSN0rfC5g6PhnmAHkveInApLt8sUL8MT9NfhxBJCKocfT36H3MtyVljz6MzhT3FOEEEIIIYQQQgghhBBCCCGEECIlf0MraZnWWTO+AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTA1LTAxVDIwOjQ0OjM0KzAwOjAwzBMU/AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wNS0wMVQyMDo0NDozNCswMDowML1OrEAAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDUtMDFUMjA6NDU6MjMrMDA6MDAMlNixAAAAAElFTkSuQmCC"; private const float Round11DinoFixedJumpDuration = 0.62f; private const float Round11DinoFixedJumpHeight = 82f; private static readonly string[] WarningColorProperties = new string[19] { "_Tint", "_Color", "_BaseColor", "_TintColor", "_MainColor", "_MainTexColor", "_BaseMapColor", "_Albedo", "_TopColor", "_BottomColor", "_EmissionColor", "_EmissiveColor", "_FresnelColor", "_RimColor", "_OutlineColor", "_HighlightColor", "_First_ShadeColor", "_Second_ShadeColor", "_ShadowColor" }; private static readonly Vector3[] RoundResultPodiumSpawnPositions = (Vector3[])(object)new Vector3[4] { new Vector3(25f, 30f, -370f), new Vector3(30f, 32f, -370f), new Vector3(35f, 34f, -370f), new Vector3(40f, 36f, -370f) }; private static readonly Vector3[] RoundResultPodiumTeleportPositionsByRank = (Vector3[])(object)new Vector3[4] { new Vector3(40f, 38.5f, -370f), new Vector3(35f, 36.5f, -370f), new Vector3(30f, 34.5f, -370f), new Vector3(25f, 32.5f, -370f) }; private void Awake() { //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Expected O, but got Unknown //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Expected O, but got Unknown //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Expected O, but got Unknown //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Expected O, but got Unknown //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Expected O, but got Unknown //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Expected O, but got Unknown //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Expected O, but got Unknown //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04db: Expected O, but got Unknown //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Expected O, but got Unknown //IL_0563: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Expected O, but got Unknown //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Expected O, but got Unknown //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Expected O, but got Unknown //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0627: Expected O, but got Unknown //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Expected O, but got Unknown //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Expected O, but got Unknown //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Expected O, but got Unknown //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Expected O, but got Unknown //IL_0753: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Expected O, but got Unknown //IL_0791: Unknown result type (might be due to invalid IL or missing references) //IL_079b: Expected O, but got Unknown //IL_07c5: Unknown result type (might be due to invalid IL or missing references) //IL_07cf: Expected O, but got Unknown //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Expected O, but got Unknown //IL_0837: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Expected O, but got Unknown //IL_0c9a: Unknown result type (might be due to invalid IL or missing references) //IL_0ca4: Expected O, but got Unknown //IL_0d22: Unknown result type (might be due to invalid IL or missing references) //IL_0d2c: Expected O, but got Unknown //IL_0d81: Unknown result type (might be due to invalid IL or missing references) //IL_0d8b: Expected O, but got Unknown //IL_0dbf: Unknown result type (might be due to invalid IL or missing references) //IL_0dc9: Expected O, but got Unknown //IL_0dfd: Unknown result type (might be due to invalid IL or missing references) //IL_0e07: Expected O, but got Unknown //IL_0e3b: Unknown result type (might be due to invalid IL or missing references) //IL_0e45: Expected O, but got Unknown //IL_0e79: Unknown result type (might be due to invalid IL or missing references) //IL_0e83: Expected O, but got Unknown //IL_0eb7: Unknown result type (might be due to invalid IL or missing references) //IL_0ec1: Expected O, but got Unknown //IL_0f16: Unknown result type (might be due to invalid IL or missing references) //IL_0f20: Expected O, but got Unknown //IL_0f75: Unknown result type (might be due to invalid IL or missing references) //IL_0f7f: Expected O, but got Unknown //IL_0fd4: Unknown result type (might be due to invalid IL or missing references) //IL_0fde: Expected O, but got Unknown //IL_1012: Unknown result type (might be due to invalid IL or missing references) //IL_101c: Expected O, but got Unknown //IL_1050: Unknown result type (might be due to invalid IL or missing references) //IL_105a: Expected O, but got Unknown //IL_108e: Unknown result type (might be due to invalid IL or missing references) //IL_1098: Expected O, but got Unknown //IL_10cc: Unknown result type (might be due to invalid IL or missing references) //IL_10d6: Expected O, but got Unknown //IL_112b: Unknown result type (might be due to invalid IL or missing references) //IL_1135: Expected O, but got Unknown //IL_118a: Unknown result type (might be due to invalid IL or missing references) //IL_1194: Expected O, but got Unknown //IL_1233: Unknown result type (might be due to invalid IL or missing references) //IL_123d: Expected O, but got Unknown //IL_1271: Unknown result type (might be due to invalid IL or missing references) //IL_127b: Expected O, but got Unknown //IL_131a: Unknown result type (might be due to invalid IL or missing references) //IL_1324: Expected O, but got Unknown Instance = this; try { useEnglishUi = PlayerPrefs.GetInt("PEAKPartyGames.Language", 1) == 1; } catch { useEnglishUi = true; } enableMod = ((BaseUnityPlugin)this).Config.Bind("General", "Enable Mod", true, "모드 전체 ON/OFF"); hostOnly = ((BaseUnityPlugin)this).Config.Bind("General", "Host Only", false, "true면 호스트만 게임 진행/소환/삭제를 담당합니다."); gameStart = ((BaseUnityPlugin)this).Config.Bind("Game", "Game Start", false, "100sec 전체 9라운드를 시작합니다."); round1Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 1 Start", false, "1라운드 구름균류 + 다이너마이트 테스트 시작/중지"); round2Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 2 Start", false, "2라운드 선반균류 4모서리 + Space 타이밍 테스트 시작/중지"); round3Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 3 Start", false, "3라운드 7x11 격자 별 도착 테스트 시작/중지"); round4Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 4 Start", false, "4라운드 2층 구름균류 + 코코넛 테스트 시작/중지"); round5Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 5 Start", false, "5라운드 WASD 리듬게임 테스트 시작/중지"); round6Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 6 Start", false, "6라운드 색깔 구름균류 생존 테스트 시작/중지"); round7Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 7 Start", false, "7라운드 WASD 연타 달리기 테스트 시작/중지"); round8Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 8 Start", false, "8라운드 7x7 별 먹기 테스트 시작/중지"); round9Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 9 Start", false, "9라운드 4x4 과일 그림 6쌍 짝맞추기 테스트 시작/중지"); round10Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 10 Start", false, "10라운드 할리갈리 테스트 시작/중지"); round11Start = ((BaseUnityPlugin)this).Config.Bind("Game", "Round 11 Start", false, "애니멀 점프 테스트 시작/중지"); roundDurationPoints = ((BaseUnityPlugin)this).Config.Bind("100sec Rules", "Legacy Round Duration Points", 100, new ConfigDescription("이전 100초 점수제 호환용 값입니다. 새 규칙에서는 Standard Survival Round Seconds와 Max Round Score를 사용합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(10, 300), Array.Empty())); totalMainRounds = ((BaseUnityPlugin)this).Config.Bind("100sec Rules", "Total Main Rounds", 7, new ConfigDescription("랜덤 투표 모드에서 진행할 메인 라운드 수입니다. 기본 7.", (AcceptableValueBase)(object)new AcceptableValueRange(1, 7), Array.Empty())); maxRoundScore = ((BaseUnityPlugin)this).Config.Bind("100sec Rules", "Max Round Score", 20, new ConfigDescription("한 라운드에서 얻을 수 있는 최대 점수입니다. 기본 20.", (AcceptableValueBase)(object)new AcceptableValueRange(1, 100), Array.Empty())); winnerScoreValue = ((BaseUnityPlugin)this).Config.Bind("100sec Rules", "Last Survivor Score", 20, new ConfigDescription("생존형 라운드에서 마지막 1명이 되었을 때 받는 점수입니다. 기본 20.", (AcceptableValueBase)(object)new AcceptableValueRange(1, 100), Array.Empty())); standardSurvivalRoundSeconds = ((BaseUnityPlugin)this).Config.Bind("100sec Rules", "Standard Survival Round Seconds", 100f, new ConfigDescription("1/4/5 같은 생존형 라운드의 기본 제한 시간입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(10f, 300f), Array.Empty())); showScoreboardOnTab = ((BaseUnityPlugin)this).Config.Bind("100sec Rules", "Show Scoreboard On Tab", true, "Tab 키를 누르고 있는 동안 중앙에 총점표를 표시합니다."); forceNightOnGameStart = ((BaseUnityPlugin)this).Config.Bind("Visual", "Force Night On Game Start", true, "true면 미니게임 시작 시 섬 시간을 밤으로 맞춰 글자가 잘 보이게 합니다."); forcedNightTimeOfDay = ((BaseUnityPlugin)this).Config.Bind("Visual", "Forced Night Time Of Day", 22.5f, new ConfigDescription("미니게임 시작 시 맞출 시간입니다. 22.5는 밤 10시 30분 정도입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 24f), Array.Empty())); timingTargetMinSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Target Min Seconds", 5f, new ConfigDescription("2라운드 목표 시간이 랜덤으로 정해지는 최소 초입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 30f), Array.Empty())); timingTargetMaxSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Target Max Seconds", 15f, new ConfigDescription("2라운드 목표 시간이 랜덤으로 정해지는 최대 초입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 60f), Array.Empty())); timingStopwatchVisibleSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Stopwatch Visible Seconds", 3f, new ConfigDescription("2라운드에서 스톱워치를 몇 초까지 공개할지 정합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.5f, 10f), Array.Empty())); timingSubmitWindowExtraSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Submit Window Extra Seconds", 3f, new ConfigDescription("목표 시간 후 몇 초까지 Space 입력을 받을지 정합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.5f, 10f), Array.Empty())); timingTickSoundEnabled = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Tick Sound Enabled", true, "true면 2라운드 진행 중 초시계 똑딱 소리를 재생합니다."); timingTickSoundVolume = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Tick Sound Volume", 0.5f, new ConfigDescription("2라운드 초시계 똑딱 소리 볼륨입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); timingBgmEnabled = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Procedural Background Music Enabled", true, "true면 2라운드 동안 코드로 생성한 초시계 느낌 배경음을 재생합니다. 외부 사운드 파일이 필요 없습니다."); timingBgmVolume = ((BaseUnityPlugin)this).Config.Bind("Round 2 Timing", "Procedural Background Music Volume", 0.8f, new ConfigDescription("2라운드 코드 생성 배경음 볼륨입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); arrowSequenceLength = ((BaseUnityPlugin)this).Config.Bind("Round 3 Grid", "Legacy Arrow Sequence Length", 6, new ConfigDescription("호환용 값입니다. v5.18.7부터 3라운드는 지정 미로 맵 별 도착 게임을 사용합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(3, 12), Array.Empty())); arrowRoundTimeLimit = ((BaseUnityPlugin)this).Config.Bind("Round 3 Grid", "Grid Round Time Limit", 30f, new ConfigDescription("3라운드 7x11 격자 별 도착 제한 시간입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(5f, 120f), Array.Empty())); arrowInputSoundVolume = ((BaseUnityPlugin)this).Config.Bind("Round 3 Grid", "Input Sound Volume", 0.75f, new ConfigDescription("3라운드 격자 이동/벽 충돌 효과음 볼륨입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); rhythmRoundTimeLimit = ((BaseUnityPlugin)this).Config.Bind("Round 5 Rhythm", "Round Time Limit", 20f, new ConfigDescription("5라운드 WASD 리듬게임 제한 시간입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(8f, 60f), Array.Empty())); rhythmNoteTravelSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 5 Rhythm", "Note Travel Seconds", 1.25f, new ConfigDescription("노트가 위에서 판정선까지 내려오는 시간입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.4f, 5f), Array.Empty())); rhythmNoteInterval = ((BaseUnityPlugin)this).Config.Bind("Round 5 Rhythm", "Note Interval", 0.35f, new ConfigDescription("호환용 값입니다. 현재 5라운드 WASD 리듬게임은 각 노트 간격을 0.25~0.50초 랜덤으로 사용합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.25f, 2f), Array.Empty())); rhythmHitWindow = ((BaseUnityPlugin)this).Config.Bind("Round 5 Rhythm", "Hit Window", 0.1f, new ConfigDescription("판정 허용 시간입니다. 기본 ±0.2초.", (AcceptableValueBase)(object)new AcceptableValueRange(0.05f, 0.5f), Array.Empty())); round11ObstacleTravelSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 11 Animal Jump", "Obstacle Travel Seconds", 2.65f, new ConfigDescription("애니멀 점프에서 \ud83c\udf35/\ud83d\udef8 장애물이 왼쪽에서 오른쪽 양 위치까지 이동하는 시간입니다. 값이 클수록 느려집니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1.2f, 6f), Array.Empty())); round11JumpDurationSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 11 Animal Jump", "Jump Duration Seconds", 0.62f, new ConfigDescription("애니멀 점프의 UI 점프 시간입니다. 현재는 안정성을 위해 0.62초 고정 복귀 로직을 우선 사용합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.35f, 1.2f), Array.Empty())); round6AnswerWindowSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 6 Color Cloud", "Answer Gauge Seconds", 1.5f, new ConfigDescription("6라운드에서 정답 색 발판을 밟을 수 있는 게이지 제한 시간입니다. 기본 1초.", (AcceptableValueBase)(object)new AcceptableValueRange(0.3f, 5f), Array.Empty())); round7TargetPresses = ((BaseUnityPlugin)this).Config.Bind("Round 7 Button Mash", "Target QE Presses", 30, new ConfigDescription("호환용 값입니다. 현재 7라운드는 WASD 아무 키나 연타해서 100칸 전진하면 완료됩니다.", (AcceptableValueBase)(object)new AcceptableValueRange(5, 100), Array.Empty())); round7TimeLimitSeconds = ((BaseUnityPlugin)this).Config.Bind("Round 7 Button Mash", "Time Limit Seconds", 20f, new ConfigDescription("7라운드 제한 시간입니다. 이 시간이 지나면 미완주자가 있어도 종료됩니다.", (AcceptableValueBase)(object)new AcceptableValueRange(5f, 60f), Array.Empty())); round8TotalStars = ((BaseUnityPlugin)this).Config.Bind("Round 8 Star Grid", "Total Stars", 10, new ConfigDescription("8라운드에서 총 몇 개의 별을 먹으면 종료할지 정합니다. 기본 10.", (AcceptableValueBase)(object)new AcceptableValueRange(1, 50), Array.Empty())); directPrefabMode = ((BaseUnityPlugin)this).Config.Bind("Fungus", "Direct Prefab Mode", DirectPrefabMode.AutoFromItem, "AutoFromItem이면 아이템 프리팹에서 설치 완료 프리팹 이름을 자동으로 읽습니다."); arenaStartX = ((BaseUnityPlugin)this).Config.Bind("Arena", "Start X", 0f, "경기장 시작 X"); arenaEndX = ((BaseUnityPlugin)this).Config.Bind("Arena", "End X", 40f, "경기장 끝 X"); arenaY = ((BaseUnityPlugin)this).Config.Bind("Arena", "Y", 50f, "기본 경기장 Y"); round4UpperArenaY = ((BaseUnityPlugin)this).Config.Bind("Arena", "Round 4 Upper Y", 60f, "4라운드 2층 구름균류 Y"); arenaStartZ = ((BaseUnityPlugin)this).Config.Bind("Arena", "Start Z", -330f, "경기장 시작 Z. v4.8.0부터 1/4라운드 1층/2층 포함 정사각형 맵 유지를 위해 -330으로 강제됩니다."); arenaEndZ = ((BaseUnityPlugin)this).Config.Bind("Arena", "End Z", -290f, "경기장 끝 Z. v4.8.0부터 1/4라운드 1층/2층 포함 정사각형 맵 유지를 위해 -290으로 강제됩니다."); ForceSquareArenaZBounds(); cloudRoundSpacing = ((BaseUnityPlugin)this).Config.Bind("Arena", "Cloud Spacing", 2.5f, "구름균류 라운드 간격"); shelfRoundSpacing = ((BaseUnityPlugin)this).Config.Bind("Arena", "Shelf Spacing", 5f, "선반균류 라운드 간격"); bounceRoundSpacing = ((BaseUnityPlugin)this).Config.Bind("Arena", "Bounce Spacing", 5f, "방방균류 라운드 간격"); maxSpawnPerSecond = ((BaseUnityPlugin)this).Config.Bind("Spawn", "Max Spawn Per Second", 20, "1초에 최대 몇 개씩 순차 소환할지 정합니다."); clearOldBeforeSpawn = ((BaseUnityPlugin)this).Config.Bind("Spawn", "Clear Old Before Spawn", true, "새 라운드 경기장 소환 전에 이전 경기장을 삭제합니다."); randomRotation = ((BaseUnityPlugin)this).Config.Bind("Spawn", "Random Rotation", true, "균류 Y축 회전을 랜덤하게 합니다."); freezeSpawnedObjects = ((BaseUnityPlugin)this).Config.Bind("Spawn", "Freeze Spawned Objects", true, "설치 완료 균류를 공중에서 움직이지 않게 고정합니다."); cloudItemPrefabPath = ((BaseUnityPlugin)this).Config.Bind("Fungus Item Prefabs", "Cloud Item Prefab Path", "0_Items/CloudFungus", "구름균류 아이템 프리팹 경로"); shelfItemPrefabPath = ((BaseUnityPlugin)this).Config.Bind("Fungus Item Prefabs", "Shelf Item Prefab Path", "0_Items/ShelfShroom", "선반균류 아이템 프리팹 경로"); bounceItemPrefabPath = ((BaseUnityPlugin)this).Config.Bind("Fungus Item Prefabs", "Bounce Item Prefab Path", "0_Items/BounceShroom", "방방균류 아이템 프리팹 경로"); cloudInstalledPrefabPath = ((BaseUnityPlugin)this).Config.Bind("Installed Prefabs Manual", "Cloud Installed Prefab Path", "", "수동 모드에서 사용할 설치 완료 구름균류 경로"); shelfInstalledPrefabPath = ((BaseUnityPlugin)this).Config.Bind("Installed Prefabs Manual", "Shelf Installed Prefab Path", "", "수동 모드에서 사용할 설치 완료 선반균류 경로"); bounceInstalledPrefabPath = ((BaseUnityPlugin)this).Config.Bind("Installed Prefabs Manual", "Bounce Installed Prefab Path", "", "수동 모드에서 사용할 설치 완료 방방균류 경로"); dynamiteItemPath = ((BaseUnityPlugin)this).Config.Bind("Items", "Dynamite Item Path", "0_Items/Dynamite", "다이너마이트 아이템 프리팹 경로"); rescueHookItemPaths = ((BaseUnityPlugin)this).Config.Bind("Items", "Rescue Hook Item Paths", "0_Items/RescueHook,0_Items/Rescue Hook,0_Items/Rescue_Hook,0_Items/ScoutRescueHook,0_Items/Hookshot,0_Items/Hook", "2라운드 구조갈고리 프리팹 후보 경로입니다. 쉼표로 여러 개 입력 가능."); frisbeeItemPath = ((BaseUnityPlugin)this).Config.Bind("Items", "Frisbee Item Path", "0_Items/Frisbee", "플라잉디스크 아이템 프리팹 경로"); coconutItemPath = ((BaseUnityPlugin)this).Config.Bind("Items", "Coconut Item Path", "0_Items/Coconut", "4라운드에서 구름균류 위에 생성할 코코넛 아이템 경로"); poppycornItemPaths = ((BaseUnityPlugin)this).Config.Bind("Items", "Poppycorn Item Paths", "0_Items/Poppycorn,0_Items/PoppyCorn,0_Items/Poppy,0_Items/Popcorn,0_Items/PoppyGun", "5라운드 뾱뾱이 아이템 후보 경로입니다. 쉼표로 여러 개 입력 가능."); rescueHookMaintainInterval = ((BaseUnityPlugin)this).Config.Bind("Items", "Rescue Hook Maintain Interval", 0.5f, "2라운드에서 몇 초마다 구조갈고리를 보충할지 정합니다."); thrownFrisbeeDeleteSeconds = ((BaseUnityPlugin)this).Config.Bind("Items", "Thrown Frisbee Delete Seconds", 15f, "플라잉디스크가 던져진 뒤 이 시간이 지나도 바닥에 남아있으면 삭제합니다."); dynamiteMissingDelay = ((BaseUnityPlugin)this).Config.Bind("Dynamite", "Dynamite Missing Delay", 4f, "1라운드에서 인벤토리에 다이너마이트가 없으면 몇 초 게이지 충전 후 새 다이너마이트를 지급할지 정합니다."); dynamiteCheckInterval = ((BaseUnityPlugin)this).Config.Bind("Dynamite", "Dynamite Check Interval", 0.5f, "1라운드에서 다이너마이트 보유 여부를 몇 초마다 검사할지 정합니다."); dynamiteExplosionRadius = ((BaseUnityPlugin)this).Config.Bind("Dynamite", "Explosion Radius", 8f, new ConfigDescription("다이너마이트 원본 폭발 프리팹의 AOE 판정 반경입니다. 데미지/넘어짐/넉백 범위가 같이 바뀝니다. 원본 기본값은 5m입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 20f), Array.Empty())); centerNoticeFontSize = ((BaseUnityPlugin)this).Config.Bind("Round Start UI", "Center Notice Font Size", 150, "Ready/Start 중앙 글씨 크기입니다."); centerNoticeTextY = ((BaseUnityPlugin)this).Config.Bind("Round Start UI", "Center Notice Text Y", 260f, "Ready/Start 중앙 글씨 Y 위치입니다."); roundEndNoticeDuration = ((BaseUnityPlugin)this).Config.Bind("Round End UI", "Round End Notice Duration", 15f, new ConfigDescription("라운드 종료 문구가 화면에 떠있는 전체 시간입니다. 마지막 부분은 자동으로 점점 연해지며 사라집니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 20f), Array.Empty())); roundEndFrontCameraEnabled = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Enable Front Camera On Emote", true, "라운드 종료 이모트 시작 시 정면 카메라로 전환합니다."); roundEndFrontCameraDuration = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Front Camera Duration", 5f, new ConfigDescription("라운드 종료 이모트 정면카메라 유지 시간입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 20f), Array.Empty())); roundEndFrontCameraDistance = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Front Camera Distance", 6.102581f, new ConfigDescription("캐릭터가 보고 있는 정면 방향으로 카메라를 얼마나 떨어뜨릴지 정합니다. 기본값은 얼굴 정면 4m입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.5f, 10f), Array.Empty())); roundEndFrontCameraHeightOffset = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Front Camera Height Offset", 0f, new ConfigDescription("정면 카메라 위치의 위아래 보정값입니다. 기본값 0은 캐릭터 얼굴 높이와 거의 같은 높이에서 바라봅니다.", (AcceptableValueBase)(object)new AcceptableValueRange(-2f, 3f), Array.Empty())); roundEndFrontCameraLookAtHeight = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Front Camera Look At Height", 1.198949f, new ConfigDescription("캐릭터 중심에서 어느 높이를 바라볼지 정합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 3f), Array.Empty())); roundEndFrontCameraSideOffset = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Front Camera Side Offset", 0f, new ConfigDescription("정면 카메라 좌우 보정값입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(-3f, 3f), Array.Empty())); roundEndFrontCameraSmoothSpeed = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Front Camera Smooth Speed", 18f, new ConfigDescription("정면 카메라 이동/회전 속도입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 60f), Array.Empty())); roundEndFrontCameraCollisionCheck = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Collision Check", true, "카메라와 캐릭터 사이 벽 충돌을 간단히 피합니다."); roundEndFrontCameraCollisionRadius = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Collision Radius", 0.18f, new ConfigDescription("카메라 충돌 검사 반지름입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.05f, 0.6f), Array.Empty())); roundEndFrontCameraUseCustomFov = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Use Custom FOV", false, "정면카메라 동안 FOV를 지정값으로 바꿉니다."); roundEndFrontCameraFov = ((BaseUnityPlugin)this).Config.Bind("Round End Camera", "Custom FOV", 60f, new ConfigDescription("정면카메라 전용 FOV입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(30f, 100f), Array.Empty())); forceThirdPersonDuringGame = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Always Third Person During Game", true, "Party Games가 진행 중일 때 ThirdPersonToggle 모드를 자동으로 켭니다. Evaisa-ThirdPersonToggle-1.0.10 의존성이 필요합니다."); thirdPersonCameraDistance = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Distance", 5.2f, new ConfigDescription("캐릭터 뒤쪽으로 카메라를 떨어뜨릴 거리입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 12f), Array.Empty())); thirdPersonCameraHeightOffset = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Height Offset", 1.15f, new ConfigDescription("3인칭 카메라 위치의 높이 보정값입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(-1f, 4f), Array.Empty())); thirdPersonCameraLookAtHeight = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Look At Height", 1.15f, new ConfigDescription("카메라가 캐릭터의 어느 높이를 바라볼지 정합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 3f), Array.Empty())); thirdPersonCameraSideOffset = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Side Offset", 0f, new ConfigDescription("3인칭 카메라 좌우 보정값입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(-3f, 3f), Array.Empty())); thirdPersonCameraSmoothSpeed = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Smooth Speed", 28f, new ConfigDescription("3인칭 카메라 이동/회전 추적 속도입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(1f, 80f), Array.Empty())); thirdPersonCameraCollisionCheck = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Collision Check", true, "카메라와 캐릭터 사이 벽 충돌을 간단히 피합니다."); thirdPersonCameraCollisionRadius = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Collision Radius", 0.18f, new ConfigDescription("3인칭 카메라 충돌 검사 반지름입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0.05f, 0.6f), Array.Empty())); thirdPersonCameraUseCustomFov = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Use Custom FOV", false, "3인칭 카메라 동안 FOV를 지정값으로 바꿉니다."); thirdPersonCameraFov = ((BaseUnityPlugin)this).Config.Bind("In-Game Third Person", "Custom FOV", 65f, new ConfigDescription("3인칭 카메라 전용 FOV입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(30f, 100f), Array.Empty())); beachReturnYOffset = ((BaseUnityPlugin)this).Config.Bind("Round Start UI", "Beach Return Y Offset", 1.5f, "라운드 종료 후 해변 시작 위치로 돌려보낼 때 Y축으로 살짝 올리는 값입니다."); enableStandingTileDelete = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Enable Standing Tile Delete", true, "true면 구름균류 삭제 기믹을 사용합니다. 1라운드는 바깥쪽부터 자동 붕괴, 4라운드는 기존처럼 밟은 구름균류 삭제입니다."); standingTileCheckInterval = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Standing Tile Check Interval", 0.1f, "4라운드에서 밟고 있는 발판을 몇 초마다 검사할지 정합니다."); round1EdgeCollapseStartDelay = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Round 1 Edge Collapse Start Delay", 3f, new ConfigDescription("1라운드 시작 후 몇 초 뒤부터 바깥쪽 구름균류 자동 붕괴를 시작할지 정합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 180f), Array.Empty())); round4StandingTileStartDelay = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Round 4 Standing Tile Start Delay", 3f, new ConfigDescription("4라운드에서 몇 초 뒤부터 밟은 구름균류 삭제를 시작할지 정합니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 180f), Array.Empty())); cloudStandingTileDeleteDelay = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Cloud Standing Tile Delete Delay", 0.3f, "구름균류 삭제 직전 주황색 경고가 몇 초 동안 보일지 정합니다."); standingTileRayDistance = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Standing Tile Raycast Distance", 6f, "플레이어 아래 발판 감지 Raycast 거리입니다."); cloudDisappearSoundEnabled = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Cloud Disappear Sound Enabled", true, "구름균류가 사라질 때 어울리는 효과음을 재생합니다."); cloudDisappearSoundVolume = ((BaseUnityPlugin)this).Config.Bind("Standing Tile Delete", "Cloud Disappear Sound Volume", 0.65f, new ConfigDescription("구름균류 사라짐 효과음 볼륨입니다.", (AcceptableValueBase)(object)new AcceptableValueRange(0f, 1f), Array.Empty())); coconutSpawnInterval = ((BaseUnityPlugin)this).Config.Bind("Round 4 Coconut", "Coconut Spawn Interval", 10f, "4라운드에서 몇 초마다 코코넛 1개를 생성할지 정합니다."); coconutSpawnYOffset = ((BaseUnityPlugin)this).Config.Bind("Round 4 Coconut", "Coconut Spawn Y Offset", 1.2f, "구름균류 위에 코코넛을 얼마나 위로 띄워 생성할지 정합니다."); round5FallPenaltyPoints = ((BaseUnityPlugin)this).Config.Bind("Round 5 Balloon Curse", "Fall Penalty Points", 10, "5라운드에서 떨어졌을 때 잃는 점수입니다."); round5FallResetCooldown = ((BaseUnityPlugin)this).Config.Bind("Round 5 Balloon Curse", "Fall Reset Cooldown", 1.5f, "5라운드 추락 페널티 중복 방지 시간입니다."); poppyDrowsyAmount = ((BaseUnityPlugin)this).Config.Bind("Round 5 Balloon Curse", "Poppycorn Drowsy Amount", 0.05f, "뾱뾱이를 맞은 플레이어에게 남길 수면 효과량입니다. 0.05 = 5%."); clearItemsOnRoundEnd = ((BaseUnityPlugin)this).Config.Bind("Cleanup", "Clear World Items On Round End", true, "라운드/게임 종료 시 맵에 떨어져 있는 모든 아이템을 삭제합니다."); clearInventoryOnRoundEnd = ((BaseUnityPlugin)this).Config.Bind("Cleanup", "Clear Player Inventory On Round End", true, "라운드/게임 종료 시 참가자 인벤토리의 모든 아이템을 삭제합니다."); clearDebuffsOnRoundEnd = ((BaseUnityPlugin)this).Config.Bind("Cleanup", "Clear Debuffs On Round End", true, "라운드/게임 종료 시 부상/화상/독/저주 등 상태 이상을 제거합니다."); fallEliminationY = ((BaseUnityPlugin)this).Config.Bind("Rules", "Fall Elimination Y", 46f, "1~4라운드에서 이 Y값 이하로 떨어지면 해당 라운드 탈락"); playerTeleportYOffset = ((BaseUnityPlugin)this).Config.Bind("Rules", "Player Teleport Y Offset", 3f, "라운드 시작 시 실제 타일 위치에서 플레이어를 얼마나 위에 소환할지 정합니다."); roundRestartDelay = ((BaseUnityPlugin)this).Config.Bind("Rules", "Round Restart Delay", 3f, "라운드 종료 후 다음 라운드 시작까지 대기 시간"); clearExtraStaminaOnRoundEnd = ((BaseUnityPlugin)this).Config.Bind("Rules", "Clear Extra Stamina On Round End", true, "라운드 종료 시 추가 스테미나를 0으로 정리합니다."); effectCleanupDuration = ((BaseUnityPlugin)this).Config.Bind("Effects", "Effect Cleanup Duration", 0f, "소환 후 몇 초 동안 먼지/VFX를 계속 제거할지"); resolverSpawnY = ((BaseUnityPlugin)this).Config.Bind("Resolver", "Resolver Spawn Y", -9999f, "설치 완료 프리팹 이름을 읽기 위해 임시 아이템을 소환할 Y 위치"); logResolvedPrefabNames = ((BaseUnityPlugin)this).Config.Bind("Resolver", "Log Resolved Prefab Names", true, "자동으로 찾은 설치 완료 프리팹 이름을 로그에 출력"); beachTreesEnabled = ((BaseUnityPlugin)this).Config.Bind("Beach Objects", "Beach Trees Enabled", true, "false로 바꾸면 해변의 나무와 코코넛을 숨깁니다. 기본값은 false입니다."); hardDeleteBeachObjects = ((BaseUnityPlugin)this).Config.Bind("Beach Objects", "Hard Delete Beach Objects", false, "true면 나무/코코넛을 완전 삭제합니다. false면 복구 가능한 숨김 처리."); beachObjectMinZ = ((BaseUnityPlugin)this).Config.Bind("Beach Objects", "Beach Object Min Z", -600f, "나무/코코넛 제거 대상 최소 Z"); beachObjectMaxZ = ((BaseUnityPlugin)this).Config.Bind("Beach Objects", "Beach Object Max Z", 100f, "나무/코코넛 제거 대상 최대 Z"); beachObjectNameKeywords = ((BaseUnityPlugin)this).Config.Bind("Beach Objects", "Beach Object Name Keywords", "tree,palm,wood,log,trunk,branch,coconut", "나무/코코넛 후보 이름 키워드. 쉼표로 구분."); lastGameStartValue = gameStart.Value; lastRound1StartValue = round1Start.Value; lastRound2StartValue = round2Start.Value; lastRound3StartValue = round3Start.Value; lastRound4StartValue = round4Start.Value; lastRound5StartValue = round5Start.Value; lastRound6StartValue = round6Start.Value; lastRound7StartValue = round7Start.Value; lastRound8StartValue = round8Start.Value; lastRound9StartValue = round9Start.Value; lastRound10StartValue = round10Start.Value; lastRound11StartValue = round11Start.Value; lastBeachTreesEnabledValue = beachTreesEnabled.Value; gameStart.SettingChanged += OnGameStartSettingChanged; round1Start.SettingChanged += OnRound1StartSettingChanged; round2Start.SettingChanged += OnRound2StartSettingChanged; round3Start.SettingChanged += OnRound3StartSettingChanged; round4Start.SettingChanged += OnRound4StartSettingChanged; round5Start.SettingChanged += OnRound5StartSettingChanged; round6Start.SettingChanged += OnRound6StartSettingChanged; round7Start.SettingChanged += OnRound7StartSettingChanged; round8Start.SettingChanged += OnRound8StartSettingChanged; round9Start.SettingChanged += OnRound9StartSettingChanged; round10Start.SettingChanged += OnRound10StartSettingChanged; round11Start.SettingChanged += OnRound11StartSettingChanged; beachTreesEnabled.SettingChanged += OnBeachTreesEnabledSettingChanged; PhotonNetwork.AddCallbackTarget((object)this); TryPatchFlareStartHook(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"PEAK Party Games v5.21.6 loaded."); } private void ForceSquareArenaZBounds() { try { if (arenaStartZ != null && Mathf.Abs(arenaStartZ.Value - -330f) > 0.001f) { arenaStartZ.Value = -330f; } if (arenaEndZ != null && Mathf.Abs(arenaEndZ.Value - -290f) > 0.001f) { arenaEndZ.Value = -290f; } ((BaseUnityPlugin)this).Config.Save(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("ForceSquareArenaZBounds failed: " + ex.Message)); } } private float ForcedArenaMinZ() { return Mathf.Min(-330f, -290f); } private float ForcedArenaMaxZ() { return Mathf.Max(-330f, -290f); } private void OnDisable() { RestoreMenuMovementZero(); } private void OnDestroy() { try { if (gameStart != null) { gameStart.SettingChanged -= OnGameStartSettingChanged; } if (round1Start != null) { round1Start.SettingChanged -= OnRound1StartSettingChanged; } if (round2Start != null) { round2Start.SettingChanged -= OnRound2StartSettingChanged; } if (round3Start != null) { round3Start.SettingChanged -= OnRound3StartSettingChanged; } if (round4Start != null) { round4Start.SettingChanged -= OnRound4StartSettingChanged; } if (round5Start != null) { round5Start.SettingChanged -= OnRound5StartSettingChanged; } if (round6Start != null) { round6Start.SettingChanged -= OnRound6StartSettingChanged; } if (round7Start != null) { round7Start.SettingChanged -= OnRound7StartSettingChanged; } if (round8Start != null) { round8Start.SettingChanged -= OnRound8StartSettingChanged; } if (round9Start != null) { round9Start.SettingChanged -= OnRound9StartSettingChanged; } if (round10Start != null) { round10Start.SettingChanged -= OnRound10StartSettingChanged; } if (round11Start != null) { round11Start.SettingChanged -= OnRound11StartSettingChanged; } if (beachTreesEnabled != null) { beachTreesEnabled.SettingChanged -= OnBeachTreesEnabledSettingChanged; } StopRoundEndFrontCamera(); StopForcedThirdPersonCamera(); try { if (harmony != null) { harmony.UnpatchSelf(); } } catch { } FastBlockThirdPersonVInput = false; if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } PhotonNetwork.RemoveCallbackTarget((object)this); } catch { } } private bool IsFromPhotonMaster(EventData photonEvent) { try { if (!PhotonNetwork.InRoom) { return true; } Player masterClient = PhotonNetwork.MasterClient; if (masterClient == null) { return false; } return photonEvent != null && photonEvent.Sender == masterClient.ActorNumber; } catch { return false; } } private bool IsValidRoundTypeInt(object value) { try { int num = Convert.ToInt32(value); return num >= 0 && num <= 10; } catch { return false; } } private bool IsValidPartyRoundStartEvent(object[] data) { if (data == null || data.Length < 2) { return false; } return IsValidRoundTypeInt(data[0]); } private bool IsValidPartyRoundEndEvent(object[] data) { try { if (data == null || data.Length < 8) { return false; } if (!(data[1] is int[])) { return false; } if (!(data[2] is int[])) { return false; } if (!IsValidRoundTypeInt(data[3])) { return false; } Convert.ToInt32(data[4]); if (data[5] != null && !(data[5] is string[])) { return false; } if (data[6] != null && !(data[6] is string)) { return false; } if (data[7] != null && !(data[7] is string[])) { return false; } return true; } catch { return false; } } private bool IsValidPartyScoreSyncEvent(object[] data) { try { if (data == null || data.Length < 4) { return false; } if (!(data[0] is int[])) { return false; } if (!(data[1] is int[])) { return false; } if (!(data[2] is int[])) { return false; } if (data[3] != null && !(data[3] is string[])) { return false; } return true; } catch { return false; } } private bool ShouldAcceptMasterPartyEvent(EventData photonEvent, string label) { if (!IsFromPhotonMaster(photonEvent)) { try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[EventGuard] Ignored non-master event " + label + " code=" + photonEvent.Code + " sender=" + photonEvent.Sender)); } catch { } return false; } return true; } public void OnEvent(EventData photonEvent) { //IL_077e: Unknown result type (might be due to invalid IL or missing references) //IL_081a: Unknown result type (might be due to invalid IL or missing references) //IL_06f0: Unknown result type (might be due to invalid IL or missing references) //IL_08aa: Unknown result type (might be due to invalid IL or missing references) try { if (photonEvent.Code == 100) { if (ShouldAcceptMasterPartyEvent(photonEvent, "FinalWinners") && photonEvent.CustomData is int[] winnerActors) { ApplyFinalWinnersLocal(winnerActors); } } else if (photonEvent.Code == 108) { if (ShouldAcceptMasterPartyEvent(photonEvent, "MatchReset")) { ApplyMatchResetLocal(); } } else if (photonEvent.Code == 141) { if (ShouldAcceptMasterPartyEvent(photonEvent, "ForceClearAllInventories")) { string reason = ((photonEvent.CustomData is object[] array && array.Length >= 1) ? Convert.ToString(array[0]) : "remote"); ApplyForceClearAllPlayerInventoriesLocal(reason); } } else if (photonEvent.Code == 109) { if (ShouldAcceptMasterPartyEvent(photonEvent, "CenterNotice")) { object[] data = photonEvent.CustomData as object[]; ApplyCenterNoticeEventLocal(data); } } else if (photonEvent.Code == 113) { if (ShouldAcceptMasterPartyEvent(photonEvent, "ForceNight")) { float miniGameNightLocal = ((photonEvent.CustomData is object[] array2 && array2.Length >= 1) ? Convert.ToSingle(array2[0]) : 22.5f); SetMiniGameNightLocal(miniGameNightLocal); } } else if (photonEvent.Code == 105) { if (ShouldAcceptMasterPartyEvent(photonEvent, "UiRoundStart")) { object[] array3 = photonEvent.CustomData as object[]; if (!IsValidPartyRoundStartEvent(array3)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[EventGuard] Ignored invalid UiRoundStart payload. sender=" + photonEvent.Sender)); } else { ApplyUiRoundStartLocal((RoundGameType)Convert.ToInt32(array3[0]), Convert.ToInt32(array3[1])); } } } else if (photonEvent.Code == 106) { if (ShouldAcceptMasterPartyEvent(photonEvent, "UiRoundEnd")) { object[] array4 = photonEvent.CustomData as object[]; if (!IsValidPartyRoundEndEvent(array4)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[EventGuard] Ignored invalid UiRoundEnd payload. sender=" + photonEvent.Sender)); return; } string reason2 = ((array4 != null && array4.Length != 0) ? Convert.ToString(array4[0]) : "Round End"); ApplyRoundEndScoreDataLocal(array4); ApplyUiRoundEndLocal(reason2); } } else if (photonEvent.Code == 107) { if (ShouldAcceptMasterPartyEvent(photonEvent, "ScoreSync")) { object[] data2 = photonEvent.CustomData as object[]; if (!IsValidPartyScoreSyncEvent(data2)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[EventGuard] Ignored invalid ScoreSync payload. sender=" + photonEvent.Sender)); } else { ApplyScoreSyncLocal(data2); } } } else if (photonEvent.Code == 129) { if (ShouldAcceptMasterPartyEvent(photonEvent, "FinalScoreboard")) { object[] data3 = photonEvent.CustomData as object[]; ApplyFinalScoreboardEventLocal(data3); } } else if (photonEvent.Code == 130) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round6PersonalResult")) { object[] data4 = photonEvent.CustomData as object[]; ApplyRound6PersonalResultNoticeLocal(data4); } } else if (photonEvent.Code == 131) { if (ShouldAcceptMasterPartyEvent(photonEvent, "RoundIntro")) { object[] data5 = photonEvent.CustomData as object[]; ApplyRoundIntroDescriptionEventLocal(data5); } } else if (photonEvent.Code == 132) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round9FinishList")) { object[] data6 = photonEvent.CustomData as object[]; ApplyRound9FinishListLocal(data6); } } else if (photonEvent.Code == 101) { if (ShouldAcceptMasterPartyEvent(photonEvent, "TimingStart") && photonEvent.CustomData is object[] array5 && array5.Length >= 1) { ApplyUiRoundStartLocal(RoundGameType.ShelfHook, currentRoundIndex); BeginTimingRoundLocal(Convert.ToSingle(array5[0])); } } else if (photonEvent.Code == 102) { if (photonEvent.CustomData is object[] array6 && array6.Length >= 2) { int key = Convert.ToInt32(array6[0]); float value = Convert.ToSingle(array6[1]); if (!timingRoundSubmissions.ContainsKey(key)) { timingRoundSubmissions[key] = value; } } } else if (photonEvent.Code == 103) { if (ShouldAcceptMasterPartyEvent(photonEvent, "ArrowStart") && photonEvent.CustomData is object[] array7 && array7.Length >= 1) { ApplyUiRoundStartLocal(RoundGameType.BounceFrisbee, currentRoundIndex); BeginArrowRoundLocal(Convert.ToString(array7[0])); } } else if (photonEvent.Code == 104) { if (photonEvent.CustomData is object[] array8 && array8.Length >= 2) { int key2 = Convert.ToInt32(array8[0]); float value2 = Convert.ToSingle(array8[1]); if (!arrowRoundSubmissions.ContainsKey(key2)) { arrowRoundSubmissions[key2] = value2; } } } else if (photonEvent.Code == 112) { if (ShouldAcceptMasterPartyEvent(photonEvent, "TileWarning") && photonEvent.CustomData is object[] array9 && array9.Length >= 3) { Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(Convert.ToSingle(array9[0]), Convert.ToSingle(array9[1]), Convert.ToSingle(array9[2])); float warningSeconds = ((array9.Length >= 4) ? Convert.ToSingle(array9[3]) : Mathf.Max(0.5f, cloudStandingTileDeleteDelay.Value)); StartCloudWarningTintAtPositionLocal(position, warningSeconds); } } else if (photonEvent.Code == 115) { if (ShouldAcceptMasterPartyEvent(photonEvent, "TileColor") && photonEvent.CustomData is object[] array10 && array10.Length >= 4) { Vector3 position2 = default(Vector3); ((Vector3)(ref position2))..ctor(Convert.ToSingle(array10[0]), Convert.ToSingle(array10[1]), Convert.ToSingle(array10[2])); Round6CloudColor color = (Round6CloudColor)Convert.ToInt32(array10[3]); ApplyRound6ColorAtPositionLocal(position2, color); } } else if (photonEvent.Code == 116) { if (ShouldAcceptMasterPartyEvent(photonEvent, "TileLower") && photonEvent.CustomData is object[] array11 && array11.Length >= 5) { Vector3 position3 = default(Vector3); ((Vector3)(ref position3))..ctor(Convert.ToSingle(array11[0]), Convert.ToSingle(array11[1]), Convert.ToSingle(array11[2])); float targetY = Convert.ToSingle(array11[3]); float duration = Convert.ToSingle(array11[4]); StartLowerTileAtPositionLocal(position3, targetY, duration); } } else if (photonEvent.Code == 117) { if (ShouldAcceptMasterPartyEvent(photonEvent, "TileReset") && photonEvent.CustomData is object[] array12 && array12.Length >= 4) { Vector3 position4 = default(Vector3); ((Vector3)(ref position4))..ctor(Convert.ToSingle(array12[0]), Convert.ToSingle(array12[1]), Convert.ToSingle(array12[2])); float restoreY = Convert.ToSingle(array12[3]); RestoreRound6TileAtPositionLocal(position4, restoreY); } } else if (photonEvent.Code == 118) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round6Gauge") && photonEvent.CustomData is object[] array13 && array13.Length >= 2) { float duration2 = Convert.ToSingle(array13[0]); Round6CloudColor color2 = (Round6CloudColor)Convert.ToInt32(array13[1]); StartRound6AnswerGaugeLocal(duration2, color2); } } else if (photonEvent.Code == 119) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round7Start")) { BeginRound7ButtonMashLocal(); } } else if (photonEvent.Code == 120) { if (photonEvent.CustomData is object[] array14 && array14.Length >= 2) { int key3 = Convert.ToInt32(array14[0]); int value3 = Convert.ToInt32(array14[1]); round7ProgressByActor[key3] = value3; } } else if (photonEvent.Code == 121) { if (photonEvent.CustomData is object[] array15 && array15.Length >= 2) { int key4 = Convert.ToInt32(array15[0]); float value4 = Convert.ToSingle(array15[1]); if (!round7FinishTimes.ContainsKey(key4)) { round7FinishTimes[key4] = value4; } round7ProgressByActor[key4] = GetRound7TargetPresses(); } } else if (photonEvent.Code == 114) { if (ShouldAcceptMasterPartyEvent(photonEvent, "CloudDisappearSound")) { PlayCloudDisappearSound(); } } else if (photonEvent.Code == 110) { if (ShouldAcceptMasterPartyEvent(photonEvent, "RhythmStart")) { object[] array16 = photonEvent.CustomData as object[]; string sequence = ((array16 != null && array16.Length >= 1) ? Convert.ToString(array16[0]) : BuildRandomArrowSequence(30)); float[] noteOffsets = ((array16 != null && array16.Length >= 2) ? (array16[1] as float[]) : null); ApplyUiRoundStartLocal(RoundGameType.RhythmGame, currentRoundIndex); BeginRhythmRoundLocal(sequence, noteOffsets); } } else if (photonEvent.Code == 111) { if (photonEvent.CustomData is object[] array17 && array17.Length >= 2) { int key5 = Convert.ToInt32(array17[0]); float num = Convert.ToSingle(array17[1]); rhythmRoundSubmissions[key5] = num; rhythmRoundProgressByActor[key5] = Mathf.RoundToInt(num); } } else if (photonEvent.Code == 133) { if (photonEvent.CustomData is object[] array18 && array18.Length >= 2) { int key6 = Convert.ToInt32(array18[0]); int num2 = Convert.ToInt32(array18[1]); rhythmRoundProgressByActor[key6] = Mathf.Clamp(num2, 0, 30); } } else if (photonEvent.Code == 122) { HandleFlareStartRequestEvent(); } else if (photonEvent.Code == 138) { if (ShouldAcceptMasterPartyEvent(photonEvent, "FlareReadyStart")) { object[] data7 = photonEvent.CustomData as object[]; ApplyFlareReadyStartLocal(data7); } } else if (photonEvent.Code == 139) { object[] data8 = photonEvent.CustomData as object[]; ApplyFlareReadySubmitLocal(data8); } else if (photonEvent.Code == 140) { if (ShouldAcceptMasterPartyEvent(photonEvent, "FlareReadyEnd")) { object[] data9 = photonEvent.CustomData as object[]; ApplyFlareReadyEndLocal(data9); } } else if (photonEvent.Code == 123) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round8State")) { object[] data10 = photonEvent.CustomData as object[]; ApplyRound8StarGridStateLocal(data10); } } else if (photonEvent.Code == 124) { object[] data11 = photonEvent.CustomData as object[]; HandleRound8StarGridMoveRequestEvent(data11); } else if (photonEvent.Code == 125) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round9Start")) { if (photonEvent.CustomData is object[] array19 && array19.Length >= 8) { ApplyRound9MemoryStateLocal(array19); } else { BeginRound9MemoryLocal(); } } } else if (photonEvent.Code == 126) { object[] data12 = photonEvent.CustomData as object[]; HandleRound9MemoryPickRequestEvent(data12); } else if (photonEvent.Code == 127) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round10State")) { object[] data13 = photonEvent.CustomData as object[]; ApplyRound10HalliGalliStateLocal(data13); } } else if (photonEvent.Code == 128) { object[] data14 = photonEvent.CustomData as object[]; HandleRound10HalliGalliBellEvent(data14); } else if (photonEvent.Code == 136) { if (ShouldAcceptMasterPartyEvent(photonEvent, "RoundVoteStart")) { object[] data15 = photonEvent.CustomData as object[]; ApplyRoundVoteStartLocal(data15); } } else if (photonEvent.Code == 137) { object[] data16 = photonEvent.CustomData as object[]; HandleRoundVoteSubmitEvent(data16); } else if (photonEvent.Code == 134) { if (ShouldAcceptMasterPartyEvent(photonEvent, "Round11Start")) { object[] data17 = photonEvent.CustomData as object[]; ApplyUiRoundStartLocal(RoundGameType.DinoRun, currentRoundIndex); ApplyRound11DinoStartEventLocal(data17); } } else if (photonEvent.Code == 135) { object[] data18 = photonEvent.CustomData as object[]; HandleRound11DinoSubmitEvent(data18); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)ex); } } private bool CanOpenTipGuideNow() { try { if (!enableMod.Value) { return false; } if (!IsProbablyInIslandMap()) { return false; } if (gameState != 0) { return false; } if (mainGameRoutine != null) { return false; } if (singleRoundTestRunning) { return false; } if (roundFinishInProgress) { return false; } if (roundVoteActive) { return false; } if (roundResultPanelActive) { return false; } if (finalScoreboardActive) { return false; } if (flareReadyActive) { return false; } if (round11DinoActive) { return false; } if ((Object)(object)Character.localCharacter == (Object)null) { return false; } if (Character.localCharacter.inAirport) { return false; } } catch { return false; } return true; } private bool CanOpenSettingsMenuNow() { try { if (!enableMod.Value) { return false; } if (!IsProbablyInIslandMap()) { return false; } if (gameState != 0) { return false; } if (mainGameRoutine != null) { return false; } if (singleRoundTestRunning) { return false; } if (roundFinishInProgress) { return false; } if (roundVoteActive) { return false; } if (roundResultPanelActive) { return false; } if (finalScoreboardActive) { return false; } if (flareReadyActive) { return false; } if (round11DinoActive) { return false; } if ((Object)(object)Character.localCharacter == (Object)null) { return false; } if (Character.localCharacter.inAirport) { return false; } } catch { return false; } return true; } private void OpenTipGuide() { if (CanOpenTipGuideNow()) { tipGuideVisible = true; tipGuidePage = 0; tipGuideInputIgnoreUntil = Time.unscaledTime + 0.25f; } } private void HandleTipGuideHotkeys() { try { if (!tipGuideVisible) { if (CanOpenTipGuideNow() && Input.GetKey((KeyCode)116) && Input.GetKey((KeyCode)105) && Input.GetKey((KeyCode)112) && (Input.GetKeyDown((KeyCode)116) || Input.GetKeyDown((KeyCode)105) || Input.GetKeyDown((KeyCode)112))) { OpenTipGuide(); } } else if (!CanOpenTipGuideNow()) { tipGuideVisible = false; } else if (!(Time.unscaledTime < tipGuideInputIgnoreUntil)) { if (Input.GetKeyDown((KeyCode)97)) { tipGuidePage = Mathf.Max(0, tipGuidePage - 1); tipGuideInputIgnoreUntil = Time.unscaledTime + 0.08f; } else if (Input.GetKeyDown((KeyCode)100)) { tipGuidePage = Mathf.Min(GetTipGuidePageCount() - 1, tipGuidePage + 1); tipGuideInputIgnoreUntil = Time.unscaledTime + 0.08f; } else if (AnyTipCloseKeyDown()) { tipGuideVisible = false; tipGuidePage = 0; tipGuideInputIgnoreUntil = Time.unscaledTime + 0.15f; } } } catch { } } private bool AnyTipCloseKeyDown() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Invalid comparison between Unknown and I4 try { Event current = Event.current; if (current != null && (int)current.type == 4 && (int)current.keyCode != 0 && (int)current.keyCode != 97 && (int)current.keyCode != 100) { return true; } } catch { } try { if (!Input.anyKeyDown) { return false; } if (Input.GetKeyDown((KeyCode)97) || Input.GetKeyDown((KeyCode)100)) { return false; } return true; } catch { } return false; } private int GetTipGuidePageCount() { return 5; } private string GetTipGuideTitle() { return useEnglishUi ? "[ PEAK Party Games Guide ]" : "[ PEAK Party Games 안내 ]"; } private string GetTipGuidePageText(int page) { if (useEnglishUi) { return GetTipGuidePageTextEnglish(page); } return GetTipGuidePageTextKorean(page); } private string GetTipGuidePageTextKorean(int page) { return Mathf.Clamp(page, 0, GetTipGuidePageCount() - 1) switch { 0 => "게임은 2명에서 4명까지 함께 플레이하는 것을 기준으로 만들어졌습니다.\n\n모든 플레이어가 같은 버전의 PEAK Party Games 모드를 설치해야 정상적으로 플레이할 수 있습니다.\n\n또한 3인칭 시점에서 UI와 캐릭터 위치를 확인하기 쉬우므로, V 키를 눌러 3인칭 시점으로 전환한 뒤 플레이하는 것을 권장합니다.", 1 => "게임을 시작하려면 모든 사람이 로딩된 후 해안가에서 조명탄을 사용하면 됩니다.\n\n게임에서는 여러 개의 짧은 미니게임이 순서대로 진행됩니다.\n\n각 라운드가 끝날 때마다 플레이어별 점수가 지급되고, 점수는 마지막까지 누적됩니다.\n\n모든 라운드가 끝났을 때 최종 점수가 가장 높은 플레이어가 우승합니다.", 2 => "모든 게임은 기본적으로 WASD 키와 Space 키를 중심으로 플레이합니다.\n\n7라운드 달리기 게임은 W/A/S/D 중 아무 키나 빠르게 연타하면 캐릭터가 1칸씩 전진합니다. 목표는 100칸입니다.\n\n라운드마다 이동, 점프, 타이밍, 기억력, 순발력 등 필요한 조작이 조금씩 다릅니다.\n\n점수는 보통 1등부터 4등까지 차등 지급됩니다.\n\n제한 시간 안에 클리어하지 못하면 해당 라운드에서 점수를 받지 못할 수도 있습니다.", 3 => "Tab 키를 누르면 점수판을 표시할 수 있습니다\n\n언어는 게임 중 직접 변경할 수 있습니다.\n\nE + N 키를 동시에 누르면 영어 UI로 변경됩니다.\n\nK + R 키를 동시에 누르면 한글 UI로 변경됩니다.\n\n언어 설정은 저장되어 다음 실행 때도 유지됩니다.", _ => "가능하면 다른 모드와 함께 많이 섞어 사용하기보다는, ThirdPersonToggle 모드와 PEAK Party Games 모드만 실행하는 것을 권장합니다.\n\n다른 UI 변경 모드, 카메라 변경 모드, 입력 변경 모드와 함께 사용하면 화면 표시나 카메라 동작이 예상과 다르게 작동할 수 있습니다.\n\n이 모드는 친구들과 가볍게 웃으면서 경쟁하는 것을 목표로 만들어졌습니다.\n\n실수해도 다음 라운드에서 역전할 수 있고, 운이 좋은 라운드나 자신에게 맞는 미니게임에서 큰 점수를 얻을 수도 있습니다.\n\n마지막까지 포기하지 말고 최종 점수 1등을 노려보세요!", }; } private string GetTipGuidePageTextEnglish(int page) { return Mathf.Clamp(page, 0, GetTipGuidePageCount() - 1) switch { 0 => "This game is designed for 2 to 4 players.\n\nAll players must install the same version of PEAK Party Games to play properly.\n\nSince it is easier to see the UI and your character position in third-person view, pressing V to switch to third-person view before playing is recommended.", 1 => "To start the game, wait until everyone has finished loading, then light a flare on the beach.\n\nSeveral short minigames will then be played in order.\n\nAfter each round, points are awarded to each player and accumulated until the end.\n\nWhen all rounds are finished, the player with the highest total score wins.", 2 => "Most games are played mainly with the WASD keys and the Space key.\n\nIn Round 7, mash any W/A/S/D key quickly to move your character forward one step at a time. The goal is 100 steps.\n\nEach round may require slightly different skills such as movement, jumping, timing, memory, and quick reactions.\n\nPoints are usually awarded differently from 1st place to 4th place.\n\nIf you fail to clear a round within the time limit, you may receive no points for that round.", 3 => "You can change the language while in game.\n\nPress Tab to show the scoreboard.\nPress E + N at the same time to switch the UI to English.\n\nPress K + R at the same time to switch the UI to Korean.\n\nYour language setting is saved and will be kept the next time you launch the game.", _ => "It is recommended to avoid mixing this mod with many other mods. For the most stable experience, use only ThirdPersonToggle and PEAK Party Games.\n\nOther UI, camera, or input-related mods may cause the display or camera behavior to work differently than expected.\n\nThis mod is made for casual competition and fun with friends.\n\nEven if you make mistakes, you can still come back in later rounds, and a minigame that fits your strengths or a bit of luck can give you a big score.\n\nDo not give up until the end, and aim for first place in the final score!", }; } private void HandleLanguageSwitchHotkeys() { try { bool flag = (Input.GetKey((KeyCode)101) && Input.GetKeyDown((KeyCode)110)) || (Input.GetKeyDown((KeyCode)101) && Input.GetKey((KeyCode)110)); bool flag2 = (Input.GetKey((KeyCode)107) && Input.GetKeyDown((KeyCode)114)) || (Input.GetKeyDown((KeyCode)107) && Input.GetKey((KeyCode)114)); if (flag) { SetUiLanguageEnglish(english: true, showNotice: true); } else if (flag2) { SetUiLanguageEnglish(english: false, showNotice: true); } } catch { } } private void SetUiLanguageEnglish(bool english, bool showNotice) { useEnglishUi = english; try { PlayerPrefs.SetInt("PEAKPartyGames.Language", english ? 1 : 0); PlayerPrefs.Save(); } catch { } if (showNotice) { if (english) { ShowLanguageSwitchNotice("Changed to English"); } else { ShowLanguageSwitchNotice("한국어로 변경됨"); } } } private void ShowLanguageSwitchNotice(string text) { languageSwitchNoticeText = text ?? ""; languageSwitchNoticeUntil = Time.time + 1.8f; } private void HandleSettingsMenuHotkey() { try { bool flag = Input.GetKeyDown((KeyCode)96) || Input.GetKeyDown((KeyCode)126); bool keyDown = Input.GetKeyDown((KeyCode)27); if (settingsMenuOpen) { if (flag || keyDown) { SetSettingsMenuOpen(open: false); } } else if (flag && CanOpenSettingsMenuNow()) { SetSettingsMenuOpen(open: true); } } catch { } } private void HandleSettingsMenuKeyboardInput() { if (!settingsMenuOpen || Time.unscaledTime < settingsMenuInputIgnoreUntil) { return; } try { if (Input.GetKeyDown((KeyCode)119) || Input.GetKeyDown((KeyCode)273)) { settingsMenuSelectedIndex--; if (settingsMenuSelectedIndex < 0) { settingsMenuSelectedIndex = 3; } settingsMenuInputIgnoreUntil = Time.unscaledTime + 0.1f; } else if (Input.GetKeyDown((KeyCode)115) || Input.GetKeyDown((KeyCode)274)) { settingsMenuSelectedIndex++; if (settingsMenuSelectedIndex > 3) { settingsMenuSelectedIndex = 0; } settingsMenuInputIgnoreUntil = Time.unscaledTime + 0.1f; } else if (Input.GetKeyDown((KeyCode)32) || Input.GetKeyDown((KeyCode)13) || Input.GetKeyDown((KeyCode)271)) { ActivateSettingsMenuSelection(settingsMenuSelectedIndex); settingsMenuInputIgnoreUntil = Time.unscaledTime + 0.15f; } } catch { } } private void ActivateSettingsMenuSelection(int index) { switch (index) { case 0: SetUiLanguageEnglish(english: true, showNotice: true); break; case 1: SetUiLanguageEnglish(english: false, showNotice: true); break; case 2: SetSettingsMenuOpen(open: false); OpenTipGuide(); break; default: SetSettingsMenuOpen(open: false); break; } } private void SetSettingsMenuOpen(bool open) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) settingsMenuOpen = open; settingsMenuInputIgnoreUntil = Time.unscaledTime + 0.12f; try { if (open) { settingsMenuSelectedIndex = Mathf.Clamp(settingsMenuSelectedIndex, 0, 3); settingsMenuCursorWasVisible = Cursor.visible; settingsMenuPreviousLockState = Cursor.lockState; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } else { Cursor.visible = settingsMenuCursorWasVisible; Cursor.lockState = settingsMenuPreviousLockState; } } catch { } } public static bool IsSettingsMenuInputBlocked() { try { return (Object)(object)Instance != (Object)null && (Instance.settingsMenuOpen || Instance.tipGuideVisible); } catch { return false; } } private void ApplySettingsMenuMovementBlock() { bool flag = settingsMenuOpen || tipGuideVisible; if (flag) { ApplyMenuMovementZero(); } else { RestoreMenuMovementZero(); } if (!flag) { return; } try { Character localCharacter = Character.localCharacter; if (!((Object)(object)localCharacter == (Object)null) && !((Object)(object)localCharacter.input == (Object)null)) { ClearMovementOnlyInput(localCharacter.input); } } catch { } } private void ApplyMenuMovementZero() { try { Character localCharacter = Character.localCharacter; if (!((Object)(object)localCharacter == (Object)null) && (!menuMovementZeroApplied || !((Object)(object)menuMovementZeroCharacter == (Object)(object)localCharacter))) { RestoreMenuMovementZero(); menuMovementZeroApplied = true; menuMovementZeroCharacter = localCharacter; menuMovementSavedFloatFields.Clear(); menuMovementSavedIntFields.Clear(); SaveAndZeroMovementFieldsRecursive(localCharacter, "Character", 0); if ((Object)(object)localCharacter.data != (Object)null) { SaveAndZeroMovementFieldsRecursive(localCharacter.data, "Character.data", 0); } if ((Object)(object)localCharacter.input != (Object)null) { ClearMovementOnlyInput(localCharacter.input); } } } catch { } } private void RestoreMenuMovementZero() { if (!menuMovementZeroApplied) { return; } try { Character val = menuMovementZeroCharacter; if ((Object)(object)val != (Object)null) { RestoreMovementFieldsRecursive(val, "Character", 0); if ((Object)(object)val.data != (Object)null) { RestoreMovementFieldsRecursive(val.data, "Character.data", 0); } } } catch { } menuMovementZeroApplied = false; menuMovementZeroCharacter = null; menuMovementSavedFloatFields.Clear(); menuMovementSavedIntFields.Clear(); } private bool IsMovementLikeFieldName(string name) { if (string.IsNullOrEmpty(name)) { return false; } string text = name.ToLowerInvariant(); if (text.Contains("move") || text.Contains("walk") || text.Contains("run") || text.Contains("sprint")) { return true; } if (text.Contains("speed") && !text.Contains("audio") && !text.Contains("volume") && !text.Contains("anim")) { return true; } return false; } private void SaveAndZeroMovementFieldsRecursive(object obj, string path, int depth) { if (obj == null || depth > 2) { return; } Type type = obj.GetType(); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { if (fieldInfo == null) { continue; } string text = path + "." + fieldInfo.Name; Type fieldType = fieldInfo.FieldType; try { if (fieldType == typeof(float) && IsMovementLikeFieldName(fieldInfo.Name)) { if (!menuMovementSavedFloatFields.ContainsKey(text)) { menuMovementSavedFloatFields[text] = (float)fieldInfo.GetValue(obj); } fieldInfo.SetValue(obj, 0f); } else if (fieldType == typeof(int) && IsMovementLikeFieldName(fieldInfo.Name)) { if (!menuMovementSavedIntFields.ContainsKey(text)) { menuMovementSavedIntFields[text] = (int)fieldInfo.GetValue(obj); } fieldInfo.SetValue(obj, 0); } else if (depth < 2 && !fieldType.IsPrimitive && fieldType != typeof(string) && IsMovementLikeFieldName(fieldInfo.Name)) { object value = fieldInfo.GetValue(obj); if (value != null) { SaveAndZeroMovementFieldsRecursive(value, text, depth + 1); } } } catch { } } } private void RestoreMovementFieldsRecursive(object obj, string path, int depth) { if (obj == null || depth > 2) { return; } Type type = obj.GetType(); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { if (fieldInfo == null) { continue; } string text = path + "." + fieldInfo.Name; Type fieldType = fieldInfo.FieldType; try { if (fieldType == typeof(float) && menuMovementSavedFloatFields.ContainsKey(text)) { fieldInfo.SetValue(obj, menuMovementSavedFloatFields[text]); } else if (fieldType == typeof(int) && menuMovementSavedIntFields.ContainsKey(text)) { fieldInfo.SetValue(obj, menuMovementSavedIntFields[text]); } else if (depth < 2 && !fieldType.IsPrimitive && fieldType != typeof(string) && IsMovementLikeFieldName(fieldInfo.Name)) { object value = fieldInfo.GetValue(obj); if (value != null) { RestoreMovementFieldsRecursive(value, text, depth + 1); } } } catch { } } } private string LangText(string korean, string english) { return useEnglishUi ? english : korean; } private Texture2D MakeSettingsSolidTex(Color color) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_000e: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(1, 1, (TextureFormat)5, false); val.SetPixel(0, 0, color); val.Apply(); return val; } private string GetEnglishOrdinal(string numberText) { if (!int.TryParse(numberText, out var result)) { return numberText; } int num = Mathf.Abs(result); int num2 = num % 100; string text = "th"; if (num2 < 11 || num2 > 13) { switch (num % 10) { case 1: text = "st"; break; case 2: text = "nd"; break; case 3: text = "rd"; break; } } return result + text; } private string TranslateUiText(string text) { if (!useEnglishUi) { return text; } if (string.IsNullOrEmpty(text)) { return text; } if (UiEnglishExact.TryGetValue(text, out var value)) { return value; } string text2 = text; try { text2 = Regex.Replace(text2, "(\\d+)라운드 결과", "$1 Round Result"); text2 = Regex.Replace(text2, "(\\d+)라운드 종료", "$1 Round End"); text2 = Regex.Replace(text2, "(\\d+)라운드", "Round $1"); text2 = Regex.Replace(text2, "(\\d+)등", (Match m) => GetEnglishOrdinal(m.Groups[1].Value)); } catch { } for (int i = 0; i < UiEnglishReplace.Length; i++) { string key = UiEnglishReplace[i].Key; string value2 = UiEnglishReplace[i].Value; if (!string.IsNullOrEmpty(key) && text2.Contains(key)) { text2 = text2.Replace(key, value2); } } return text2; } private void Update() { if (!enableMod.Value) { FastBlockThirdPersonVInput = false; return; } HandleLanguageSwitchHotkeys(); HandleSettingsMenuHotkey(); if (settingsMenuOpen && !CanOpenSettingsMenuNow()) { SetSettingsMenuOpen(open: false); } HandleSettingsMenuKeyboardInput(); if (!settingsMenuOpen) { HandleTipGuideHotkeys(); } ApplySettingsMenuMovementBlock(); if (settingsMenuOpen || tipGuideVisible) { return; } UpdateFastThirdPersonVInputBlockCache(); bool flag = IsProbablyInIslandMap(); if (!flag) { StopTimingBgm(); StopRoundEndFrontCamera(); StopForcedThirdPersonCamera(); } HandleIslandEntryGlobalSafety(flag); HandleBeachObjectsToggle(); HandleGameStartToggle(); HandleRoundStartToggles(); HandleFlareReadyLocalInput(); HandleRoundVoteLocalInput(); HandleTimingRoundLocalInput(); HandleTimingTickSound(); HandleArrowRoundLocalInput(); HandleRhythmRoundLocalInput(); HandleRound7ButtonMashLocalInput(); HandleRound8StarGridLocalInput(); HandleRound9MemoryLocalInput(); HandleRound10HalliGalliLocalInput(); MaintainRound11DinoHardKeepAlive(); HandleRound11DinoLocalInput(); UpdateLocalDynamiteChargeBarState(); PatchActiveDynamitesForConfiguredExplosionRadius(); ApplyLocalMovementLockIfNeeded(); ApplyRoundEndCameraHardInputLock(); MaintainLocalRound6MoveSpeedBoost(); if (!hostOnly.Value || IsHostOrOffline()) { HandleRound6FallRescueTeleportIfNeeded(); if (gameState == GameState.Running) { CheckRoundProgressAndEliminations(); } HandleRoundEndSafetyWatchdog(); } } private void LateUpdate() { ApplyLocalMovementLockIfNeeded(); ApplyRoundEndCameraHardInputLock(); UpdateRoundEndFrontCamera(); UpdateForcedThirdPersonCamera(); ApplyPodiumTestCameraFallbackAfterExternalCamera(); ApplyRoundEndCameraHardInputLock(); } private void FixedUpdate() { ApplyLocalMovementLockIfNeeded(); ApplyRoundEndCameraHardInputLock(); } private bool ShouldForceThirdPersonCameraNow() { try { if (forceThirdPersonDuringGame == null || !forceThirdPersonDuringGame.Value) { return false; } if (!enableMod.Value) { return false; } if (!IsProbablyInIslandMap()) { return false; } if (roundEndFrontCameraActive) { return false; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null) { return false; } if (localCharacter.inAirport) { return false; } if (localCharacter.data.dead || localCharacter.data.fullyPassedOut) { return false; } if (flareReadyLocalConfirmed) { return true; } } catch { } return false; } private void UpdateForcedThirdPersonCamera() { if (!ShouldForceThirdPersonCameraNow()) { StopForcedThirdPersonCamera(); return; } if (!thirdPersonToggleManagedActive) { thirdPersonToggleWasAlreadyOnBeforePartyGames = TryGetThirdPersonToggleEnabled(out var enabled) && enabled; thirdPersonToggleManagedActive = true; TrySetThirdPersonToggleEnabled(enabled: true); TrySetThirdPersonToggleKeyBlocked(block: true); TrySetThirdPersonToggleDistanceLocked(locked: true); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[ThirdPersonToggle] Ready one-shot ON + key/zoom lock applied. alreadyOn=" + thirdPersonToggleWasAlreadyOnBeforePartyGames)); } forcedThirdPersonCameraActive = false; } private void StopForcedThirdPersonCamera() { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown if (!forcedThirdPersonCameraActive && !thirdPersonToggleManagedActive && !thirdPersonToggleHasOriginalKey && !thirdPersonToggleHasOriginalDistanceValues) { return; } Camera.onPreCull = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPreCull, (Delegate?)new CameraCallback(OnForcedThirdPersonCameraPreCull)); RestoreForcedThirdPersonFovIfNeeded(); forcedThirdPersonCameraActive = false; if (thirdPersonToggleManagedActive) { TrySetThirdPersonToggleDistanceLocked(locked: false); TrySetThirdPersonToggleKeyBlocked(block: false); if (!thirdPersonToggleWasAlreadyOnBeforePartyGames) { TrySetThirdPersonToggleEnabled(enabled: false); } thirdPersonToggleManagedActive = false; thirdPersonToggleWasAlreadyOnBeforePartyGames = false; } else { if (thirdPersonToggleHasOriginalDistanceValues) { TrySetThirdPersonToggleDistanceLocked(locked: false); } if (thirdPersonToggleHasOriginalKey) { TrySetThirdPersonToggleKeyBlocked(block: false); } } } private bool TryResolveThirdPersonToggle() { return false; } private bool TryGetThirdPersonToggleEnabled(out bool enabled) { enabled = false; return false; } private void TrySetThirdPersonToggleEnabled(bool enabled) { } private object GetThirdPersonToggleFieldTarget(FieldInfo field) { return null; } private void TrySetThirdPersonToggleKeyBlocked(bool block) { } private Type GetFieldOrConfigValueType(FieldInfo field, object target) { try { if (field == null) { return null; } Type fieldType = field.FieldType; if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition().FullName == "BepInEx.Configuration.ConfigEntry`1") { return fieldType.GetGenericArguments()[0]; } object value = field.GetValue(target); if (value != null) { PropertyInfo property = value.GetType().GetProperty("Value", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null) { return property.PropertyType; } } return fieldType; } catch { return (field != null) ? field.FieldType : null; } } private object CreateDisabledKeyValue(Type keyType) { try { if (keyType == null) { return null; } if (keyType == typeof(KeyCode)) { return (object)(KeyCode)0; } if (keyType.IsEnum) { try { return Enum.Parse(keyType, "None"); } catch { } try { return Enum.ToObject(keyType, 0); } catch { } } if (keyType.FullName == "BepInEx.Configuration.KeyboardShortcut" || keyType.Name == "KeyboardShortcut") { ConstructorInfo constructor = keyType.GetConstructor(new Type[2] { typeof(KeyCode), typeof(KeyCode[]) }); if (constructor != null) { return constructor.Invoke(new object[2] { (object)(KeyCode)0, new KeyCode[0] }); } constructor = keyType.GetConstructor(new Type[1] { typeof(KeyCode) }); if (constructor != null) { return constructor.Invoke(new object[1] { (object)(KeyCode)0 }); } MethodInfo method = keyType.GetMethod("Empty", BindingFlags.Static | BindingFlags.Public); if (method != null) { return method.Invoke(null, null); } } } catch { } return null; } private bool IsKeyLikeThirdPersonField(FieldInfo field) { if (field == null) { return false; } string text = field.Name.ToLowerInvariant(); return text.Contains("key") || text.Contains("hotkey") || text.Contains("shortcut") || text.Contains("toggle"); } private void TryBlockAdditionalThirdPersonToggleKeyFields(object target, bool block) { try { if (thirdPersonTogglePluginType == null) { return; } FieldInfo[] fields = thirdPersonTogglePluginType.GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { if (fieldInfo == null || fieldInfo == thirdPersonToggleKeyField || !IsKeyLikeThirdPersonField(fieldInfo)) { continue; } object obj = (fieldInfo.IsStatic ? null : target); if (fieldInfo.IsStatic || obj != null) { Type fieldOrConfigValueType = GetFieldOrConfigValueType(fieldInfo, obj); object obj2 = CreateDisabledKeyValue(fieldOrConfigValueType); if (obj2 != null && block) { TryGetFieldOrConfigValue(fieldInfo, obj, out var _); TrySetFieldOrConfigValue(fieldInfo, obj, obj2); } } } } catch { } } private bool TryGetFieldOrConfigValue(FieldInfo field, object target, out object value) { value = null; try { if (field == null) { return false; } if (!field.IsStatic && target == null) { return false; } object value2 = field.GetValue(target); if (value2 == null) { return false; } PropertyInfo property = value2.GetType().GetProperty("Value", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanRead) { value = property.GetValue(value2, null); return true; } value = value2; return true; } catch { return false; } } private bool TrySetFieldOrConfigValue(FieldInfo field, object target, object value) { try { if (field == null) { return false; } if (!field.IsStatic && target == null) { return false; } object value2 = field.GetValue(target); if (value2 != null) { PropertyInfo property = value2.GetType().GetProperty("Value", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanWrite) { object value3 = ConvertValueForType(value, property.PropertyType); property.SetValue(value2, value3, null); return true; } } if (field.FieldType == typeof(float) || field.FieldType == typeof(int) || field.FieldType == typeof(double) || field.FieldType == typeof(bool) || field.FieldType.IsEnum) { object value4 = ConvertValueForType(value, field.FieldType); field.SetValue(target, value4); return true; } } catch { } return false; } private object ConvertValueForType(object value, Type type) { //IL_0130: Unknown result type (might be due to invalid IL or missing references) try { if (type == typeof(float)) { return Convert.ToSingle(value); } if (type == typeof(double)) { return Convert.ToDouble(value); } if (type == typeof(int)) { return Convert.ToInt32(value); } if (type == typeof(bool)) { return Convert.ToBoolean(value); } if (type.IsEnum) { if (value is string) { return Enum.Parse(type, (string)value); } return Enum.ToObject(type, value); } if (type.FullName == "BepInEx.Configuration.KeyboardShortcut" || type.Name == "KeyboardShortcut") { if (value != null && type.IsInstanceOfType(value)) { return value; } if (value is KeyCode) { object obj = CreateDisabledKeyValue(type); if ((int)(KeyCode)value == 0 && obj != null) { return obj; } } object obj2 = CreateDisabledKeyValue(type); if (obj2 != null) { return obj2; } } } catch { } return value; } private bool TryObjectToFloat(object value, out float result) { result = 0f; try { if (value == null) { return false; } result = Convert.ToSingle(value); return true; } catch { return false; } } private float GetThirdPersonToggleLerpRateValue() { return Mathf.Clamp((roundEndFrontCameraSmoothSpeed != null) ? roundEndFrontCameraSmoothSpeed.Value : 18f, 1f, 60f); } private float GetThirdPersonToggleMaxDistanceValue(object target) { return 8f; } private void TrySetThirdPersonToggleDistanceLocked(bool locked) { } internal bool ShouldInterceptPartyGamesCharacterCamera() { try { return roundEndFrontCameraActive && Time.time <= roundEndFrontCameraUntil; } catch { return false; } } internal bool IsPartyGamesMainCameraTarget(MainCameraMovement movement) { try { if ((Object)(object)movement == (Object)null) { return false; } Camera val = null; try { MainCamera component = ((Component)movement).GetComponent(); if ((Object)(object)component != (Object)null) { val = ((Component)component).GetComponent(); if ((Object)(object)val == (Object)null) { val = ((Component)component).GetComponentInChildren(true); } } } catch { } if ((Object)(object)val == (Object)null) { try { val = ((Component)movement).GetComponentInChildren(true); } catch { } } if ((Object)(object)val != (Object)null) { try { if (((Component)val).CompareTag("MainCamera") || ((Component)val).gameObject.CompareTag("MainCamera")) { return true; } } catch { } } try { if ((Object)(object)MainCamera.instance != (Object)null) { Component instance = (Component)(object)MainCamera.instance; if ((Object)(object)instance != (Object)null && ((Object)(object)instance.transform == (Object)(object)((Component)movement).transform || (Object)(object)((Component)movement).GetComponent() == (Object)(object)MainCamera.instance)) { return true; } } } catch { } try { if ((Object)(object)Singleton.Instance == (Object)(object)movement) { return true; } } catch { } } catch { } return false; } internal void ApplyPartyGamesCharacterCameraIntercept(MainCameraMovement movement) { //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)movement == (Object)null) { return; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null) { return; } Transform transform = ((Component)movement).transform; if ((Object)(object)transform == (Object)null) { return; } forcedThirdPersonCameraTransformCache = transform; try { MainCamera component = ((Component)movement).GetComponent(); if ((Object)(object)component != (Object)null) { Camera val = ((Component)component).GetComponent(); if ((Object)(object)val == (Object)null) { val = ((Component)component).GetComponentInChildren(true); } if ((Object)(object)val != (Object)null) { forcedThirdPersonCameraCameraCache = val; } } if ((Object)(object)forcedThirdPersonCameraCameraCache == (Object)null) { forcedThirdPersonCameraCameraCache = ((Component)movement).GetComponentInChildren(true); } } catch { } SaveAndApplyForcedThirdPersonFov(); Vector3 val2 = GetRoundEndCharacterForward(localCharacter); if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f) { val2 = ((Component)localCharacter).transform.forward; } val2.y = 0f; if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f) { val2 = Vector3.forward; } ((Vector3)(ref val2)).Normalize(); Vector3 val3 = Vector3.Cross(Vector3.up, val2); Vector3 val4 = ((Vector3)(ref val3)).normalized; if (((Vector3)(ref val4)).sqrMagnitude < 0.0001f) { val4 = ((Component)localCharacter).transform.right; } Vector3 val5 = localCharacter.Center + Vector3.up * Mathf.Max(0f, thirdPersonCameraLookAtHeight.Value); float num = Mathf.Max(1f, thirdPersonCameraDistance.Value); Vector3 val6 = val5 - val2 * num + Vector3.up * thirdPersonCameraHeightOffset.Value + val4 * thirdPersonCameraSideOffset.Value; if (thirdPersonCameraCollisionCheck.Value) { val6 = ResolveForcedThirdPersonCameraCollision(val5, val6); } transform.position = val6; Vector3 val7 = val5 - transform.position; if (((Vector3)(ref val7)).sqrMagnitude > 0.0001f) { transform.rotation = Quaternion.LookRotation(((Vector3)(ref val7)).normalized, Vector3.up); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[ThirdPersonCameraIntercept] failed: " + ex.GetType().Name + ": " + ex.Message)); } } private void CacheForcedThirdPersonCameraObjects() { Camera val = null; Transform val2 = null; try { if ((Object)(object)MainCamera.instance != (Object)null) { Component instance = (Component)(object)MainCamera.instance; if ((Object)(object)instance != (Object)null) { val2 = instance.transform; val = instance.GetComponent(); if ((Object)(object)val == (Object)null) { val = instance.GetComponentInChildren(true); } } } } catch { } if ((Object)(object)val == (Object)null) { val = Camera.main; } if ((Object)(object)val == (Object)null) { val = Object.FindObjectOfType(); } if ((Object)(object)val2 == (Object)null && (Object)(object)val != (Object)null) { try { MainCamera componentInParent = ((Component)val).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { val2 = ((Component)componentInParent).transform; } } catch { } } if ((Object)(object)val2 == (Object)null && (Object)(object)val != (Object)null) { val2 = ((Component)val).transform; } forcedThirdPersonCameraCameraCache = val; forcedThirdPersonCameraTransformCache = val2; } private void SaveAndApplyForcedThirdPersonFov() { if (thirdPersonCameraUseCustomFov == null || !thirdPersonCameraUseCustomFov.Value) { return; } if ((Object)(object)forcedThirdPersonCameraCameraCache == (Object)null) { CacheForcedThirdPersonCameraObjects(); } if (!((Object)(object)forcedThirdPersonCameraCameraCache == (Object)null)) { if (!forcedThirdPersonHasOriginalFov) { forcedThirdPersonOriginalFov = forcedThirdPersonCameraCameraCache.fieldOfView; forcedThirdPersonHasOriginalFov = true; } forcedThirdPersonCameraCameraCache.fieldOfView = thirdPersonCameraFov.Value; } } private void RestoreForcedThirdPersonFovIfNeeded() { if (!forcedThirdPersonHasOriginalFov) { return; } try { if ((Object)(object)forcedThirdPersonCameraCameraCache == (Object)null) { CacheForcedThirdPersonCameraObjects(); } if ((Object)(object)forcedThirdPersonCameraCameraCache != (Object)null && forcedThirdPersonOriginalFov > 1f) { forcedThirdPersonCameraCameraCache.fieldOfView = forcedThirdPersonOriginalFov; } } catch { } forcedThirdPersonHasOriginalFov = false; forcedThirdPersonOriginalFov = -1f; } private void OnForcedThirdPersonCameraPreCull(Camera cam) { } private void ApplyForcedThirdPersonCameraPose(bool instant) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null) { return; } if ((Object)(object)forcedThirdPersonCameraTransformCache == (Object)null) { CacheForcedThirdPersonCameraObjects(); } Transform val = forcedThirdPersonCameraTransformCache; if (!((Object)(object)val == (Object)null)) { Vector3 val2 = GetRoundEndCharacterForward(localCharacter); if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f) { val2 = ((Component)localCharacter).transform.forward; } val2.y = 0f; if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f) { val2 = Vector3.forward; } ((Vector3)(ref val2)).Normalize(); Vector3 val3 = Vector3.Cross(Vector3.up, val2); Vector3 val4 = ((Vector3)(ref val3)).normalized; if (((Vector3)(ref val4)).sqrMagnitude < 0.0001f) { val4 = ((Component)localCharacter).transform.right; } Vector3 val5 = localCharacter.Center + Vector3.up * Mathf.Max(0f, thirdPersonCameraLookAtHeight.Value); float num = Mathf.Max(1f, thirdPersonCameraDistance.Value); Vector3 val6 = val5 - val2 * num + Vector3.up * thirdPersonCameraHeightOffset.Value + val4 * thirdPersonCameraSideOffset.Value; if (thirdPersonCameraCollisionCheck.Value) { val6 = ResolveForcedThirdPersonCameraCollision(val5, val6); } float num2 = (instant ? 1f : (1f - Mathf.Exp((0f - Mathf.Max(1f, thirdPersonCameraSmoothSpeed.Value)) * Time.unscaledDeltaTime))); val.position = Vector3.Lerp(val.position, val6, num2); Vector3 val7 = val5 - val.position; if (((Vector3)(ref val7)).sqrMagnitude > 0.0001f) { Quaternion val8 = Quaternion.LookRotation(((Vector3)(ref val7)).normalized, Vector3.up); val.rotation = Quaternion.Slerp(val.rotation, val8, num2); } } } private Vector3 ResolveForcedThirdPersonCameraCollision(Vector3 lookTarget, Vector3 desiredPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) Vector3 val = desiredPos - lookTarget; float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude <= 0.05f) { return desiredPos; } int num = -5 & ~LayerMask.GetMask(new string[3] { "Character", "Player", "Ragdoll" }); float num2 = Mathf.Max(0.05f, thirdPersonCameraCollisionRadius.Value); RaycastHit val2 = default(RaycastHit); if (Physics.SphereCast(lookTarget, num2, val / magnitude, ref val2, magnitude, num, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref val2)).point + ((RaycastHit)(ref val2)).normal * Mathf.Max(0.08f, num2 + 0.05f); } return desiredPos; } private bool IsPodiumTestCameraOnlyModeActive() { try { if (!podiumTestCameraOnlyMode) { return false; } if (Time.time > podiumTestCameraOnlyUntil) { podiumTestCameraOnlyMode = false; podiumTestCameraOnlyUntil = -999f; podiumTestCameraMethod = 0; StopPodiumTestDedicatedCamera(); return false; } return true; } catch { return false; } } private void StartRoundEndDedicatedOverlayCameraForSeconds(float seconds) { if (enableMod.Value && CanUseRoundEndFrontCamera() && !((Object)(object)Character.localCharacter == (Object)null)) { roundEndFrontCameraUntil = Time.time + Mathf.Max(0.1f, seconds); roundEndFrontCameraActive = false; podiumTestCameraOnlyMode = true; podiumTestCameraMethod = 2; podiumTestCameraOnlyUntil = Time.time + Mathf.Max(0.1f, seconds); ResetPodiumTestCameraDebugCounters("RoundEnd_DedicatedOverlayCameraStart"); StartPodiumTestDedicatedCameraForSeconds(seconds); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[RoundEndCamera] Dedicated overlay camera started. seconds=" + seconds.ToString("F1") + ", characterUntouched=true, wasdInputBlocked=true")); } } private void StartRoundEndFrontCameraForSeconds(float seconds) { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Expected O, but got Unknown if (enableMod.Value && CanUseRoundEndFrontCamera() && !((Object)(object)Character.localCharacter == (Object)null)) { roundEndFrontCameraUntil = Time.time + Mathf.Max(0.1f, seconds); roundEndFrontCameraActive = true; ResetRoundEndCameraPerfCounters("StartRoundEndFrontCameraForSeconds"); try { roundEndCameraThirdPersonWasOn = TryGetThirdPersonToggleEnabled(out var enabled) && enabled; TrySetThirdPersonToggleEnabled(enabled: false); TrySetThirdPersonToggleKeyBlocked(block: true); roundEndCameraDisabledThirdPersonToggle = true; roundEndCameraThirdPersonOffAppliedOnce = true; roundEndCameraNextThirdPersonOffAttempt = Time.unscaledTime + 0.75f; } catch { } Camera.onPreCull = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPreCull, (Delegate?)new CameraCallback(OnRoundEndFrontCameraPreCull)); if (!IsPodiumTestCameraOnlyModeActive()) { Camera.onPreCull = (CameraCallback)Delegate.Combine((Delegate?)(object)Camera.onPreCull, (Delegate?)new CameraCallback(OnRoundEndFrontCameraPreCull)); } CacheRoundEndCameraObjects(); ResetRoundEndCameraSmoothState(); SaveAndApplyRoundEndCameraFov(); ApplyRoundEndFrontCameraPose(instant: true); ApplyRoundEndCameraHardInputLock(); } } private void StopRoundEndFrontCamera() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown if (!roundEndFrontCameraActive && !roundEndFrontCameraHasOriginalFov && !podiumTestCameraOnlyMode && (Object)(object)podiumTestDedicatedCameraObject == (Object)null) { return; } Camera.onPreCull = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPreCull, (Delegate?)new CameraCallback(OnRoundEndFrontCameraPreCull)); RestoreRoundEndCameraFovIfNeeded(); roundEndFrontCameraActive = false; roundEndFrontCameraUntil = -1f; podiumTestCameraOnlyMode = false; podiumTestCameraOnlyUntil = -999f; podiumTestCameraMethod = 0; StopPodiumTestDedicatedCamera(); podiumTestCameraDebugNextLogTime = -999f; try { if (roundEndCameraDisabledThirdPersonToggle && (roundEndCameraThirdPersonWasOn || ShouldForceThirdPersonCameraNow())) { TrySetThirdPersonToggleEnabled(enabled: true); } } catch { } roundEndCameraDisabledThirdPersonToggle = false; roundEndCameraThirdPersonWasOn = false; roundEndCameraSmoothInitialized = false; roundEndCameraLastSmoothTime = -1f; roundEndCameraThirdPersonOffAppliedOnce = false; roundEndCameraNextThirdPersonOffAttempt = -1f; LogRoundEndCameraPerfSummary("StopRoundEndFrontCamera"); } private void ResetRoundEndCameraPerfCounters(string reason) { roundEndCameraPerfNextLogTime = Time.unscaledTime + 1f; roundEndCameraPerfFrameCount = 0; roundEndCameraPerfPoseCalls = 0; roundEndCameraPerfPreCullCalls = 0; roundEndCameraPerfCharacterCamBlocks = 0; roundEndCameraPerfThirdPersonSuppressCalls = 0; roundEndCameraPerfPoseMsTotal = 0.0; roundEndCameraPerfInputMsTotal = 0.0; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[CAMDBG] camera perf reset reason=" + reason)); } private void TickRoundEndCameraPerfLog() { if (roundEndFrontCameraActive) { roundEndCameraPerfFrameCount++; float unscaledTime = Time.unscaledTime; if (roundEndCameraPerfNextLogTime < 0f) { roundEndCameraPerfNextLogTime = unscaledTime + 1f; } if (!(unscaledTime < roundEndCameraPerfNextLogTime)) { LogRoundEndCameraPerfSummary("1sec"); roundEndCameraPerfNextLogTime = unscaledTime + 1f; roundEndCameraPerfFrameCount = 0; roundEndCameraPerfPoseCalls = 0; roundEndCameraPerfPreCullCalls = 0; roundEndCameraPerfCharacterCamBlocks = 0; roundEndCameraPerfThirdPersonSuppressCalls = 0; roundEndCameraPerfPoseMsTotal = 0.0; roundEndCameraPerfInputMsTotal = 0.0; } } } private void LogRoundEndCameraPerfSummary(string reason) { try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[CAMDBG] reason=" + reason + " frames=" + roundEndCameraPerfFrameCount + " poseCalls=" + roundEndCameraPerfPoseCalls + " poseMs=" + roundEndCameraPerfPoseMsTotal.ToString("F3") + " inputMs=" + roundEndCameraPerfInputMsTotal.ToString("F3") + " preCull=" + roundEndCameraPerfPreCullCalls + " charCamBlocks=" + roundEndCameraPerfCharacterCamBlocks + " tpSuppress=" + roundEndCameraPerfThirdPersonSuppressCalls + " active=" + roundEndFrontCameraActive)); } catch { } } private void ResetRoundEndCameraSmoothState() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)roundEndFrontCameraTransformCache == (Object)null) { CacheRoundEndCameraObjects(); } if ((Object)(object)roundEndFrontCameraTransformCache != (Object)null) { roundEndCameraSmoothPosition = roundEndFrontCameraTransformCache.position; roundEndCameraSmoothRotation = roundEndFrontCameraTransformCache.rotation; roundEndCameraSmoothLookTarget = (((Object)(object)Character.localCharacter != (Object)null) ? GetRoundEndCameraLookTarget(Character.localCharacter) : Vector3.zero); roundEndCameraSmoothInitialized = true; roundEndCameraLastSmoothTime = Time.unscaledTime; } else { roundEndCameraSmoothInitialized = false; roundEndCameraLastSmoothTime = -1f; } } catch { roundEndCameraSmoothInitialized = false; roundEndCameraLastSmoothTime = -1f; } } private void CacheRoundEndCameraObjects() { Camera val = null; Transform val2 = null; try { if ((Object)(object)MainCamera.instance != (Object)null) { Component instance = (Component)(object)MainCamera.instance; if ((Object)(object)instance != (Object)null) { val2 = instance.transform; val = instance.GetComponent(); if ((Object)(object)val == (Object)null) { val = instance.GetComponentInChildren(true); } } } } catch { } if ((Object)(object)val == (Object)null) { val = Camera.main; } if ((Object)(object)val == (Object)null) { val = Object.FindObjectOfType(); } if ((Object)(object)val2 == (Object)null && (Object)(object)val != (Object)null) { try { MainCamera componentInParent = ((Component)val).GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null) { val2 = ((Component)componentInParent).transform; } } catch { } } if ((Object)(object)val2 == (Object)null && (Object)(object)val != (Object)null) { val2 = ((Component)val).transform; } roundEndFrontCameraCameraCache = val; roundEndFrontCameraTransformCache = val2; } private void SaveAndApplyRoundEndCameraFov() { if (!roundEndFrontCameraUseCustomFov.Value) { return; } if ((Object)(object)roundEndFrontCameraCameraCache == (Object)null) { CacheRoundEndCameraObjects(); } if (!((Object)(object)roundEndFrontCameraCameraCache == (Object)null)) { if (!roundEndFrontCameraHasOriginalFov) { roundEndFrontCameraOriginalFov = roundEndFrontCameraCameraCache.fieldOfView; roundEndFrontCameraHasOriginalFov = true; } roundEndFrontCameraCameraCache.fieldOfView = roundEndFrontCameraFov.Value; } } private void RestoreRoundEndCameraFovIfNeeded() { if (!roundEndFrontCameraHasOriginalFov) { return; } try { if ((Object)(object)roundEndFrontCameraCameraCache == (Object)null) { CacheRoundEndCameraObjects(); } if ((Object)(object)roundEndFrontCameraCameraCache != (Object)null && roundEndFrontCameraOriginalFov > 1f) { roundEndFrontCameraCameraCache.fieldOfView = roundEndFrontCameraOriginalFov; } } catch { } roundEndFrontCameraHasOriginalFov = false; roundEndFrontCameraOriginalFov = -1f; } private bool TryGetPodiumTestFixedCameraPose(out Vector3 desiredPos, out Quaternion desiredRot) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) desiredPos = new Vector3(27.5f, 35f, -355f); desiredRot = Quaternion.identity; try { Character localCharacter = Character.localCharacter; Vector3 val = (Vector3)(((Object)(object)localCharacter != (Object)null) ? GetRoundEndCameraLookTarget(localCharacter) : new Vector3(40f, 38.5f, -370f)); Vector3 val2 = val - desiredPos; if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f) { val2 = Vector3.forward; } desiredRot = Quaternion.LookRotation(((Vector3)(ref val2)).normalized, Vector3.up); return true; } catch { desiredRot = Quaternion.LookRotation(Vector3.forward, Vector3.up); return false; } } private void ApplyPodiumTestFixedCameraPoseTo(Transform target, string source) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) try { if (!((Object)(object)target == (Object)null)) { TryGetPodiumTestFixedCameraPose(out var desiredPos, out var desiredRot); target.position = desiredPos; target.rotation = desiredRot; podiumTestCameraDebugPoseCalls++; podiumTestCameraDebugLastAppliedPos = desiredPos; podiumTestCameraDebugLastAppliedRot = desiredRot; LogPodiumTestCameraDebugThrottled(source); } } catch (Exception ex) { try { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[KLCAMDBG] ApplyPodiumTestFixedCameraPoseTo failed: " + ex.GetType().Name + ": " + ex.Message)); } catch { } } } private void StartPodiumTestDedicatedCameraForSeconds(float seconds) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown try { StopPodiumTestDedicatedCamera(); Camera val = null; try { val = Camera.main; } catch { } if ((Object)(object)val == (Object)null) { try { val = roundEndFrontCameraCameraCache; } catch { } } if ((Object)(object)val == (Object)null) { try { val = Object.FindObjectOfType(); } catch { } } podiumTestDedicatedCameraObject = new GameObject("PEAKPartyGames_KL_DedicatedFixedCamera"); Object.DontDestroyOnLoad((Object)(object)podiumTestDedicatedCameraObject); podiumTestDedicatedCamera = podiumTestDedicatedCameraObject.AddComponent(); if ((Object)(object)val != (Object)null) { try { podiumTestDedicatedCamera.CopyFrom(val); } catch { } try { podiumTestDedicatedCamera.depth = val.depth + 100f; } catch { podiumTestDedicatedCamera.depth = 100f; } try { podiumTestDedicatedCamera.fieldOfView = val.fieldOfView; } catch { } try { podiumTestDedicatedCamera.nearClipPlane = val.nearClipPlane; } catch { } try { podiumTestDedicatedCamera.farClipPlane = val.farClipPlane; } catch { } try { podiumTestDedicatedCamera.cullingMask = val.cullingMask; } catch { } } else { podiumTestDedicatedCamera.depth = 100f; podiumTestDedicatedCamera.fieldOfView = 60f; podiumTestDedicatedCamera.nearClipPlane = 0.03f; podiumTestDedicatedCamera.farClipPlane = 1000f; } podiumTestDedicatedCamera.clearFlags = (CameraClearFlags)1; ((Behaviour)podiumTestDedicatedCamera).enabled = true; ApplyPodiumTestFixedCameraPoseTo(((Component)podiumTestDedicatedCamera).transform, "DedicatedCameraStart"); podiumTestCameraOnlyUntil = Time.time + Mathf.Max(0.1f, seconds); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[KLCAMDBG] Dedicated camera started for " + seconds.ToString("F1") + "s. src=" + (((Object)(object)val != (Object)null) ? ((Object)val).name : "null"))); } catch (Exception ex) { try { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[KLCAMDBG] dedicated camera start failed: " + ex.GetType().Name + ": " + ex.Message)); } catch { } } } private void UpdatePodiumTestDedicatedCamera() { try { if (IsPodiumTestCameraOnlyModeActive() && podiumTestCameraMethod == 2 && !((Object)(object)podiumTestDedicatedCamera == (Object)null) && !((Object)(object)podiumTestDedicatedCameraObject == (Object)null)) { podiumTestCameraDebugDedicatedTicks++; ApplyPodiumTestFixedCameraPoseTo(((Component)podiumTestDedicatedCamera).transform, "DedicatedCameraUpdate"); } } catch (Exception ex) { try { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[KLCAMDBG] dedicated camera update failed: " + ex.GetType().Name + ": " + ex.Message)); } catch { } } } private void StopPodiumTestDedicatedCamera() { try { if ((Object)(object)podiumTestDedicatedCameraObject != (Object)null) { Object.Destroy((Object)(object)podiumTestDedicatedCameraObject); } } catch { } podiumTestDedicatedCamera = null; podiumTestDedicatedCameraObject = null; } private void ApplyPodiumTestCameraFallbackAfterExternalCamera() { try { if (!IsPodiumTestCameraOnlyModeActive()) { return; } if (podiumTestCameraMethod == 2) { UpdatePodiumTestDedicatedCamera(); } else if (roundEndFrontCameraActive && !(Time.time > roundEndFrontCameraUntil)) { float num = Time.unscaledTime - podiumTestCameraDebugLastCharacterCamPrefixTime; if (!(num >= 0f) || !(num <= 0.08f)) { podiumTestCameraDebugLateFallbackCalls++; Stopwatch stopwatch = Stopwatch.StartNew(); ApplyRoundEndFrontCameraPose(instant: false); stopwatch.Stop(); roundEndCameraPerfPoseMsTotal += stopwatch.Elapsed.TotalMilliseconds; roundEndCameraPerfPoseCalls++; LogPodiumTestCameraDebugThrottled("LateFallbackApply"); } } } catch (Exception ex) { try { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[KLCAMDBG] late fallback failed: " + ex.GetType().Name + ": " + ex.Message)); } catch { } } } private void UpdateRoundEndFrontCamera() { if (!roundEndFrontCameraActive) { return; } if (Time.time > roundEndFrontCameraUntil || !enableMod.Value || !CanUseRoundEndFrontCamera()) { StopRoundEndFrontCamera(); return; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null || localCharacter.data.dead || localCharacter.data.fullyPassedOut) { StopRoundEndFrontCamera(); return; } Stopwatch stopwatch = Stopwatch.StartNew(); ApplyRoundEndCameraHardInputLock(); stopwatch.Stop(); roundEndCameraPerfInputMsTotal += stopwatch.Elapsed.TotalMilliseconds; if (IsPodiumTestCameraOnlyModeActive()) { podiumTestCameraDebugUpdateTicks++; LogPodiumTestCameraDebugThrottled("UpdateSkip"); TickRoundEndCameraPerfLog(); return; } TryKeepThirdPersonToggleOffForRoundEndCameraThrottled(); Stopwatch stopwatch2 = Stopwatch.StartNew(); ApplyRoundEndFrontCameraPose(instant: false); stopwatch2.Stop(); roundEndCameraPerfPoseMsTotal += stopwatch2.Elapsed.TotalMilliseconds; roundEndCameraPerfPoseCalls++; TickRoundEndCameraPerfLog(); } private void OnRoundEndFrontCameraPreCull(Camera cam) { if (!roundEndFrontCameraActive) { return; } if (IsPodiumTestCameraOnlyModeActive()) { if (podiumTestCameraMethod == 1) { podiumTestCameraDebugPreCullApplyCalls++; ApplyRoundEndFrontCameraPose(instant: false); LogPodiumTestCameraDebugThrottled("PreCullFinalApply"); } else { podiumTestCameraDebugPreCullSkipped++; LogPodiumTestCameraDebugThrottled("PreCullSkip"); } } else if ((Object)(object)roundEndFrontCameraCameraCache == (Object)null || (Object)(object)cam == (Object)(object)roundEndFrontCameraCameraCache || (Object)(object)cam == (Object)(object)Camera.main) { roundEndCameraPerfPreCullCalls++; Stopwatch stopwatch = Stopwatch.StartNew(); ApplyRoundEndFrontCameraPose(instant: false); stopwatch.Stop(); roundEndCameraPerfPoseMsTotal += stopwatch.Elapsed.TotalMilliseconds; roundEndCameraPerfPoseCalls++; } } private void ApplyRoundEndFrontCameraPose(bool instant) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null) { return; } if ((Object)(object)roundEndFrontCameraTransformCache == (Object)null) { CacheRoundEndCameraObjects(); } Transform val = roundEndFrontCameraTransformCache; if ((Object)(object)val == (Object)null) { return; } Vector3 roundEndCameraLookTarget = GetRoundEndCameraLookTarget(localCharacter); Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(27.5f, 35f, -355f); if (IsPodiumTestCameraOnlyModeActive()) { Vector3 val3 = roundEndCameraLookTarget - val2; val.position = val2; if (((Vector3)(ref val3)).sqrMagnitude > 0.0001f) { val.rotation = Quaternion.LookRotation(((Vector3)(ref val3)).normalized, Vector3.up); } podiumTestCameraDebugPoseCalls++; podiumTestCameraDebugLastAppliedPos = val.position; podiumTestCameraDebugLastAppliedRot = val.rotation; LogPodiumTestCameraDebugThrottled("PoseApply"); return; } float unscaledTime = Time.unscaledTime; float num = 0f; num = ((!(roundEndCameraLastSmoothTime > 0f)) ? Mathf.Clamp(Time.unscaledDeltaTime, 0f, 0.05f) : Mathf.Clamp(unscaledTime - roundEndCameraLastSmoothTime, 0f, 0.05f)); roundEndCameraLastSmoothTime = unscaledTime; if (!roundEndCameraSmoothInitialized) { roundEndCameraSmoothPosition = val.position; roundEndCameraSmoothRotation = val.rotation; roundEndCameraSmoothLookTarget = roundEndCameraLookTarget; roundEndCameraSmoothInitialized = true; } float thirdPersonToggleLerpRateValue = GetThirdPersonToggleLerpRateValue(); float num2 = (instant ? 1f : (1f - Mathf.Exp((0f - thirdPersonToggleLerpRateValue) * num))); float num3 = (instant ? 1f : (1f - Mathf.Exp((0f - thirdPersonToggleLerpRateValue * 0.85f) * num))); roundEndCameraSmoothLookTarget = Vector3.Lerp(roundEndCameraSmoothLookTarget, roundEndCameraLookTarget, Mathf.Clamp01(num3)); Vector3 val4 = roundEndCameraSmoothLookTarget - val2; Quaternion val5 = val.rotation; if (((Vector3)(ref val4)).sqrMagnitude > 0.0001f) { val5 = Quaternion.LookRotation(((Vector3)(ref val4)).normalized, Vector3.up); } roundEndCameraSmoothPosition = Vector3.Lerp(roundEndCameraSmoothPosition, val2, Mathf.Clamp01(num2)); roundEndCameraSmoothRotation = Quaternion.Slerp(roundEndCameraSmoothRotation, val5, Mathf.Clamp01(num2)); val.position = roundEndCameraSmoothPosition; val.rotation = roundEndCameraSmoothRotation; if (!IsPodiumTestCameraOnlyModeActive()) { LockLocalCharacterFacingRoundEndCamera(localCharacter, val2); } } private void ResetPodiumTestCameraDebugCounters(string reason) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) try { podiumTestCameraDebugNextLogTime = Time.unscaledTime + 0.15f; podiumTestCameraDebugPoseCalls = 0; podiumTestCameraDebugCharacterCamPrefixCalls = 0; podiumTestCameraDebugCharacterCamBlockedCalls = 0; podiumTestCameraDebugUpdateTicks = 0; podiumTestCameraDebugPreCullSkipped = 0; podiumTestCameraDebugLastCharacterCamPrefixTime = -999f; podiumTestCameraDebugLateFallbackCalls = 0; podiumTestCameraDebugDedicatedTicks = 0; podiumTestCameraDebugPreCullApplyCalls = 0; podiumTestCameraDebugLastAppliedPos = Vector3.zero; podiumTestCameraDebugLastAppliedRot = Quaternion.identity; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[KLCAMDBG] reset reason=" + reason + " roundEndActive=" + roundEndFrontCameraActive + " cameraOnly=" + podiumTestCameraOnlyMode + " method=" + podiumTestCameraMethod)); } catch { } } private string Vec3Str(Vector3 v) { return "(" + v.x.ToString("F2") + "," + v.y.ToString("F2") + "," + v.z.ToString("F2") + ")"; } private string RotStr(Quaternion q) { //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) try { Vector3 eulerAngles = ((Quaternion)(ref q)).eulerAngles; return "(" + eulerAngles.x.ToString("F1") + "," + eulerAngles.y.ToString("F1") + "," + eulerAngles.z.ToString("F1") + ")"; } catch { return "(rot-err)"; } } private void LogPodiumTestCameraDebugThrottled(string source) { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) try { if (!IsPodiumTestCameraOnlyModeActive()) { return; } float unscaledTime = Time.unscaledTime; if (unscaledTime < podiumTestCameraDebugNextLogTime) { return; } podiumTestCameraDebugNextLogTime = unscaledTime + 0.25f; Camera val = roundEndFrontCameraCameraCache; Transform val2 = roundEndFrontCameraTransformCache; if ((Object)(object)val == (Object)null || (Object)(object)val2 == (Object)null) { try { CacheRoundEndCameraObjects(); } catch { } val = roundEndFrontCameraCameraCache; val2 = roundEndFrontCameraTransformCache; } Character localCharacter = Character.localCharacter; Vector3 val3 = Vector3.zero; Vector3 v = Vector3.zero; Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(27.5f, 35f, -355f); if ((Object)(object)localCharacter != (Object)null) { try { val3 = localCharacter.Center; } catch { try { val3 = ((Component)localCharacter).transform.position; } catch { } } try { v = GetRoundEndCameraLookTarget(localCharacter); } catch { v = val3; } } Vector3 val5 = (((Object)(object)val2 != (Object)null) ? val2.position : Vector3.zero); Quaternion q = (((Object)(object)val2 != (Object)null) ? val2.rotation : Quaternion.identity); float num = (((Object)(object)val2 != (Object)null) ? Vector3.Distance(val5, val4) : (-1f)); float num2 = (((Object)(object)val2 != (Object)null) ? Vector3.Distance(val5, podiumTestCameraDebugLastAppliedPos) : (-1f)); bool flag = false; try { if ((Object)(object)val != (Object)null) { flag = ((Component)val).CompareTag("MainCamera") || ((Component)val).gameObject.CompareTag("MainCamera"); } } catch { } string text = (((Object)(object)val != (Object)null) ? ((Object)val).name : "null"); string text2 = (((Object)(object)val2 != (Object)null) ? ((Object)val2).name : "null"); string text3 = (((Object)(object)podiumTestDedicatedCamera != (Object)null) ? ((Object)podiumTestDedicatedCamera).name : "null"); Vector3 v2 = (((Object)(object)podiumTestDedicatedCamera != (Object)null) ? ((Component)podiumTestDedicatedCamera).transform.position : Vector3.zero); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[KLCAMDBG] src=" + source + " active=" + roundEndFrontCameraActive + " until=" + (roundEndFrontCameraUntil - Time.time).ToString("F2") + " camOnly=" + podiumTestCameraOnlyMode + " method=" + podiumTestCameraMethod + " charCamPrefix=" + podiumTestCameraDebugCharacterCamPrefixCalls + " charCamBlocked=" + podiumTestCameraDebugCharacterCamBlockedCalls + " pose=" + podiumTestCameraDebugPoseCalls + " updateSkip=" + podiumTestCameraDebugUpdateTicks + " preCullSkip=" + podiumTestCameraDebugPreCullSkipped + " preCullApply=" + podiumTestCameraDebugPreCullApplyCalls + " lateFallback=" + podiumTestCameraDebugLateFallbackCalls + " dedicatedTicks=" + podiumTestCameraDebugDedicatedTicks + " lastCharCamAge=" + (Time.unscaledTime - podiumTestCameraDebugLastCharacterCamPrefixTime).ToString("F3") + " cam=" + text + " root=" + text2 + " dedicated=" + text3 + " dedicatedPos=" + Vec3Str(v2) + " mainTag=" + flag + " camPos=" + Vec3Str(val5) + " fixedPos=" + Vec3Str(val4) + " distFixed=" + num.ToString("F3") + " distLast=" + num2.ToString("F3") + " camRot=" + RotStr(q) + " lastRot=" + RotStr(podiumTestCameraDebugLastAppliedRot) + " charCenter=" + Vec3Str(val3) + " lookTarget=" + Vec3Str(v))); } catch (Exception ex) { try { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[KLCAMDBG] log failed: " + ex.GetType().Name + ": " + ex.Message)); } catch { } } } private void LockLocalCharacterFacingRoundEndCamera(Character character, Vector3 cameraPos) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)character == (Object)null) { return; } Vector3 val; try { val = character.Center; } catch { val = ((Component)character).transform.position; } Vector3 val2 = cameraPos - val; val2.y = 0f; if (((Vector3)(ref val2)).sqrMagnitude < 0.0001f) { return; } Vector3 normalized = ((Vector3)(ref val2)).normalized; Quaternion rotation = Quaternion.LookRotation(normalized, Vector3.up); try { ((Component)character).transform.rotation = rotation; } catch { } try { if ((Object)(object)character.data != (Object)null) { Vector3 lookDirection = cameraPos + Vector3.up * 0.8f - val; if (((Vector3)(ref lookDirection)).sqrMagnitude < 0.0001f) { lookDirection = normalized; } ((Vector3)(ref lookDirection)).Normalize(); character.data.lookDirection = lookDirection; character.data.lookDirection_Flat = normalized; CharacterData data = character.data; Vector3 val3 = Vector3.Cross(Vector3.up, normalized); data.lookDirection_Right = ((Vector3)(ref val3)).normalized; CharacterData data2 = character.data; val3 = Vector3.Cross(character.data.lookDirection, character.data.lookDirection_Right); data2.lookDirection_Up = ((Vector3)(ref val3)).normalized; character.data.worldMovementInput = Vector3.zero; character.data.worldMovementInput_Grounded = Vector3.zero; character.data.worldMovementInput_Lerp = Vector3.zero; } } catch { } try { if (character.refs != null && (Object)(object)character.refs.rigCreator != (Object)null) { ((Component)character.refs.rigCreator).transform.rotation = rotation; } } catch { } } catch { } } private bool ShouldHardLockRoundEndCameraInputNow() { try { if (!roundEndFrontCameraActive) { return false; } if (!enableMod.Value) { return false; } if (Time.time > roundEndFrontCameraUntil) { return false; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null) { return false; } if (localCharacter.inAirport) { return false; } if (localCharacter.data.dead || localCharacter.data.fullyPassedOut) { return false; } return true; } catch { return false; } } private bool IsLocalCharacterInputOwner(CharacterInput input) { try { if ((Object)(object)input == (Object)null) { return false; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null) { return false; } Character val = null; try { val = ((Component)input).GetComponentInParent(); } catch { } if ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)localCharacter) { return false; } return true; } catch { return false; } } internal bool ShouldHardBlockRoundEndCameraInput(CharacterInput input) { return ShouldHardLockRoundEndCameraInputNow() && IsLocalCharacterInputOwner(input); } internal static void ClearRoundEndCameraInput(CharacterInput input) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)input == (Object)null) { return; } ClearMovementOnlyInput(input); try { input.lookInput = Vector2.zero; } catch { } try { input.scrollInput = 0f; } catch { } try { input.scrollBackwardWasPressed = false; } catch { } try { input.scrollForwardWasPressed = false; } catch { } try { input.scrollBackwardIsPressed = false; } catch { } try { input.scrollForwardIsPressed = false; } catch { } try { input.usePrimaryWasPressed = false; } catch { } try { input.usePrimaryIsPressed = false; } catch { } try { input.usePrimaryWasReleased = false; } catch { } try { input.useSecondaryWasPressed = false; } catch { } try { input.useSecondaryIsPressed = false; } catch { } try { input.useSecondaryWasReleased = false; } catch { } try { input.dropWasPressed = false; } catch { } try { input.dropIsPressed = false; } catch { } try { input.dropWasReleased = false; } catch { } try { input.pingWasPressed = false; } catch { } } private void ApplyRoundEndCameraHardInputLock() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) if (!ShouldHardLockRoundEndCameraInputNow()) { return; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null) { return; } Vector3 cameraPos = default(Vector3); ((Vector3)(ref cameraPos))..ctor(27.5f, 35f, -355f); try { if ((Object)(object)localCharacter.input != (Object)null) { ClearRoundEndCameraInput(localCharacter.input); } } catch { } if (!IsPodiumTestCameraOnlyModeActive()) { LockLocalCharacterFacingRoundEndCamera(localCharacter, cameraPos); } } private Vector3 GetRoundEndCharacterForward(Character character) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; try { if (character.refs != null && (Object)(object)character.refs.rigCreator != (Object)null) { val = ((Component)character.refs.rigCreator).transform.forward; } } catch { } if (((Vector3)(ref val)).sqrMagnitude < 0.0001f) { try { Vector3 lookDirection_Flat = character.data.lookDirection_Flat; if (((Vector3)(ref lookDirection_Flat)).sqrMagnitude > 0.0001f) { val = lookDirection_Flat; } } catch { } } if (((Vector3)(ref val)).sqrMagnitude < 0.0001f) { try { if (character.refs != null && (Object)(object)character.refs.animationLookTransform != (Object)null) { val = character.refs.animationLookTransform.forward; } } catch { } } if (((Vector3)(ref val)).sqrMagnitude < 0.0001f) { val = ((Component)character).transform.forward; } val.y = 0f; if (((Vector3)(ref val)).sqrMagnitude < 0.0001f) { val = Vector3.forward; } return ((Vector3)(ref val)).normalized; } private Vector3 GetRoundEndCameraLookTarget(Character character) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return Vector3.zero; } return character.Center + Vector3.up * ((roundEndFrontCameraLookAtHeight != null) ? roundEndFrontCameraLookAtHeight.Value : 1.2f); } private Vector3 ResolveRoundEndCameraCollision(Vector3 lookTarget, Vector3 desiredPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) Vector3 val = desiredPos - lookTarget; float magnitude = ((Vector3)(ref val)).magnitude; if (magnitude <= 0.05f) { return desiredPos; } int num = -5 & ~LayerMask.GetMask(new string[3] { "Character", "Player", "Ragdoll" }); RaycastHit val2 = default(RaycastHit); if (Physics.SphereCast(lookTarget, Mathf.Max(0.05f, roundEndFrontCameraCollisionRadius.Value), val / magnitude, ref val2, magnitude, num, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref val2)).point + ((RaycastHit)(ref val2)).normal * Mathf.Max(0.08f, roundEndFrontCameraCollisionRadius.Value + 0.05f); } return desiredPos; } private bool ShouldLockLocalMovement() { if (!enableMod.Value) { return false; } if ((Object)(object)Character.localCharacter == (Object)null) { return false; } if (Character.localCharacter.inAirport) { return false; } if (settingsMenuOpen || tipGuideVisible) { return true; } if (!IsProbablyInIslandMap()) { return false; } if (flareReadyActive) { return true; } if (IsPodiumTestCameraOnlyModeActive() && podiumTestCameraMethod == 2) { return true; } if (roundVoteActive) { return true; } if (Time.time < roundBetweenMovementLockUntil) { return true; } if (gameState == GameState.RoundEnding) { return true; } if (roundFinishInProgress) { return true; } if (roundResultPanelActive) { return true; } if (roundEndEmoteRoutine != null) { return true; } if (autoScoreboardUntil > Time.time) { return true; } if (roundEndStartedAt > 0f) { return true; } if (gameState != GameState.RoundStarting && gameState != GameState.Running) { return false; } return IsFixedPositionRound(currentRoundType); } internal bool ShouldHardBlockLocalMovementInput(CharacterInput input) { try { if (!ShouldLockLocalMovement()) { return false; } if ((Object)(object)input == (Object)null) { return false; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null) { return false; } Character val = null; try { val = ((Component)input).GetComponentInParent(); } catch { } if ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)localCharacter) { return false; } return true; } catch { return false; } } internal static void ClearMovementOnlyInput(CharacterInput input) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)input == (Object)null) { return; } try { input.movementInput = Vector2.zero; } catch { } try { input.sprintWasPressed = false; } catch { } try { input.sprintIsPressed = false; } catch { } try { input.sprintToggleWasPressed = false; } catch { } try { input.sprintToggleIsPressed = false; } catch { } try { input.jumpWasPressed = false; } catch { } try { input.jumpIsPressed = false; } catch { } try { input.crouchWasPressed = false; } catch { } try { input.crouchIsPressed = false; } catch { } try { input.crouchToggleWasPressed = false; } catch { } } private bool IsFixedPositionRound(RoundGameType roundType) { return roundType == RoundGameType.ShelfHook || roundType == RoundGameType.BounceFrisbee || roundType == RoundGameType.RhythmGame || roundType == RoundGameType.ButtonMashRace || roundType == RoundGameType.StarGrid || roundType == RoundGameType.MemoryMatch || roundType == RoundGameType.HalliGalli || roundType == RoundGameType.DinoRun; } private void ResetLocalMovementLockAnchor() { localMovementLockAnchored = false; localMovementLockRoundIndex = -999; } private void ApplyLocalMovementLockIfNeeded() { if (!ShouldLockLocalMovement()) { ResetLocalMovementLockAnchor(); return; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null) { return; } if (!localMovementLockAnchored || localMovementLockRoundIndex != currentRoundIndex || localMovementLockRoundType != currentRoundType) { localMovementLockAnchored = true; localMovementLockRoundIndex = currentRoundIndex; localMovementLockRoundType = currentRoundType; } try { if ((Object)(object)localCharacter.input != (Object)null) { ClearMovementOnlyInput(localCharacter.input); } } catch { } } private void DrawSettingsTopLeftHint() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) try { if (CanOpenSettingsMenuNow()) { if (settingsMenuHintTopLeftStyle == null) { settingsMenuHintTopLeftStyle = new GUIStyle(GUI.skin.label); settingsMenuHintTopLeftStyle.alignment = (TextAnchor)0; settingsMenuHintTopLeftStyle.fontSize = 18; settingsMenuHintTopLeftStyle.fontStyle = (FontStyle)1; settingsMenuHintTopLeftStyle.normal.textColor = Color.white; } DrawOutlinedLabel(new Rect(12f, 10f, 260f, 28f), "[ ~ ] : Game Menu", settingsMenuHintTopLeftStyle, Color.white, Color.black, 1.5f); } } catch { } } private void EnsureSettingsMenuStyles() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Expected O, but got Unknown //IL_02a6: Unknown result type (might be due to invalid IL or missing references) if (settingsMenuPanelStyle == null) { settingsMenuPanelStyle = new GUIStyle(GUI.skin.box); settingsMenuPanelStyle.alignment = (TextAnchor)1; settingsMenuPanelStyle.padding = new RectOffset(20, 20, 20, 20); settingsMenuPanelStyle.normal.background = MakeSettingsSolidTex(new Color(0f, 0f, 0f, 0.84f)); } if (settingsMenuTitleStyle == null) { settingsMenuTitleStyle = new GUIStyle(GUI.skin.label); settingsMenuTitleStyle.alignment = (TextAnchor)4; settingsMenuTitleStyle.fontSize = 30; settingsMenuTitleStyle.fontStyle = (FontStyle)1; settingsMenuTitleStyle.normal.textColor = Color.white; settingsMenuTitleStyle.wordWrap = true; } if (settingsMenuButtonStyle == null) { settingsMenuButtonStyle = new GUIStyle(GUI.skin.button); settingsMenuButtonStyle.alignment = (TextAnchor)4; settingsMenuButtonStyle.fontSize = 22; settingsMenuButtonStyle.fontStyle = (FontStyle)1; settingsMenuButtonStyle.wordWrap = true; settingsMenuButtonStyle.padding = new RectOffset(8, 8, 8, 8); } if (settingsMenuSelectedButtonStyle == null) { settingsMenuSelectedButtonStyle = new GUIStyle(GUI.skin.button); settingsMenuSelectedButtonStyle.alignment = (TextAnchor)4; settingsMenuSelectedButtonStyle.fontSize = 26; settingsMenuSelectedButtonStyle.fontStyle = (FontStyle)1; settingsMenuSelectedButtonStyle.wordWrap = true; settingsMenuSelectedButtonStyle.padding = new RectOffset(8, 8, 8, 8); settingsMenuSelectedButtonStyle.normal.textColor = new Color(1f, 0.88f, 0.18f, 1f); settingsMenuSelectedButtonStyle.hover.textColor = new Color(1f, 0.88f, 0.18f, 1f); settingsMenuSelectedButtonStyle.active.textColor = new Color(1f, 0.88f, 0.18f, 1f); } if (settingsMenuSmallStyle == null) { settingsMenuSmallStyle = new GUIStyle(GUI.skin.label); settingsMenuSmallStyle.alignment = (TextAnchor)4; settingsMenuSmallStyle.fontSize = 15; settingsMenuSmallStyle.normal.textColor = new Color(1f, 1f, 1f, 0.9f); settingsMenuSmallStyle.wordWrap = true; } } private void DrawSettingsMenu() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) EnsureSettingsMenuStyles(); float num = Mathf.Min(720f, (float)Screen.width * 0.88f); float num2 = 500f; float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num2) * 0.5f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num3, num4, num, num2); GUI.Box(val, GUIContent.none, settingsMenuPanelStyle); GUI.Label(new Rect(num3 + 24f, num4 + 24f, num - 48f, 48f), LangText("PEAK Party Games 설정", "PEAK Party Games Settings"), settingsMenuTitleStyle); GUI.Label(new Rect(num3 + 30f, num4 + 72f, num - 60f, 30f), LangText("W/S로 이동하고 Space로 결정합니다.", "Use W/S to move and Space to select."), settingsMenuSmallStyle); float num5 = num3 + 90f; float num6 = num - 180f; float num7 = 64f; float num8 = num4 + 124f; DrawSettingsMenuButton(0, new Rect(num5, num8, num6, num7), "English"); num8 += 76f; DrawSettingsMenuButton(1, new Rect(num5, num8, num6, num7), "한국어"); num8 += 76f; DrawSettingsMenuButton(2, new Rect(num5, num8, num6, num7), LangText("TIP 보기", "Open TIP Guide")); num8 += 76f; DrawSettingsMenuButton(3, new Rect(num5, num8, num6, num7), LangText("닫기", "Close")); GUI.Label(new Rect(num3 + 24f, num4 + num2 - 66f, num - 48f, 26f), "W=UP / S=DOWN / SPACE=ENTER", settingsMenuSmallStyle); GUI.Label(new Rect(num3 + 24f, num4 + num2 - 38f, num - 48f, 26f), LangText("` / ~ / ESC 키를 누르면 설정창이 닫힙니다.", "Press ` / ~ / ESC to close this settings menu."), settingsMenuSmallStyle); } private void DrawSettingsMenuButton(int index, Rect rect, string text) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) bool flag = settingsMenuSelectedIndex == index; GUIStyle val = ((flag && settingsMenuSelectedButtonStyle != null) ? settingsMenuSelectedButtonStyle : settingsMenuButtonStyle); string text2 = (flag ? "▶ " : " "); string text3 = (flag ? " ◀" : " "); GUI.Button(rect, text2 + text + text3, val); } private void HandleTipGuideOnGUIKeyClose() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Invalid comparison between Unknown and I4 //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Invalid comparison between Unknown and I4 //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Invalid comparison between Unknown and I4 //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Invalid comparison between Unknown and I4 if (!tipGuideVisible || Time.unscaledTime < tipGuideInputIgnoreUntil) { return; } try { Event current = Event.current; if (current != null && (int)current.type == 4 && (int)current.keyCode != 97 && (int)current.keyCode != 100 && (int)current.keyCode != 0) { tipGuideVisible = false; tipGuidePage = 0; tipGuideInputIgnoreUntil = Time.unscaledTime + 0.15f; current.Use(); } } catch { } } private void OnGUI() { //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) HandleTipGuideOnGUIKeyClose(); DrawSettingsTopLeftHint(); if (settingsMenuOpen) { DrawSettingsMenu(); return; } DrawLanguageSwitchNotice(); if (tipGuideVisible) { DrawTipGuideUI(); return; } DrawScoreboardUI(); DrawRoundResultPanelUI(); DrawFinalScoreboardUI(); DrawFlareReadyUI(); if (flareReadyActive) { return; } DrawRoundVoteSelectionUI(); if (roundVoteActive && Time.time > roundVoteEndTime + 0.5f) { roundVoteActive = false; roundVoteLocalChoice = -1; roundVoteLocalHoverChoice = 1; } if (roundVoteActive) { return; } if (round11DinoActive) { DrawRound11DinoRunUI(); } if (!ShouldShowGameUI()) { return; } DrawLeftPointUI(); DrawDynamiteChargeBarUI(); DrawRound6AnswerGaugeUI(); DrawRound7ButtonMashUI(); DrawRound8StarGridUI(); DrawRound9MemoryMatchUI(); DrawRound10HalliGalliUI(); DrawRoundIntroDescriptionUI(); DrawStandingTileTimerUI(); DrawTimingRoundUI(); DrawArrowRoundUI(); DrawRhythmRoundUI(); if (string.IsNullOrEmpty(centerNoticeText) || Time.time > centerNoticeUntil) { return; } if (centerNoticeStyle == null) { centerNoticeStyle = new GUIStyle(GUI.skin.label); centerNoticeStyle.alignment = (TextAnchor)4; centerNoticeStyle.fontStyle = (FontStyle)1; centerNoticeStyle.normal.textColor = Color.white; } bool flag = centerNoticeRoundEndStyle || centerNoticeText.Contains("라운드 종료"); centerNoticeStyle.fontSize = (flag ? Mathf.Max(10, Mathf.RoundToInt((float)centerNoticeFontSize.Value * 0.76f)) : Mathf.Max(10, centerNoticeFontSize.Value)); centerNoticeStyle.fontStyle = (FontStyle)(flag ? 1 : 1); centerNoticeStyle.font = (flag ? GetRoundEndNoticeFont() : null); float num = (flag ? (centerNoticeTextY.Value + 84f) : centerNoticeTextY.Value); Rect val = (flag ? new Rect(0f, num, (float)Screen.width, 300f) : new Rect(0f, num, (float)Screen.width, 180f)); Color val2 = centerNoticeColor; if (flag) { float num2 = centerNoticeUntil - Time.time; float num3 = Mathf.Clamp01(num2 / 1.85f); val2.a *= num3; } if (centerNoticeThickRounded && !flag) { DrawOutlinedLabel(val, centerNoticeText, centerNoticeStyle, val2, new Color(0f, 0f, 0f, 0.85f * val2.a), 4f); } else { centerNoticeStyle.normal.textColor = val2; if (flag) { DrawRoundEndNoticeSplit(val, centerNoticeText, centerNoticeStyle, val2); } else { GUI.Label(val, TranslateUiText(centerNoticeText), centerNoticeStyle); } } centerNoticeStyle.font = null; } private void DrawLanguageSwitchNotice() { //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0085: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(languageSwitchNoticeText) && !(Time.time > languageSwitchNoticeUntil)) { if (languageSwitchNoticeStyle == null) { languageSwitchNoticeStyle = new GUIStyle(GUI.skin.label); languageSwitchNoticeStyle.alignment = (TextAnchor)4; languageSwitchNoticeStyle.fontStyle = (FontStyle)1; languageSwitchNoticeStyle.fontSize = 32; languageSwitchNoticeStyle.normal.textColor = Color.white; languageSwitchNoticeStyle.wordWrap = false; languageSwitchNoticeStyle.clipping = (TextClipping)0; } languageSwitchNoticeStyle.fontSize = Mathf.Clamp(Mathf.RoundToInt((float)Screen.height * 0.038f), 22, 38); float num = languageSwitchNoticeUntil - Time.time; Color white = Color.white; white.a = Mathf.Clamp01(num / 0.45f); Rect rect = default(Rect); ((Rect)(ref rect))..ctor(0f, Mathf.Max(28f, (float)Screen.height * 0.075f), (float)Screen.width, 72f); DrawOutlinedLabel(rect, languageSwitchNoticeText, languageSwitchNoticeStyle, white, new Color(0f, 0f, 0f, 0.85f * white.a), 3f); } } private void DrawTipGuideUI() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) if (tipGuideVisible) { if (tipGuideTitleStyle == null) { tipGuideTitleStyle = new GUIStyle(GUI.skin.label); tipGuideTitleStyle.alignment = (TextAnchor)4; tipGuideTitleStyle.fontStyle = (FontStyle)1; tipGuideTitleStyle.fontSize = 30; tipGuideTitleStyle.normal.textColor = Color.white; tipGuideTitleStyle.wordWrap = true; } if (tipGuideBodyStyle == null) { tipGuideBodyStyle = new GUIStyle(GUI.skin.label); tipGuideBodyStyle.alignment = (TextAnchor)0; tipGuideBodyStyle.fontStyle = (FontStyle)1; tipGuideBodyStyle.fontSize = 20; tipGuideBodyStyle.normal.textColor = Color.white; tipGuideBodyStyle.wordWrap = true; tipGuideBodyStyle.richText = false; } if (tipGuideFooterStyle == null) { tipGuideFooterStyle = new GUIStyle(GUI.skin.label); tipGuideFooterStyle.alignment = (TextAnchor)4; tipGuideFooterStyle.fontStyle = (FontStyle)1; tipGuideFooterStyle.fontSize = 17; tipGuideFooterStyle.normal.textColor = new Color(0.92f, 0.92f, 0.92f, 1f); tipGuideFooterStyle.wordWrap = true; } Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.78f); GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; float num = Mathf.Min((float)Screen.width * 0.86f, 980f); float num2 = Mathf.Min((float)Screen.height * 0.82f, 720f); Rect val = default(Rect); ((Rect)(ref val))..ctor(((float)Screen.width - num) * 0.5f, ((float)Screen.height - num2) * 0.5f, num, num2); GUI.color = new Color(0.05f, 0.06f, 0.08f, 0.94f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.18f); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, ((Rect)(ref val)).width, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).yMax - 3f, ((Rect)(ref val)).width, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, 3f, ((Rect)(ref val)).height), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val)).xMax - 3f, ((Rect)(ref val)).y, 3f, ((Rect)(ref val)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; Rect rect = default(Rect); ((Rect)(ref rect))..ctor(((Rect)(ref val)).x + 24f, ((Rect)(ref val)).y + 22f, ((Rect)(ref val)).width - 48f, 54f); DrawOutlinedLabel(rect, GetTipGuideTitle(), tipGuideTitleStyle, Color.white, new Color(0f, 0f, 0f, 0.85f), 2f); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref val)).x + 42f, ((Rect)(ref val)).y + 92f, ((Rect)(ref val)).width - 84f, ((Rect)(ref val)).height - 190f); GUI.Label(val2, GetTipGuidePageText(tipGuidePage), tipGuideBodyStyle); int tipGuidePageCount = GetTipGuidePageCount(); string text = (useEnglishUi ? ("A: Previous Page D: Next Page " + (tipGuidePage + 1) + " / " + tipGuidePageCount) : ("A: 전 페이지 D: 다음 페이지 " + (tipGuidePage + 1) + " / " + tipGuidePageCount)); Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(((Rect)(ref val)).x + 24f, ((Rect)(ref val)).yMax - 92f, ((Rect)(ref val)).width - 48f, 30f); GUI.Label(val3, text, tipGuideFooterStyle); string text2 = (useEnglishUi ? "Press any key to close TIP" : "아무키나 눌러서 TIP을 종료합니다"); Rect val4 = default(Rect); ((Rect)(ref val4))..ctor(((Rect)(ref val)).x + 24f, ((Rect)(ref val)).yMax - 56f, ((Rect)(ref val)).width - 48f, 34f); GUI.Label(val4, text2, tipGuideFooterStyle); } } private void DrawRoundEndNoticeSplit(Rect rect, string text, GUIStyle baseStyle, Color drawColor) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Expected O, but got Unknown //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) text = TranslateUiText(text); string text2 = text; string text3 = ""; int num = text.IndexOf('\n'); if (num >= 0) { text2 = text.Substring(0, num).Trim(); text3 = text.Substring(num + 1).Trim(); } GUIStyle val = new GUIStyle(baseStyle); val.alignment = (TextAnchor)4; val.fontStyle = (FontStyle)1; val.font = GetRoundEndNoticeFont(); val.fontSize = Mathf.Max(10, Mathf.RoundToInt((float)centerNoticeFontSize.Value * 0.7f)); val.normal.textColor = drawColor; val.clipping = (TextClipping)0; val.wordWrap = false; val.richText = false; GUIStyle val2 = new GUIStyle(val); val2.fontSize = Mathf.Max(10, Mathf.RoundToInt((float)val.fontSize * 0.72f)); val2.normal.textColor = drawColor; val2.clipping = (TextClipping)0; val2.wordWrap = false; val2.richText = false; float num2 = Mathf.Max(96f, (float)val.fontSize * 1.55f); float num3 = Mathf.Max(76f, (float)val2.fontSize * 1.6f); Rect rect2 = default(Rect); ((Rect)(ref rect2))..ctor(((Rect)(ref rect)).x, ((Rect)(ref rect)).y - 10f, ((Rect)(ref rect)).width, num2); Rect rect3 = default(Rect); ((Rect)(ref rect3))..ctor(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + num2 - 24f, ((Rect)(ref rect)).width, num3); DrawSoftBoldLabel(rect2, text2, val, drawColor, 0.85f, 0.35f); if (!string.IsNullOrEmpty(text3)) { DrawSoftBoldLabel(rect3, text3, val2, drawColor, 0.65f, 0.28f); } } private void DrawSoftBoldLabel(Rect rect, string text, GUIStyle style, Color color, float xOffset, float yOffset) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) text = TranslateUiText(text); style.normal.textColor = color; GUI.Label(new Rect(((Rect)(ref rect)).x - xOffset, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x + xOffset, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y - yOffset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + yOffset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(rect, text, style); } private bool ShouldShowGameUI() { if (!enableMod.Value) { return false; } if (gameState == GameState.Idle) { return false; } if ((Object)(object)Character.localCharacter == (Object)null) { return false; } try { if (Character.localCharacter.inAirport) { return false; } } catch { } try { if ((Object)(object)GameObject.Find("Airport") != (Object)null) { return false; } } catch { } return true; } private bool CanUseRoundEndFrontCamera() { if (!enableMod.Value) { return false; } if ((Object)(object)Character.localCharacter == (Object)null) { return false; } try { if (Character.localCharacter.inAirport) { return false; } } catch { } try { if ((Object)(object)GameObject.Find("Airport") != (Object)null) { return false; } } catch { } return true; } private void DrawLeftPointUI() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) if (gameState == GameState.Running) { if (leftPointStyle == null) { leftPointStyle = new GUIStyle(GUI.skin.label); leftPointStyle.alignment = (TextAnchor)3; leftPointStyle.fontStyle = (FontStyle)1; leftPointStyle.fontSize = 30; leftPointStyle.normal.textColor = Color.white; } string text; if (currentRoundType == RoundGameType.RhythmGame || currentRoundType == RoundGameType.ShelfHook || currentRoundType == RoundGameType.BounceFrisbee) { int key = (((Object)(object)Character.localCharacter != (Object)null) ? GetActorNumber(Character.localCharacter) : (-999)); text = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0) + "p / " + maxRoundScore.Value + "p"; } else { text = GetCurrentDisplayedRoundScore() + "p / " + maxRoundScore.Value + "p"; } DrawOutlinedLabel(new Rect(20f, 18f, 360f, 50f), text, leftPointStyle, Color.white, new Color(0f, 0f, 0f, 0.9f), 2f); } } private void DrawRoundResultPanelUI() { //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) if (!roundResultPanelActive) { return; } if (Time.time > roundResultPanelUntil) { roundResultPanelActive = false; roundResultPanelForcedLines = null; roundResultPanelForcedTitle = ""; } else { if ((Object)(object)Character.localCharacter == (Object)null) { return; } try { if (Character.localCharacter.inAirport) { return; } } catch { } try { if ((Object)(object)GameObject.Find("Airport") != (Object)null) { return; } } catch { } if (roundResultTitleStyle == null) { roundResultTitleStyle = new GUIStyle(GUI.skin.label); roundResultTitleStyle.alignment = (TextAnchor)4; roundResultTitleStyle.fontSize = 46; roundResultTitleStyle.fontStyle = (FontStyle)1; roundResultTitleStyle.normal.textColor = new Color(1f, 0.92f, 0.25f, 1f); } if (roundResultLineStyle == null) { roundResultLineStyle = new GUIStyle(GUI.skin.label); roundResultLineStyle.alignment = (TextAnchor)4; roundResultLineStyle.fontSize = 32; roundResultLineStyle.fontStyle = (FontStyle)1; roundResultLineStyle.normal.textColor = Color.white; } List list = ((roundResultPanelForcedLines != null) ? new List(roundResultPanelForcedLines) : BuildRoundResultPanelLines()); float num = Mathf.Min(820f, (float)Screen.width * 0.78f); float num2 = Mathf.Min(420f, 92f + (float)Mathf.Min(4, list.Count) * 54f); float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num2) * 0.5f; Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.76f); GUI.DrawTexture(new Rect(num3, num4, num, num2), (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.22f); GUI.DrawTexture(new Rect(num3, num4, num, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3, num4 + num2 - 3f, num, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3, num4, 3f, num2), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3 + num - 3f, num4, 3f, num2), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(new Rect(num3 + 10f, num4 + 22f, num - 20f, 58f), roundResultPanelTitle, roundResultTitleStyle, new Color(1f, 0.92f, 0.25f, 1f), new Color(0f, 0f, 0f, 0.95f), 2.5f); float num5 = num4 + 88f; int num6 = Mathf.Min(4, list.Count); for (int i = 0; i < num6; i++) { DrawOutlinedLabel(new Rect(num3 + 20f, num5, num - 40f, 46f), list[i], roundResultLineStyle, Color.white, new Color(0f, 0f, 0f, 0.95f), 2f); num5 += 54f; } } } private void ShowRoundResultPanelForCurrentRound(float seconds) { roundResultPanelTitle = ((!string.IsNullOrWhiteSpace(roundResultPanelForcedTitle)) ? roundResultPanelForcedTitle : GetRoundResultPanelTitle()); roundResultPanelUntil = Time.time + Mathf.Max(0.1f, seconds); roundResultPanelActive = true; } private string GetRoundResultPanelTitle() { return Mathf.Clamp(currentRoundIndex, 1, 11) + "라운드 결과"; } private List BuildRoundResultPanelLines() { RefreshActorNamesFromCharacters(); if (currentRoundType == RoundGameType.ShelfHook && timingRoundSubmissions.Count > 0) { return BuildTimingResultPanelLines(); } if (currentRoundType == RoundGameType.BounceFrisbee && arrowRoundSubmissions.Count > 0) { return BuildArrowResultPanelLines(); } if (currentRoundType == RoundGameType.RhythmGame && (rhythmRoundProgressByActor.Count > 0 || rhythmRoundSubmissions.Count > 0)) { return BuildRhythmResultPanelLines(); } if (currentRoundType == RoundGameType.MemoryMatch && round9FinishTimes.Count > 0) { return BuildRound9ResultPanelLines(); } if (currentRoundType == RoundGameType.HalliGalli) { return BuildRound10ResultPanelLines(); } if (currentRoundType == RoundGameType.DinoRun) { return BuildRound11ResultPanelLines(); } return BuildRoundScorePanelLines(); } private List BuildRoundScorePanelLines() { List list = new List(); foreach (int key2 in currentRoundScores.Keys) { if (key2 > 0 && !list.Contains(key2)) { list.Add(key2); } } foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } list.Sort(delegate(int a, int b) { int value = (currentRoundScores.ContainsKey(a) ? currentRoundScores[a] : 0); int num2 = (currentRoundScores.ContainsKey(b) ? currentRoundScores[b] : 0).CompareTo(value); return (num2 != 0) ? num2 : a.CompareTo(b); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); list2.Add(i + 1 + ". " + text + " +" + num + "P"); } return list2; } private List BuildTimingResultPanelLines() { List> list = new List>(); foreach (KeyValuePair timingRoundSubmission in timingRoundSubmissions) { list.Add(new KeyValuePair(timingRoundSubmission.Key, Mathf.Abs(timingRoundSubmission.Value - timingRoundTargetSeconds))); } list.Sort(delegate(KeyValuePair a, KeyValuePair b) { int num2 = a.Value.CompareTo(b.Value); return (num2 != 0) ? num2 : a.Key.CompareTo(b.Key); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i].Key; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); list2.Add(i + 1 + ". " + text + " " + list[i].Value.ToString("0.00") + "초 차이 +" + num + "P"); } return list2; } private List BuildArrowResultPanelLines() { HashSet hashSet = new HashSet(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { hashSet.Add(actorNumber); } } } foreach (int key2 in currentRoundScores.Keys) { if (key2 > 0) { hashSet.Add(key2); } } foreach (int key3 in arrowRoundSubmissions.Keys) { if (key3 > 0) { hashSet.Add(key3); } } List list = new List(hashSet); list.Sort(delegate(int a, int b) { bool flag = arrowRoundSubmissions.ContainsKey(a); bool flag2 = arrowRoundSubmissions.ContainsKey(b); if (flag && flag2) { int num2 = arrowRoundSubmissions[a].CompareTo(arrowRoundSubmissions[b]); return (num2 != 0) ? num2 : a.CompareTo(b); } if (flag != flag2) { return (!flag) ? 1 : (-1); } int value2 = (currentRoundScores.ContainsKey(a) ? currentRoundScores[a] : 0); int num3 = (currentRoundScores.ContainsKey(b) ? currentRoundScores[b] : 0).CompareTo(value2); return (num3 != 0) ? num3 : a.CompareTo(b); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); if (arrowRoundSubmissions.TryGetValue(key, out var value)) { list2.Add(i + 1 + ". " + text + " " + value.ToString("0.00") + "초 +" + num + "P"); } else { list2.Add(i + 1 + ". " + text + " 미완료 +0P"); } } return list2; } private List BuildRhythmResultPanelLines() { List list = new List(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int key in rhythmRoundProgressByActor.Keys) { if (key > 0 && !list.Contains(key)) { list.Add(key); } } foreach (int key2 in rhythmRoundSubmissions.Keys) { if (key2 > 0 && !list.Contains(key2)) { list.Add(key2); } } list.Sort(delegate(int a, int b) { int rhythmDisplayHitCount2 = GetRhythmDisplayHitCount(a); int num3 = GetRhythmDisplayHitCount(b).CompareTo(rhythmDisplayHitCount2); return (num3 != 0) ? num3 : a.CompareTo(b); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int num = list[i]; string text = (actorNames.ContainsKey(num) ? actorNames[num] : ("Player " + num)); int rhythmDisplayHitCount = GetRhythmDisplayHitCount(num); int num2 = (currentRoundScores.ContainsKey(num) ? currentRoundScores[num] : 0); list2.Add(i + 1 + ". " + text + " " + rhythmDisplayHitCount + "/" + 30 + " +" + num2 + "P"); } return list2; } private List BuildRound9ResultPanelLines() { List> list = new List>(round9FinishTimes); list.Sort(delegate(KeyValuePair a, KeyValuePair b) { int num2 = a.Value.CompareTo(b.Value); return (num2 != 0) ? num2 : a.Key.CompareTo(b.Key); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i].Key; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); list2.Add(i + 1 + ". " + text + " " + list[i].Value.ToString("0.00") + "초 +" + num + "P"); } return list2; } private List BuildRound10ResultPanelLines() { List list = new List(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int key2 in round10ScoresByActor.Keys) { if (key2 > 0 && !list.Contains(key2)) { list.Add(key2); } } list.Sort(delegate(int a, int b) { int value = (round10ScoresByActor.ContainsKey(a) ? round10ScoresByActor[a] : 0); int num3 = (round10ScoresByActor.ContainsKey(b) ? round10ScoresByActor[b] : 0).CompareTo(value); return (num3 != 0) ? num3 : a.CompareTo(b); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num = (round10ScoresByActor.ContainsKey(key) ? round10ScoresByActor[key] : 0); int num2 = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); list2.Add(i + 1 + ". " + text + " 성공 x " + num + " +" + num2 + "P"); } return list2; } private List BuildRound11ResultPanelLines() { List list = new List(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int key2 in round11DinoPassedByActor.Keys) { if (key2 > 0 && !list.Contains(key2)) { list.Add(key2); } } list.Sort(delegate(int a, int b) { int value = (round11DinoPassedByActor.ContainsKey(a) ? round11DinoPassedByActor[a] : 0); int num3 = (round11DinoPassedByActor.ContainsKey(b) ? round11DinoPassedByActor[b] : 0).CompareTo(value); return (num3 != 0) ? num3 : a.CompareTo(b); }); List list2 = new List(); for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int passed = (round11DinoPassedByActor.ContainsKey(key) ? round11DinoPassedByActor[key] : 0); int num = (round11DinoPenaltyByActor.ContainsKey(key) ? round11DinoPenaltyByActor[key] : 0); int num2 = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : (round11DinoScoreByActor.ContainsKey(key) ? round11DinoScoreByActor[key] : CalculateRound11DinoScore(passed, num))); string text2 = ((round11DinoFailedByActor.ContainsKey(key) && round11DinoFailedByActor[key]) ? " Fail" : ""); string text3 = ((num > 0) ? (" -" + num + "P") : ""); list2.Add("애니멀점프 " + (i + 1) + "." + text + " 페널티" + text3 + " +" + num2 + "P" + text2); } return list2; } private void DrawScoreboardUI() { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) if (!enableMod.Value || !showScoreboardOnTab.Value) { return; } bool flag = Time.time < autoScoreboardUntil; bool flag2 = Input.GetKey((KeyCode)9) || Input.GetKeyDown((KeyCode)9); if ((!flag && !flag2) || (Object)(object)Character.localCharacter == (Object)null) { return; } try { if (Character.localCharacter.inAirport) { return; } } catch { } try { if ((Object)(object)GameObject.Find("Airport") != (Object)null) { return; } } catch { } if (scoreBoardTitleStyle == null) { scoreBoardTitleStyle = new GUIStyle(GUI.skin.label); scoreBoardTitleStyle.alignment = (TextAnchor)4; scoreBoardTitleStyle.fontSize = 42; scoreBoardTitleStyle.fontStyle = (FontStyle)1; scoreBoardTitleStyle.normal.textColor = new Color(1f, 0.92f, 0.25f, 1f); } if (scoreBoardStyle == null) { scoreBoardStyle = new GUIStyle(GUI.skin.label); scoreBoardStyle.alignment = (TextAnchor)4; scoreBoardStyle.fontSize = 32; scoreBoardStyle.fontStyle = (FontStyle)1; scoreBoardStyle.normal.textColor = Color.white; } float num = 720f; float num2 = 420f; float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num2) * 0.5f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num3, num4, num, num2); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.62f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(new Rect(num3, num4 + 18f, num, 60f), "PEAK Party Games", scoreBoardTitleStyle, new Color(1f, 0.92f, 0.25f, 1f), new Color(0f, 0f, 0f, 0.9f), 2f); RefreshActorNamesFromCharacters(); List knownActorsSorted = GetKnownActorsSorted(); knownActorsSorted.Sort(delegate(int a, int b) { int value = (totalScores.ContainsKey(a) ? totalScores[a] : 0); int num9 = (totalScores.ContainsKey(b) ? totalScores[b] : 0).CompareTo(value); return (num9 != 0) ? num9 : a.CompareTo(b); }); float num5 = num4 + 95f; int num6 = Mathf.Min(4, knownActorsSorted.Count); for (int i = 0; i < num6; i++) { int key = knownActorsSorted[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num7 = (totalScores.ContainsKey(key) ? totalScores[key] : 0); int num8 = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); string text2 = i + 1 + "등 " + text + " " + num7 + "P"; if (gameState == GameState.Running) { text2 = text2 + " (+" + num8 + "P)"; } DrawOutlinedLabel(new Rect(num3, num5, num, 46f), text2, scoreBoardStyle, Color.white, new Color(0f, 0f, 0f, 0.9f), 2f); num5 += 48f; } } private void DrawRoundIntroDescriptionUI() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Expected O, but got Unknown //IL_0191: Unknown result type (might be due to invalid IL or missing references) if (!(Time.time > roundIntroUntil) && !string.IsNullOrEmpty(roundIntroTitleText)) { if (roundIntroTitleStyle == null) { roundIntroTitleStyle = new GUIStyle(GUI.skin.label); roundIntroTitleStyle.alignment = (TextAnchor)4; roundIntroTitleStyle.fontSize = 42; roundIntroTitleStyle.fontStyle = (FontStyle)1; roundIntroTitleStyle.normal.textColor = new Color(1f, 0.92f, 0.25f, 1f); roundIntroTitleStyle.wordWrap = true; } if (roundIntroBodyStyle == null) { roundIntroBodyStyle = new GUIStyle(GUI.skin.label); roundIntroBodyStyle.alignment = (TextAnchor)4; roundIntroBodyStyle.fontSize = 30; roundIntroBodyStyle.fontStyle = (FontStyle)1; roundIntroBodyStyle.normal.textColor = Color.white; roundIntroBodyStyle.wordWrap = true; } if (roundIntroFooterStyle == null) { roundIntroFooterStyle = new GUIStyle(GUI.skin.label); roundIntroFooterStyle.alignment = (TextAnchor)4; roundIntroFooterStyle.fontSize = 27; roundIntroFooterStyle.fontStyle = (FontStyle)1; roundIntroFooterStyle.normal.textColor = new Color(0.9f, 0.95f, 1f, 1f); roundIntroFooterStyle.wordWrap = true; } float num = Mathf.Min(1040f, (float)Screen.width * 0.88f); float num2 = Mathf.Min(430f, (float)Screen.height * 0.62f); float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num2) * 0.5f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num3, num4, num, num2); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.76f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.24f); GUI.DrawTexture(new Rect(num3, num4, num, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3, num4 + num2 - 3f, num, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3, num4, 3f, num2), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3 + num - 3f, num4, 3f, num2), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(new Rect(num3 + 24f, num4 + 26f, num - 48f, 58f), roundIntroTitleText, roundIntroTitleStyle, new Color(1f, 0.92f, 0.25f, 1f), new Color(0f, 0f, 0f, 0.95f), 2.5f); DrawOutlinedLabel(new Rect(num3 + 42f, num4 + 106f, num - 84f, 165f), roundIntroBodyText, roundIntroBodyStyle, Color.white, new Color(0f, 0f, 0f, 0.95f), 1.8f); DrawOutlinedLabel(new Rect(num3 + 42f, num4 + num2 - 92f, num - 84f, 48f), roundIntroFooterText, roundIntroFooterStyle, new Color(0.9f, 0.95f, 1f, 1f), new Color(0f, 0f, 0f, 0.95f), 1.6f); } } [IteratorStateMachine(typeof(d__788))] private IEnumerator ShowRoundIntroDescriptionRoutine(RoundGameType roundType) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__788(0) { <>4__this = this, roundType = roundType }; } private object[] BuildRoundIntroDescriptionData(RoundGameType roundType) { GetRoundIntroDescription(roundType, out var title, out var body, out var footer); return new object[6] { title, body, footer, 7f, (int)roundType, currentRoundIndex }; } private void ApplyRoundIntroDescriptionEventLocal(object[] data) { if (data == null || data.Length < 4) { return; } roundIntroTitleText = Convert.ToString(data[0]); roundIntroBodyText = Convert.ToString(data[1]); roundIntroFooterText = Convert.ToString(data[2]); float num = Convert.ToSingle(data[3]); roundIntroUntil = Time.time + Mathf.Max(0.1f, num); roundVoteActive = false; roundVoteLocalChoice = -1; roundVoteLocalHoverChoice = 1; try { if (data.Length >= 6) { currentRoundType = (RoundGameType)Convert.ToInt32(data[4]); currentRoundIndex = Convert.ToInt32(data[5]); } if (gameState == GameState.Idle || gameState == GameState.SpawningArena) { gameState = GameState.RoundStarting; } } catch { } } private void GetRoundIntroDescription(RoundGameType roundType, out string title, out string body, out string footer) { switch (roundType) { case RoundGameType.CloudDynamite: title = "폭탄 구름섬"; body = "바깥쪽 구름균류부터 사라집니다.\n다이너마이트로 상대를 추락시키세요."; footer = "[ 생존시간에 따라 점수가 지급됩니다 ]"; break; case RoundGameType.ShelfHook: title = "타이밍 PVP"; body = "목표 시간에 맞춰 Space 키를 누르세요.\n목표 시간에 가까울수록 높은 점수를 얻습니다."; footer = "[ 정확도에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.BounceFrisbee: title = "별 도착 레이스"; body = "7x11 격자판에서 WASD로 이동하세요.\n3 2 1 START 후 마지막 별 위치에 가장 빨리 도착하면 승리합니다."; footer = "[ 도착 순서에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.DoubleCloudCoconut: title = "구름섬 서바이벌"; body = "1층과 2층 구름균류 맵에서 플레이합니다.\n밟은 구름균류가 빠르게 사라집니다."; footer = "[ 생존시간에 따라 점수가 지급됩니다 ]"; break; case RoundGameType.RhythmGame: title = "리듬게임"; body = "화면에 나오는 리듬 입력을 정확한 타이밍에 맞추세요.\n성공한 개수가 많은 순서대로 점수를 얻습니다."; footer = "[ 성공률에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.ColorCloudSurvival: title = "색깔구름"; body = "정답 색이 공개된 뒤 카운트다운이 시작됩니다.\n제한 시간 안에 같은 색 발판을 밟으면 점수를 얻습니다."; footer = "[ 게임당 5p (4번) ]"; break; case RoundGameType.ButtonMashRace: title = "방향키 레이스"; body = "각자 화면에 표시되는 WASD 아무 키를 입력해 앞으로 달리세요.\n플레이어마다 다른 랜덤 키 순서가 나오며, 잘못 누르면 뒤로 밀려납니다."; footer = "[ 선착순에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.StarGrid: title = "별 쟁탈전"; body = "7x7 보드에서 WASD로 이동해 별을 먹으세요.\n전기칸에 닿으면 잠시 움직일 수 없습니다."; footer = "[ 별갯수 등수에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.MemoryMatch: title = "기억력 PVP"; body = "과일 그림 위치를 기억한 뒤 같은 그림을 맞추세요."; footer = "[ 선착순에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.HalliGalli: title = "할리갈리"; body = "카드에 표시된 같은 과일 개수의 합이 5가 되면 Space를 누르세요.\n잘못 누르면 3초 동안 입력이 정지됩니다."; footer = "[ 성공횟수 등수에 따라 20p 15p 10p 5p ]"; break; case RoundGameType.DinoRun: title = "애니멀 점프"; body = "Space 키로 점프해서 선인장 장애물을 넘으세요.\n총 40개의 장애물이 같은 패턴으로 등장합니다."; footer = "[ 기본 20점 / 충돌 1회당 -3p ]"; break; default: title = "PEAK Party Games"; body = "라운드 설명을 확인하세요."; footer = ""; break; } } private void DrawFinalScoreboardUI() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) if (!finalScoreboardActive) { return; } if (Time.time > finalScoreboardUntil) { finalScoreboardActive = false; return; } if (finalScoreboardTitleStyle == null) { finalScoreboardTitleStyle = new GUIStyle(GUI.skin.label); finalScoreboardTitleStyle.alignment = (TextAnchor)4; finalScoreboardTitleStyle.fontSize = 62; finalScoreboardTitleStyle.fontStyle = (FontStyle)1; finalScoreboardTitleStyle.normal.textColor = new Color(1f, 0.92f, 0.25f, 1f); } if (finalScoreboardLineStyle == null) { finalScoreboardLineStyle = new GUIStyle(GUI.skin.label); finalScoreboardLineStyle.alignment = (TextAnchor)4; finalScoreboardLineStyle.fontSize = 44; finalScoreboardLineStyle.fontStyle = (FontStyle)1; finalScoreboardLineStyle.normal.textColor = Color.white; } float num = Mathf.Min(1040f, (float)Screen.width * 0.92f); float num2 = Mathf.Min(620f, (float)Screen.height * 0.78f); float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num2) * 0.5f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num3, num4, num, num2); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.74f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(new Rect(num3, num4 + 22f, num, 78f), "[ 최종 점수판 ]", finalScoreboardTitleStyle, new Color(1f, 0.92f, 0.25f, 1f), new Color(0f, 0f, 0f, 0.95f), 3f); RefreshActorNamesFromCharacters(); List knownActorsSorted = GetKnownActorsSorted(); knownActorsSorted.Sort(delegate(int a, int b) { int value = (totalScores.ContainsKey(a) ? totalScores[a] : 0); int num7 = (totalScores.ContainsKey(b) ? totalScores[b] : 0).CompareTo(value); return (num7 != 0) ? num7 : a.CompareTo(b); }); float num5 = num4 + 120f; for (int i = 0; i < knownActorsSorted.Count; i++) { int key = knownActorsSorted[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); int num6 = (totalScores.ContainsKey(key) ? totalScores[key] : 0); string text2 = i + 1 + "등"; string text3 = text2 + " " + text + " " + num6 + "P"; Color textColor = (Color)((i == 0) ? new Color(1f, 0.92f, 0.25f, 1f) : Color.white); DrawOutlinedLabel(new Rect(num3, num5, num, 58f), text3, finalScoreboardLineStyle, textColor, new Color(0f, 0f, 0f, 0.95f), 2.5f); num5 += 66f; } } [IteratorStateMachine(typeof(d__793))] private IEnumerator ShowFinalScoreboardRoutine(float seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__793(0) { <>4__this = this, seconds = seconds }; } private void BroadcastFinalScoreboard(float seconds) { float num = Mathf.Max(0.1f, seconds); SyncScoresToAll(); ApplyFinalScoreboardLocal(num); RaiseSimpleEvent(129, new object[1] { num }, (ReceiverGroup)0); } private void ApplyFinalScoreboardEventLocal(object[] data) { float seconds = 7f; try { if (data != null && data.Length >= 1) { seconds = Convert.ToSingle(data[0]); } } catch { seconds = 7f; } ApplyFinalScoreboardLocal(seconds); } private void ApplyFinalScoreboardLocal(float seconds) { finalScoreboardActive = true; finalScoreboardUntil = Time.time + Mathf.Max(0.1f, seconds); } private List GetKnownActorsSorted() { HashSet hashSet = new HashSet(); foreach (int key in totalScores.Keys) { hashSet.Add(key); } foreach (int key2 in currentRoundScores.Keys) { hashSet.Add(key2); } foreach (int key3 in actorNames.Keys) { hashSet.Add(key3); } List list = new List(hashSet); list.Sort(); return list; } private void DrawDynamiteChargeBarUI() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) if (showDynamiteChargeBar && gameState == GameState.Running && currentRoundType == RoundGameType.CloudDynamite) { float num = Mathf.Clamp01((Time.time - dynamiteChargeStartTime) / Mathf.Max(0.01f, dynamiteChargeDuration)); float num2 = 260f; float num3 = 22f; float num4 = ((float)Screen.width - num2) * 0.5f; float num5 = 24f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num4, num5, num2, num3); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(num4 + 3f, num5 + 3f, num2 - 6f, num3 - 6f); Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(num4 + 3f, num5 + 3f, (num2 - 6f) * num, num3 - 6f); Color color = GUI.color; GUI.color = new Color(1f, 1f, 1f, 0.95f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(0.05f, 0.05f, 0.05f, 0.85f); GUI.DrawTexture(val2, (Texture)(object)Texture2D.whiteTexture); Color color2 = ((num < 0.5f) ? Color.Lerp(new Color(0.15f, 0.95f, 0.2f, 1f), new Color(1f, 0.95f, 0.15f, 1f), num / 0.5f) : Color.Lerp(new Color(1f, 0.95f, 0.15f, 1f), new Color(1f, 0.45f, 0.15f, 1f), (num - 0.5f) / 0.5f)); GUI.color = color2; GUI.DrawTexture(val3, (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (dynamiteChargeTextStyle == null) { dynamiteChargeTextStyle = new GUIStyle(GUI.skin.label); dynamiteChargeTextStyle.alignment = (TextAnchor)4; dynamiteChargeTextStyle.fontSize = 15; dynamiteChargeTextStyle.fontStyle = (FontStyle)1; dynamiteChargeTextStyle.normal.textColor = Color.white; } GUI.Label(val, TranslateUiText("다이너마이트"), dynamiteChargeTextStyle); } } private void DrawRound6AnswerGaugeUI() { //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_0209: Unknown result type (might be due to invalid IL or missing references) if (!round6AnswerGaugeActive || gameState != GameState.Running || currentRoundType != RoundGameType.ColorCloudSurvival) { return; } float num = Mathf.Max(0.01f, round6AnswerGaugeEndTime - round6AnswerGaugeStartTime); float num2 = Mathf.Clamp(round6AnswerGaugeEndTime - Time.time, 0f, num); if (num2 <= 0f) { round6AnswerGaugeActive = false; return; } float num3 = Mathf.Clamp01(num2 / num); float num4 = Mathf.Min(520f, (float)Screen.width * 0.52f); float num5 = 30f; float num6 = ((float)Screen.width - num4) * 0.5f; float num7 = 76f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num6, num7, num4, num5); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(num6 + 3f, num7 + 3f, num4 - 6f, num5 - 6f); Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(num6 + 3f, num7 + 3f, (num4 - 6f) * num3, num5 - 6f); Color color = GUI.color; GUI.color = new Color(1f, 1f, 1f, 0.96f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(0f, 0f, 0f, 0.82f); GUI.DrawTexture(val2, (Texture)(object)Texture2D.whiteTexture); GUI.color = GetRound6ColorValue(round6AnswerGaugeColor); GUI.DrawTexture(val3, (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (dynamiteChargeTextStyle == null) { dynamiteChargeTextStyle = new GUIStyle(GUI.skin.label); dynamiteChargeTextStyle.alignment = (TextAnchor)4; dynamiteChargeTextStyle.fontSize = 15; dynamiteChargeTextStyle.fontStyle = (FontStyle)1; dynamiteChargeTextStyle.normal.textColor = Color.white; } string text = GetRound6ColorName(round6AnswerGaugeColor) + " 발판 밟기 " + num2.ToString("0.0") + "초"; DrawOutlinedLabel(val, text, dynamiteChargeTextStyle, Color.white, new Color(0f, 0f, 0f, 0.95f), 1.5f); } private Texture2D GetRound7RunnerTexture() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)round7RunnerTexture != (Object)null) { return round7RunnerTexture; } Texture2D val = new Texture2D(128, 128, (TextureFormat)5, false); ((Object)val).name = "PeakCloudArena_Round7RunnerSprite_Procedural"; ((Texture)val).filterMode = (FilterMode)1; ((Texture)val).wrapMode = (TextureWrapMode)1; Color val2 = default(Color); ((Color)(ref val2))..ctor(0f, 0f, 0f, 0f); Color color = default(Color); ((Color)(ref color))..ctor(0f, 0f, 0f, 1f); Color[] array = (Color[])(object)new Color[16384]; for (int i = 0; i < array.Length; i++) { array[i] = val2; } val.SetPixels(array); DrawRound7CircleOutline(val, new Vector2(78f, 91f), 21f, 6, color); DrawRound7Line(val, new Vector2(67f, 76f), new Vector2(56f, 50f), 7, color); DrawRound7Line(val, new Vector2(66f, 73f), new Vector2(90f, 56f), 6, color); DrawRound7Line(val, new Vector2(90f, 56f), new Vector2(107f, 72f), 6, color); DrawRound7Line(val, new Vector2(62f, 70f), new Vector2(35f, 67f), 6, color); DrawRound7Line(val, new Vector2(35f, 67f), new Vector2(25f, 51f), 6, color); DrawRound7Line(val, new Vector2(56f, 50f), new Vector2(79f, 33f), 7, color); DrawRound7Line(val, new Vector2(79f, 33f), new Vector2(66f, 12f), 7, color); DrawRound7Line(val, new Vector2(56f, 50f), new Vector2(42f, 25f), 7, color); DrawRound7Line(val, new Vector2(42f, 25f), new Vector2(18f, 17f), 7, color); val.Apply(false, true); round7RunnerTexture = val; return round7RunnerTexture; } private void DrawRound7Line(Texture2D tex, Vector2 a, Vector2 b, int thickness, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) float num = Vector2.Distance(a, b); int num2 = Mathf.Max(1, Mathf.CeilToInt(num * 2f)); for (int i = 0; i <= num2; i++) { float num3 = (float)i / (float)num2; Vector2 val = Vector2.Lerp(a, b, num3); StampRound7Circle(tex, Mathf.RoundToInt(val.x), Mathf.RoundToInt(val.y), thickness, color); } } private void DrawRound7CircleOutline(Texture2D tex, Vector2 center, float radius, int thickness, Color color) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) int num = 180; for (int i = 0; i < num; i++) { float num2 = (float)Math.PI * 2f * ((float)i / (float)num); int cx = Mathf.RoundToInt(center.x + Mathf.Cos(num2) * radius); int cy = Mathf.RoundToInt(center.y + Mathf.Sin(num2) * radius); StampRound7Circle(tex, cx, cy, thickness, color); } } private void StampRound7Circle(Texture2D tex, int cx, int cy, int radius, Color color) { //IL_0072: Unknown result type (might be due to invalid IL or missing references) int num = radius * radius; for (int i = cy - radius; i <= cy + radius; i++) { if (i < 0 || i >= ((Texture)tex).height) { continue; } for (int j = cx - radius; j <= cx + radius; j++) { if (j >= 0 && j < ((Texture)tex).width) { int num2 = j - cx; int num3 = i - cy; if (num2 * num2 + num3 * num3 <= num) { tex.SetPixel(j, i, color); } } } } } private void DrawFilledCircle(Texture2D tex, int cx, int cy, int radius, Color color) { //IL_0087: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)tex == (Object)null) { return; } int num = radius * radius; for (int i = cy - radius; i <= cy + radius; i++) { if (i < 0 || i >= ((Texture)tex).height) { continue; } for (int j = cx - radius; j <= cx + radius; j++) { if (j >= 0 && j < ((Texture)tex).width) { int num2 = j - cx; int num3 = i - cy; if (num2 * num2 + num3 * num3 <= num) { tex.SetPixel(j, i, color); } } } } } private void DrawRound7ButtonMashUI() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_065c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_052d: Unknown result type (might be due to invalid IL or missing references) //IL_0532: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) if (currentRoundType != RoundGameType.ButtonMashRace || (!round7ButtonMashActive && gameState != GameState.Running)) { return; } EnsureMiniGameStyles(); if (round7NameStyle == null) { round7NameStyle = new GUIStyle(GUI.skin.label); round7NameStyle.alignment = (TextAnchor)5; round7NameStyle.fontSize = 28; round7NameStyle.fontStyle = (FontStyle)1; round7NameStyle.normal.textColor = Color.white; } if (round7TrackStyle == null) { round7TrackStyle = new GUIStyle(GUI.skin.label); round7TrackStyle.alignment = (TextAnchor)4; round7TrackStyle.fontSize = 32; round7TrackStyle.fontStyle = (FontStyle)1; round7TrackStyle.normal.textColor = Color.white; } if (round7RankStyle == null) { round7RankStyle = new GUIStyle(GUI.skin.label); round7RankStyle.alignment = (TextAnchor)3; round7RankStyle.fontSize = 34; round7RankStyle.fontStyle = (FontStyle)1; round7RankStyle.normal.textColor = new Color(1f, 0.92f, 0.25f, 1f); } RefreshActorNamesFromCharacters(); List knownActorsSorted = GetKnownActorsSorted(); float num = Mathf.Min(1180f, (float)Screen.width * 0.94f); float num2 = Mathf.Min(240f, num * 0.22f); float num3 = 125f; float num4 = num - num2 - num3; float num5 = 95f; float num6 = 76f; float num7 = (round7ButtonMashActive ? 48f : 0f); float num8 = num5 + (float)knownActorsSorted.Count * num6 + num7; float num9 = ((float)Screen.width - num) * 0.5f; float num10 = ((float)Screen.height - num8) * 0.5f; int num11 = GetRound7TargetPresses(); DrawOutlinedLabel(new Rect(num9, num10 - 6f, num, 46f), useEnglishUi ? ("Mash any WASD key to run to the flag! Goal " + num11 + " steps") : ("WASD 아무 키나 연타해서 깃발까지 달려라! 목표 " + num11 + "칸"), minigameTitleStyle, Color.white, Color.black, 2.5f); DrawOutlinedLabel(new Rect(num9, num10 + 38f, num, 42f), useEnglishUi ? "Press W / A / S / D. Any key moves 1 step" : "W / A / S / D 중 아무 키나 누르면 1칸 전진", round7TrackStyle, new Color(1f, 0.82f, 0.25f, 1f), Color.black, 2.5f); float num12 = num10 + num5; Rect val = default(Rect); Rect val3 = default(Rect); for (int i = 0; i < knownActorsSorted.Count; i++) { int num13 = knownActorsSorted[i]; string text = (actorNames.ContainsKey(num13) ? actorNames[num13] : ("Player " + num13)); int value = 0; round7ProgressByActor.TryGetValue(num13, out value); value = Mathf.Clamp(value, 0, num11); float num14 = ((num11 <= 0) ? 0f : Mathf.Clamp01((float)value / (float)num11)); float num15 = num12 + (float)i * num6; DrawOutlinedLabel(new Rect(num9, num15, num2 - 10f, num6), text, round7NameStyle, Color.white, Color.black, 1.8f); ((Rect)(ref val))..ctor(num9 + num2, num15 + 26f, num4 - 10f, 18f); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.72f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.93f); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, ((Rect)(ref val)).width * num14, ((Rect)(ref val)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; Texture2D val2 = GetRound7RunnerTexture(); float num16 = 68f; float num17 = ((Rect)(ref val)).x + ((Rect)(ref val)).width * num14 - num16 * 0.5f; num17 = Mathf.Clamp(num17, ((Rect)(ref val)).x - num16 * 0.2f, ((Rect)(ref val)).x + ((Rect)(ref val)).width - num16 * 0.8f); ((Rect)(ref val3))..ctor(num17, num15 + 1f, num16, num16); Color color2 = GUI.color; GUI.color = Color.white; GUI.DrawTexture(val3, (Texture)(object)val2, (ScaleMode)2, true); GUI.color = color2; DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + ((Rect)(ref val)).width + 8f, num15 - 1f, 50f, num6), "\ud83d\udea9", round7TrackStyle, new Color(1f, 0.3f, 0.3f, 1f), Color.black, 1.8f); int round7DynamicRank = GetRound7DynamicRank(num13); if (round7DynamicRank > 0) { DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + ((Rect)(ref val)).width + 60f, num15 - 1f, 90f, num6), useEnglishUi ? RankOrdinalEnglish(round7DynamicRank) : (round7DynamicRank + "등"), round7RankStyle, new Color(1f, 0.92f, 0.25f, 1f), Color.black, 2.2f); } } if (round7ButtonMashActive) { float num18 = Mathf.Max(5f, (round7TimeLimitSeconds != null) ? round7TimeLimitSeconds.Value : 20f); float num19 = Mathf.Clamp(num18 - (Time.time - round7StartLocalTime), 0f, num18); DrawOutlinedLabel(new Rect(num9, num12 + (float)knownActorsSorted.Count * num6 + 6f, num, 40f), useEnglishUi ? ("Time Left " + num19.ToString("0.0") + "s") : ("남은 시간 " + num19.ToString("0.0") + "초"), round7TrackStyle, Color.white, Color.black, 1.8f); } } private Texture2D GetRound8AvatarTexture() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)round8AvatarTexture != (Object)null) { return round8AvatarTexture; } int num = 96; Texture2D val = new Texture2D(num, num, (TextureFormat)5, false); ((Object)val).name = "PeakCloudArena_Round8Avatar_Procedural"; Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 1f, 1f, 0f); for (int i = 0; i < num; i++) { for (int j = 0; j < num; j++) { val.SetPixel(j, i, val2); } } Color white = Color.white; DrawFilledCircle(val, num / 2, 68, 20, white); DrawFilledCircle(val, num / 2, 28, 30, white); for (int k = 28; k < 58; k++) { for (int l = 18; l < 78; l++) { if ((float)k < 28f + (float)Mathf.Abs(l - 48) * 0.18f) { } } } val.Apply(false, true); round8AvatarTexture = val; return round8AvatarTexture; } private void DrawRound8StarGridUI() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Expected O, but got Unknown //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06c1: Unknown result type (might be due to invalid IL or missing references) //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_0708: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_073d: Unknown result type (might be due to invalid IL or missing references) if (currentRoundType != RoundGameType.StarGrid || (!round8StarGridActive && gameState != GameState.Running)) { return; } if (round8TitleStyle == null) { round8TitleStyle = new GUIStyle(GUI.skin.label); round8TitleStyle.alignment = (TextAnchor)4; round8TitleStyle.fontSize = 34; round8TitleStyle.fontStyle = (FontStyle)1; round8TitleStyle.normal.textColor = Color.white; } if (round8CellStyle == null) { round8CellStyle = new GUIStyle(GUI.skin.label); round8CellStyle.alignment = (TextAnchor)4; round8CellStyle.fontSize = 22; round8CellStyle.fontStyle = (FontStyle)1; round8CellStyle.normal.textColor = Color.white; } if (round8NameStyle == null) { round8NameStyle = new GUIStyle(GUI.skin.label); round8NameStyle.alignment = (TextAnchor)4; round8NameStyle.fontSize = 15; round8NameStyle.fontStyle = (FontStyle)1; round8NameStyle.normal.textColor = Color.white; round8NameStyle.clipping = (TextClipping)1; } if (round8StarStyle == null) { round8StarStyle = new GUIStyle(GUI.skin.label); round8StarStyle.alignment = (TextAnchor)4; round8StarStyle.fontSize = 42; round8StarStyle.fontStyle = (FontStyle)1; round8StarStyle.normal.textColor = new Color(1f, 0.92f, 0.18f, 1f); } if (round8ElectricStyle == null) { round8ElectricStyle = new GUIStyle(GUI.skin.label); round8ElectricStyle.alignment = (TextAnchor)4; round8ElectricStyle.fontSize = 42; round8ElectricStyle.fontStyle = (FontStyle)1; round8ElectricStyle.normal.textColor = new Color(0.45f, 0.85f, 1f, 1f); } int num = GetRound8TotalStars(); float num2 = Mathf.Min((float)Screen.height * 0.72f, (float)Screen.width * 0.58f); num2 = Mathf.Clamp(num2, 420f, 680f); float num3 = num2 / 7f; float num4 = ((float)Screen.width - num2) * 0.5f; float num5 = ((float)Screen.height - num2) * 0.5f + 34f; DrawOutlinedLabel(new Rect(num4 - 120f, num5 - 92f, num2 + 240f, 48f), "8라운드 별 먹기 " + round8StarsEatenTotal + " / " + num, round8TitleStyle, Color.white, Color.black, 2f); DrawOutlinedLabel(new Rect(num4 - 120f, num5 - 50f, num2 + 240f, 36f), "WASD로 이동 / 상대 칸 진입 불가", round8CellStyle, new Color(1f, 0.84f, 0.35f, 1f), Color.black, 1.6f); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.72f); GUI.DrawTexture(new Rect(num4 - 12f, num5 - 12f, num2 + 24f, num2 + 24f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; RefreshActorNamesFromCharacters(); Rect val = default(Rect); Rect val2 = default(Rect); for (int i = 0; i < 7; i++) { for (int j = 0; j < 7; j++) { ((Rect)(ref val))..ctor(num4 + (float)j * num3, num5 + (float)i * num3, num3 - 2f, num3 - 2f); color = GUI.color; GUI.color = new Color(0.08f, 0.08f, 0.08f, 0.88f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.17f); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, ((Rect)(ref val)).width, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, 2f, ((Rect)(ref val)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (IsRound8ElectricCell(new Vector2Int(j, i)) && round8StarsEatenTotal < num) { DrawOutlinedLabel(val, "⚡", round8ElectricStyle, new Color(0.45f, 0.85f, 1f, 1f), Color.black, 1.8f); } if (((Vector2Int)(ref round8StarCell)).x == j && ((Vector2Int)(ref round8StarCell)).y == i && round8StarsEatenTotal < num) { DrawOutlinedLabel(val, "⭐", round8StarStyle, new Color(1f, 0.92f, 0.15f, 1f), Color.black, 1.8f); } int round8ActorAtCell = GetRound8ActorAtCell(j, i); if (round8ActorAtCell > 0) { string text = (actorNames.ContainsKey(round8ActorAtCell) ? actorNames[round8ActorAtCell] : ("P" + round8ActorAtCell)); int num6 = (round8StarsByActor.ContainsKey(round8ActorAtCell) ? round8StarsByActor[round8ActorAtCell] : 0); float num7 = 0f; if (round8ParalyzedUntilByActor.TryGetValue(round8ActorAtCell, out var value) && Time.time < value) { num7 = Mathf.Sin(Time.time * 70f) * Mathf.Max(2f, num3 * 0.055f); } ((Rect)(ref val2))..ctor(((Rect)(ref val)).x + num3 * 0.3f + num7, ((Rect)(ref val)).y + 7f, num3 * 0.4f, num3 * 0.4f); GUI.DrawTexture(val2, (Texture)(object)GetRound8AvatarTexture(), (ScaleMode)2, true); DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + 3f + num7, ((Rect)(ref val)).y + num3 * 0.52f, ((Rect)(ref val)).width - 6f, 20f), text, round8NameStyle, Color.white, Color.black, 1.2f); DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + 3f + num7, ((Rect)(ref val)).y + num3 * 0.73f, ((Rect)(ref val)).width - 6f, 20f), num6 + "⭐", round8NameStyle, new Color(1f, 0.92f, 0.25f, 1f), Color.black, 1.2f); } } } } private int GetRound8ActorAtCell(int x, int y) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair item in round8PositionsByActor) { Vector2Int value = item.Value; if (((Vector2Int)(ref value)).x == x) { value = item.Value; if (((Vector2Int)(ref value)).y == y) { return item.Key; } } } return -1; } private void DrawRound9MemoryMatchUI() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_067b: Unknown result type (might be due to invalid IL or missing references) //IL_0680: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_04be: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_05f9: Unknown result type (might be due to invalid IL or missing references) if (currentRoundType != RoundGameType.MemoryMatch || (!round9MemoryActive && gameState != GameState.Running)) { return; } if (round9TitleStyle == null) { round9TitleStyle = new GUIStyle(GUI.skin.label); round9TitleStyle.alignment = (TextAnchor)4; round9TitleStyle.fontSize = 36; round9TitleStyle.fontStyle = (FontStyle)1; round9TitleStyle.normal.textColor = Color.white; } if (round9CellStyle == null) { round9CellStyle = new GUIStyle(GUI.skin.label); round9CellStyle.alignment = (TextAnchor)4; round9CellStyle.fontSize = 42; round9CellStyle.fontStyle = (FontStyle)1; round9CellStyle.normal.textColor = Color.white; } if (round9SmallStyle == null) { round9SmallStyle = new GUIStyle(GUI.skin.label); round9SmallStyle.alignment = (TextAnchor)4; round9SmallStyle.fontSize = 22; round9SmallStyle.fontStyle = (FontStyle)1; round9SmallStyle.normal.textColor = Color.white; } float num = Mathf.Min((float)Screen.height * 0.62f, (float)Screen.width * 0.48f); num = Mathf.Clamp(num, 360f, 560f); float num2 = num / 4f; float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num) * 0.5f + 42f; bool flag = round9MemoryInputEnabled && !round9MemorySubmitted; string text; if (Time.time < round9MemoryShowAllUntil) { text = "5초 동안 위치를 기억해!"; } else if (!round9MemoryInputEnabled) { text = "가리는 중..."; } else if (round9WrongRevealUntil > 0f && Time.time < round9WrongRevealUntil) { text = "틀림! 0.7초 확인 후 다시 선택"; } else if (round9MemorySubmitted) { text = "완료! 클리어 시간: " + Mathf.Clamp(Time.time - round9MemoryInputStartTime, 0f, 45f).ToString("0.00") + "초"; } else { float num5 = Mathf.Clamp(45f - (Time.time - round9MemoryInputStartTime), 0f, 45f); string text2 = ((round9FirstPickIndex >= 0) ? ("첫 그림: " + GetRound9FruitName(round9BoardNumbers[Mathf.Clamp(round9FirstPickIndex, 0, round9BoardNumbers.Length - 1)])) : "과일 그림을 열고 같은 그림 찾기"); text = text2 + " / 진행 " + round9ProgressIndex + " / 12 / 남은 시간 " + num5.ToString("0.0") + "초"; } DrawOutlinedLabel(new Rect(num3 - 140f, num4 - 94f, num + 280f, 46f), "9라운드 과일 그림 짝맞추기", round9TitleStyle, Color.white, Color.black, 2f); DrawOutlinedLabel(new Rect(num3 - 140f, num4 - 50f, num + 280f, 34f), text, round9SmallStyle, new Color(1f, 0.84f, 0.35f, 1f), Color.black, 1.5f); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.72f); GUI.DrawTexture(new Rect(num3 - 10f, num4 - 10f, num + 20f, num + 20f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; Rect val = default(Rect); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { int num6 = i * 4 + j; ((Rect)(ref val))..ctor(num3 + (float)j * num2, num4 + (float)i * num2, num2 - 2f, num2 - 2f); bool flag2 = num6 == round9SelectedIndex && round9MemoryInputEnabled && !round9MemorySubmitted && flag; color = GUI.color; GUI.color = (flag2 ? new Color(0.22f, 0.35f, 0.95f, 0.92f) : new Color(0.08f, 0.08f, 0.08f, 0.9f)); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, flag2 ? 0.55f : 0.18f); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, ((Rect)(ref val)).width, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, 3f, ((Rect)(ref val)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; int num7 = round9BoardNumbers[num6]; bool flag3 = num7 < 0; bool flag4 = !flag3 && (Time.time < round9MemoryShowAllUntil || round9Revealed[num6] || num6 == round9FirstPickIndex || num6 == round9TempRevealIndex); string text3 = (flag3 ? "" : (flag4 ? GetRound9FruitEmoji(num7) : "?")); Color textColor = (Color)(flag4 ? Color.white : new Color(0.72f, 0.72f, 0.72f, 1f)); DrawOutlinedLabel(val, text3, round9CellStyle, textColor, Color.black, 1.8f); } } if (round9MemoryInputEnabled && !round9MemorySubmitted) { DrawOutlinedLabel(new Rect(num3 - 140f, num4 + num + 16f, num + 280f, 34f), "개인전: WASD 이동 / Space 선택", round9SmallStyle, Color.white, Color.black, 1.5f); } DrawRound9FinishRankPanelUI(num3, num4, num); } private void DrawRound9FinishRankPanelUI(float boardX, float boardY, float boardSize) { } private void DrawRound10HalliGalliUI() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) if (currentRoundType == RoundGameType.HalliGalli && (round10HalliActive || gameState == GameState.Running)) { if (round10TitleStyle == null) { round10TitleStyle = new GUIStyle(GUI.skin.label); round10TitleStyle.alignment = (TextAnchor)4; round10TitleStyle.fontSize = 38; round10TitleStyle.fontStyle = (FontStyle)1; round10TitleStyle.normal.textColor = Color.white; } if (round10CardStyle == null) { round10CardStyle = new GUIStyle(GUI.skin.label); round10CardStyle.alignment = (TextAnchor)4; round10CardStyle.fontSize = 48; round10CardStyle.fontStyle = (FontStyle)1; round10CardStyle.normal.textColor = Color.white; } if (round10SmallStyle == null) { round10SmallStyle = new GUIStyle(GUI.skin.label); round10SmallStyle.alignment = (TextAnchor)4; round10SmallStyle.fontSize = 23; round10SmallStyle.fontStyle = (FontStyle)1; round10SmallStyle.normal.textColor = Color.white; } if (round10FruitStyle == null) { round10FruitStyle = new GUIStyle(GUI.skin.label); round10FruitStyle.alignment = (TextAnchor)4; round10FruitStyle.fontSize = 58; round10FruitStyle.fontStyle = (FontStyle)1; round10FruitStyle.normal.textColor = Color.white; } float num = Mathf.Min(210f, (float)Screen.width * 0.18f); float num2 = num * 1.42f; float num3 = Mathf.Min(34f, (float)Screen.width * 0.025f); float num4 = num * 4f + num3 * 3f; float num5 = ((float)Screen.width - num4) * 0.5f; float num6 = ((float)Screen.height - num2) * 0.5f + 25f; DrawOutlinedLabel(new Rect(num5 - 80f, num6 - 95f, num4 + 160f, 46f), TranslateUiText("10라운드 할리갈리"), round10TitleStyle, Color.white, Color.black, 2f); Rect val = default(Rect); for (int i = 0; i < 4; i++) { ((Rect)(ref val))..ctor(num5 + (float)i * (num + num3), num6, num, num2); bool flag = i == round10NextSlotIndex && round10HalliActive && !round10BellLocked; Color color = GUI.color; GUI.color = (flag ? new Color(1f, 0.92f, 0.25f, 0.95f) : new Color(1f, 1f, 1f, 0.94f)); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(0f, 0f, 0f, 0.18f); GUI.DrawTexture(new Rect(((Rect)(ref val)).x + 5f, ((Rect)(ref val)).y + 5f, ((Rect)(ref val)).width - 10f, ((Rect)(ref val)).height - 10f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; int fruit = Mathf.Clamp(round10CardFruit[i], 0, 3); int count = Mathf.Clamp(round10CardCount[i], 1, 5); Color round10FruitColor = GetRound10FruitColor(fruit); DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + 10f, ((Rect)(ref val)).y + 8f, 55f, 48f), count.ToString(), round10CardStyle, round10FruitColor, Color.black, 1.8f); DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + ((Rect)(ref val)).width - 65f, ((Rect)(ref val)).y + ((Rect)(ref val)).height - 58f, 55f, 48f), count.ToString(), round10CardStyle, round10FruitColor, Color.black, 1.8f); DrawOutlinedLabel(new Rect(((Rect)(ref val)).x + 12f, ((Rect)(ref val)).y + 50f, ((Rect)(ref val)).width - 24f, ((Rect)(ref val)).height - 102f), BuildRound10FruitIcons(fruit, count), round10FruitStyle, Color.white, Color.black, 1.2f); } DrawRound10PenaltyGauge(num5, num6 + num2 + 18f, num4); DrawRound10SuccessBoardUI(num5 + num4 + 24f, num6, num2); } } private void DrawRound10SuccessBoardUI(float x, float y, float cardH) { //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) try { RefreshActorNamesFromCharacters(); List list = new List(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int key2 in round10ScoresByActor.Keys) { if (key2 > 0 && !list.Contains(key2)) { list.Add(key2); } } foreach (int key3 in actorNames.Keys) { if (key3 > 0 && !list.Contains(key3) && round10ScoresByActor.ContainsKey(key3)) { list.Add(key3); } } list.Sort(delegate(int a, int b) { int value = (round10ScoresByActor.ContainsKey(a) ? round10ScoresByActor[a] : 0); int num7 = (round10ScoresByActor.ContainsKey(b) ? round10ScoresByActor[b] : 0).CompareTo(value); return (num7 != 0) ? num7 : a.CompareTo(b); }); if (round10SmallStyle == null) { return; } float num = Mathf.Min(300f, Mathf.Max(210f, (float)Screen.width - x - 24f)); if (num < 180f) { num = Mathf.Min(300f, (float)Screen.width * 0.3f); x = (float)Screen.width - num - 20f; y = Mathf.Max(120f, y); } float num2 = 34f; int num3 = Mathf.Max(1, Mathf.Min(4, list.Count)); float num4 = Mathf.Max(150f, 58f + (float)num3 * num2 + 18f); num4 = Mathf.Min(num4, Mathf.Max(150f, cardH)); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.72f); GUI.DrawTexture(new Rect(x, y, num, num4), (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.22f); GUI.DrawTexture(new Rect(x, y, num, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(x, y + num4 - 2f, num, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(x, y, 2f, num4), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(x + num - 2f, y, 2f, num4), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(new Rect(x + 8f, y + 12f, num - 16f, 34f), "성공 현황", round10SmallStyle, new Color(1f, 0.92f, 0.25f, 1f), Color.black, 1.5f); float num5 = y + 52f; if (list.Count == 0) { DrawOutlinedLabel(new Rect(x + 8f, num5, num - 16f, num2), "아직 성공 없음", round10SmallStyle, Color.white, Color.black, 1.2f); return; } for (int i = 0; i < list.Count && i < 4; i++) { int key = list[i]; string text = (actorNames.ContainsKey(key) ? actorNames[key] : ("P" + key)); int num6 = (round10ScoresByActor.ContainsKey(key) ? round10ScoresByActor[key] : 0); string text2 = i + 1 + ". " + text + " " + num6 + "개"; Color textColor = (Color)((i == 0 && num6 > 0) ? new Color(1f, 0.92f, 0.25f, 1f) : Color.white); DrawOutlinedLabel(new Rect(x + 12f, num5, num - 24f, num2), text2, round10SmallStyle, textColor, Color.black, 1.2f); num5 += num2; } } catch { } } private string BuildRound10PenaltyListText() { try { RefreshActorNamesFromCharacters(); List list = new List(); foreach (KeyValuePair item in round10BellPenaltyUntilByActor) { float num = item.Value - Time.time; if (!(num <= 0f)) { string text = (actorNames.ContainsKey(item.Key) ? actorNames[item.Key] : ("P" + item.Key)); list.Add(text + " 정지중"); } } if (list.Count == 0) { return ""; } return string.Join(", ", list.ToArray()); } catch { return ""; } } private void DrawRound10PenaltyGauge(float x, float y, float width) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) int round10LocalActor = GetRound10LocalActor(); if (round10LocalActor > 0 && round10BellPenaltyUntilByActor.TryGetValue(round10LocalActor, out var value)) { float num = value - Time.time; if (!(num <= 0f)) { float num2 = Mathf.Clamp01(num / 3f); Rect val = default(Rect); ((Rect)(ref val))..ctor(x, y, width, 30f); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(x, y, width * num2, 30f); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.72f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 0.22f, 0.16f, 0.92f); GUI.DrawTexture(val2, (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(val, "정지중 " + num.ToString("0.0") + "초", round10SmallStyle, Color.white, Color.black, 1.4f); } } } private int GetRound10LocalActor() { try { if ((Object)(object)Character.localCharacter != (Object)null) { int actorNumber = GetActorNumber(Character.localCharacter); if (actorNumber > 0) { return actorNumber; } } if (PhotonNetwork.LocalPlayer != null) { return PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } return -1; } private bool IsRound10ActorPenalized(int actor) { if (actor <= 0) { return false; } if (!round10BellPenaltyUntilByActor.TryGetValue(actor, out var value)) { return false; } return Time.time < value; } private string GetRound10FiveFruitText() { int[] round10FruitSums = GetRound10FruitSums(); for (int i = 0; i < round10FruitSums.Length; i++) { if (round10FruitSums[i] == 5) { return GetRound10FruitName(i); } } return ""; } private string BuildRound10FruitIcons(int fruit, int count) { string round10FruitEmoji = GetRound10FruitEmoji(fruit); string text = ""; for (int i = 0; i < count; i++) { if (i > 0) { text += ((i % 2 == 0) ? "\n" : " "); } text += round10FruitEmoji; } return text; } private string GetRound10FruitEmoji(int fruit) { return fruit switch { 0 => "\ud83c\udf47", 1 => "\ud83c\udf4f", 2 => "\ud83c\udf53", _ => "\ud83c\udf4c", }; } private string GetRound10FruitName(int fruit) { return fruit switch { 0 => "포도", 1 => "사과", 2 => "딸기", _ => "바나나", }; } private Color GetRound10FruitColor(int fruit) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) return (Color)(fruit switch { 0 => new Color(0.65f, 0.18f, 0.95f, 1f), 1 => new Color(0.25f, 0.85f, 0.12f, 1f), 2 => new Color(1f, 0.12f, 0.14f, 1f), _ => new Color(1f, 0.84f, 0.08f, 1f), }); } private void DrawStandingTileTimerUI() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) if (gameState == GameState.Running && enableStandingTileDelete.Value && (currentRoundType == RoundGameType.CloudDynamite || currentRoundType == RoundGameType.DoubleCloudCoconut)) { if (tileDeleteTimerStyle == null) { tileDeleteTimerStyle = new GUIStyle(GUI.skin.label); tileDeleteTimerStyle.alignment = (TextAnchor)4; tileDeleteTimerStyle.fontSize = 22; tileDeleteTimerStyle.fontStyle = (FontStyle)1; tileDeleteTimerStyle.normal.textColor = Color.white; } float standingTileStartDelayForCurrentRound = GetStandingTileStartDelayForCurrentRound(); float num = Time.time - currentRoundRunningStartTime; string text; if (num < standingTileStartDelayForCurrentRound) { int num2 = Mathf.CeilToInt(standingTileStartDelayForCurrentRound - num); text = ((currentRoundType == RoundGameType.CloudDynamite) ? ("바깥쪽 구름균류 붕괴까지 " + num2 + "초") : ("발판 사라짐 시작까지 " + num2 + "초")); } else { text = ((currentRoundType == RoundGameType.CloudDynamite) ? "바깥쪽부터 구름균류가 사라집니다" : "밟은 구름균류가 사라집니다"); } float num3 = 520f; float num4 = 34f; float num5 = ((float)Screen.width - num3) * 0.5f; float num6 = (showDynamiteChargeBar ? 52f : 24f); DrawOutlinedLabel(new Rect(num5, num6, num3, num4), TranslateUiText(text), tileDeleteTimerStyle, Color.white, new Color(0f, 0f, 0f, 0.85f), 2f); } } private void DrawOutlinedLabel(Rect rect, string text, GUIStyle style, Color textColor, Color outlineColor, float offset) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) text = TranslateUiText(text); Color textColor2 = style.normal.textColor; style.normal.textColor = outlineColor; GUI.Label(new Rect(((Rect)(ref rect)).x - offset, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x + offset, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y - offset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + offset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x - offset, ((Rect)(ref rect)).y - offset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x + offset, ((Rect)(ref rect)).y - offset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x - offset, ((Rect)(ref rect)).y + offset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); GUI.Label(new Rect(((Rect)(ref rect)).x + offset, ((Rect)(ref rect)).y + offset, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); style.normal.textColor = textColor; GUI.Label(rect, text, style); style.normal.textColor = textColor2; } private Font GetRoundEndNoticeFont() { if ((Object)(object)roundEndNoticeFont != (Object)null) { return roundEndNoticeFont; } try { roundEndNoticeFont = Font.CreateDynamicFontFromOSFont(new string[5] { "Arial Rounded MT Bold", "Segoe UI Rounded", "NanumSquareRound", "NanumGothic", "Malgun Gothic" }, 32); } catch { roundEndNoticeFont = null; } return roundEndNoticeFont; } private void ShowCenterNotice(string text, float duration, Color color, bool thickRounded) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0.1f, duration); centerNoticeText = text; centerNoticeStartTime = Time.time; centerNoticeDuration = num; centerNoticeUntil = Time.time + num; centerNoticeColor = color; centerNoticeThickRounded = thickRounded; centerNoticeRoundEndStyle = false; } private void ClearCenterNoticeOnly() { centerNoticeText = ""; centerNoticeUntil = 0f; centerNoticeStartTime = 0f; centerNoticeDuration = 0f; centerNoticeRoundEndStyle = false; centerNoticeThickRounded = false; } private float GetRoundEndNoticeDuration() { if (roundEndNoticeDuration == null) { return 7.2f; } return Mathf.Clamp(roundEndNoticeDuration.Value, 1f, 20f); } private void ShowRoundEndNotice(string text, float duration, Color color) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Max(0.1f, duration); centerNoticeText = text; centerNoticeStartTime = Time.time; centerNoticeDuration = num; centerNoticeUntil = Time.time + num; centerNoticeColor = color; centerNoticeThickRounded = false; centerNoticeRoundEndStyle = true; } private void ShowReadyNotice(float duration) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) ShowCenterNotice("Ready", duration, Color.white, thickRounded: true); } private void ShowStartNotice(float duration) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) ShowCenterNotice("Start", duration, new Color(1f, 0.68f, 0.38f, 1f), thickRounded: true); } private void RaiseCenterNoticeToAll(string text, float duration, Color color, bool thickRounded) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) object[] data = new object[9] { text, duration, color.r, color.g, color.b, color.a, thickRounded, (int)currentRoundType, currentRoundIndex }; ApplyCenterNoticeEventLocal(data); RaiseSimpleEvent(109, data, (ReceiverGroup)0); } private void ApplyCenterNoticeEventLocal(object[] data) { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if (data != null && data.Length >= 7) { string text = Convert.ToString(data[0]); float duration = Convert.ToSingle(data[1]); Color color = default(Color); ((Color)(ref color))..ctor(Convert.ToSingle(data[2]), Convert.ToSingle(data[3]), Convert.ToSingle(data[4]), Convert.ToSingle(data[5])); bool thickRounded = Convert.ToBoolean(data[6]); if (data.Length >= 9) { currentRoundType = (RoundGameType)Convert.ToInt32(data[7]); currentRoundIndex = Convert.ToInt32(data[8]); } if (gameState == GameState.Idle || gameState == GameState.SpawningArena) { gameState = GameState.RoundStarting; } ShowCenterNotice(text, duration, color, thickRounded); } } [IteratorStateMachine(typeof(d__833))] private IEnumerator DisableBeachObjectsDelayedRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__833(0) { <>4__this = this }; } private void OnGameStartSettingChanged(object sender, EventArgs e) { if (!enableMod.Value) { return; } if (suppressGameStartToggleEvents) { lastGameStartValue = gameStart.Value; return; } if (singleRoundTestRunning) { lastGameStartValue = gameStart.Value; return; } if (gameStart.Value) { TryStartAutoGame(); } else { StopAndResetGame(); } lastGameStartValue = gameStart.Value; } private void OnRound1StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound1StartValue = round1Start.Value; if (round1Start.Value) { TryStartSingleRound(RoundGameType.CloudDynamite); ResetRoundStartToggleButton(RoundGameType.CloudDynamite); } } } private void OnRound2StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound2StartValue = round2Start.Value; if (round2Start.Value) { TryStartSingleRound(RoundGameType.ShelfHook); ResetRoundStartToggleButton(RoundGameType.ShelfHook); } } } private void OnRound3StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound3StartValue = round3Start.Value; if (round3Start.Value) { TryStartSingleRound(RoundGameType.BounceFrisbee); ResetRoundStartToggleButton(RoundGameType.BounceFrisbee); } } } private void OnRound4StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound4StartValue = round4Start.Value; if (round4Start.Value) { TryStartSingleRound(RoundGameType.DoubleCloudCoconut); ResetRoundStartToggleButton(RoundGameType.DoubleCloudCoconut); } } } private void OnRound5StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound5StartValue = round5Start.Value; if (round5Start.Value) { TryStartSingleRound(RoundGameType.RhythmGame); ResetRoundStartToggleButton(RoundGameType.RhythmGame); } } } private void OnRound6StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound6StartValue = round6Start.Value; if (round6Start.Value) { TryStartSingleRound(RoundGameType.ColorCloudSurvival); ResetRoundStartToggleButton(RoundGameType.ColorCloudSurvival); } } } private void OnRound7StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound7StartValue = round7Start.Value; if (round7Start.Value) { TryStartSingleRound(RoundGameType.ButtonMashRace); ResetRoundStartToggleButton(RoundGameType.ButtonMashRace); } } } private void OnRound8StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound8StartValue = round8Start.Value; if (round8Start.Value) { TryStartSingleRound(RoundGameType.StarGrid); ResetRoundStartToggleButton(RoundGameType.StarGrid); } } } private void OnRound9StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound9StartValue = round9Start.Value; if (round9Start.Value) { TryStartSingleRound(RoundGameType.MemoryMatch); ResetRoundStartToggleButton(RoundGameType.MemoryMatch); } } } private void OnRound10StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound10StartValue = round10Start.Value; if (round10Start.Value) { TryStartSingleRound(RoundGameType.HalliGalli); ResetRoundStartToggleButton(RoundGameType.HalliGalli); } } } private void OnRound11StartSettingChanged(object sender, EventArgs e) { if (enableMod.Value && !suppressRoundStartToggleEvents) { lastRound11StartValue = round11Start.Value; if (round11Start.Value) { TryStartSingleRound(RoundGameType.DinoRun); ResetRoundStartToggleButton(RoundGameType.DinoRun); } } } private void OnBeachTreesEnabledSettingChanged(object sender, EventArgs e) { if (enableMod.Value) { if (beachTreesEnabled.Value) { RestoreBeachObjects(); } else { DisableBeachObjects(); } lastBeachTreesEnabledValue = beachTreesEnabled.Value; } } private void HandleGameStartToggle() { if (suppressGameStartToggleEvents || gameStart.Value == lastGameStartValue) { return; } lastGameStartValue = gameStart.Value; if (!singleRoundTestRunning) { if (gameStart.Value) { TryStartAutoGame(); } else { StopAndResetGame(); } } } private void ResetRoundStartToggleButton(RoundGameType roundType) { suppressRoundStartToggleEvents = true; try { if (roundType == RoundGameType.CloudDynamite && round1Start != null) { round1Start.Value = false; } if (roundType == RoundGameType.ShelfHook && round2Start != null) { round2Start.Value = false; } if (roundType == RoundGameType.BounceFrisbee && round3Start != null) { round3Start.Value = false; } if (roundType == RoundGameType.DoubleCloudCoconut && round4Start != null) { round4Start.Value = false; } if (roundType == RoundGameType.RhythmGame && round5Start != null) { round5Start.Value = false; } if (roundType == RoundGameType.ColorCloudSurvival && round6Start != null) { round6Start.Value = false; } if (roundType == RoundGameType.ButtonMashRace && round7Start != null) { round7Start.Value = false; } if (roundType == RoundGameType.StarGrid && round8Start != null) { round8Start.Value = false; } if (roundType == RoundGameType.MemoryMatch && round9Start != null) { round9Start.Value = false; } if (roundType == RoundGameType.HalliGalli && round10Start != null) { round10Start.Value = false; } if (roundType == RoundGameType.DinoRun && round11Start != null) { round11Start.Value = false; } } catch { } finally { suppressRoundStartToggleEvents = false; SyncLastRoundStartToggleValues(); } } private void SyncLastRoundStartToggleValues() { try { if (round1Start != null) { lastRound1StartValue = round1Start.Value; } if (round2Start != null) { lastRound2StartValue = round2Start.Value; } if (round3Start != null) { lastRound3StartValue = round3Start.Value; } if (round4Start != null) { lastRound4StartValue = round4Start.Value; } if (round5Start != null) { lastRound5StartValue = round5Start.Value; } if (round6Start != null) { lastRound6StartValue = round6Start.Value; } if (round7Start != null) { lastRound7StartValue = round7Start.Value; } if (round8Start != null) { lastRound8StartValue = round8Start.Value; } if (round9Start != null) { lastRound9StartValue = round9Start.Value; } if (round10Start != null) { lastRound10StartValue = round10Start.Value; } if (round11Start != null) { lastRound11StartValue = round11Start.Value; } } catch { } } private void HandleRoundStartToggles() { if (suppressRoundStartToggleEvents) { return; } if (round1Start.Value != lastRound1StartValue) { lastRound1StartValue = round1Start.Value; if (round1Start.Value) { TryStartSingleRound(RoundGameType.CloudDynamite); ResetRoundStartToggleButton(RoundGameType.CloudDynamite); } } if (round2Start.Value != lastRound2StartValue) { lastRound2StartValue = round2Start.Value; if (round2Start.Value) { TryStartSingleRound(RoundGameType.ShelfHook); ResetRoundStartToggleButton(RoundGameType.ShelfHook); } } if (round3Start.Value != lastRound3StartValue) { lastRound3StartValue = round3Start.Value; if (round3Start.Value) { TryStartSingleRound(RoundGameType.BounceFrisbee); ResetRoundStartToggleButton(RoundGameType.BounceFrisbee); } } if (round4Start.Value != lastRound4StartValue) { lastRound4StartValue = round4Start.Value; if (round4Start.Value) { TryStartSingleRound(RoundGameType.DoubleCloudCoconut); ResetRoundStartToggleButton(RoundGameType.DoubleCloudCoconut); } } if (round5Start.Value != lastRound5StartValue) { lastRound5StartValue = round5Start.Value; if (round5Start.Value) { TryStartSingleRound(RoundGameType.RhythmGame); ResetRoundStartToggleButton(RoundGameType.RhythmGame); } } if (round6Start.Value != lastRound6StartValue) { lastRound6StartValue = round6Start.Value; if (round6Start.Value) { TryStartSingleRound(RoundGameType.ColorCloudSurvival); ResetRoundStartToggleButton(RoundGameType.ColorCloudSurvival); } } if (round7Start.Value != lastRound7StartValue) { lastRound7StartValue = round7Start.Value; if (round7Start.Value) { TryStartSingleRound(RoundGameType.ButtonMashRace); ResetRoundStartToggleButton(RoundGameType.ButtonMashRace); } } if (round8Start.Value != lastRound8StartValue) { lastRound8StartValue = round8Start.Value; if (round8Start.Value) { TryStartSingleRound(RoundGameType.StarGrid); ResetRoundStartToggleButton(RoundGameType.StarGrid); } } if (round9Start.Value != lastRound9StartValue) { lastRound9StartValue = round9Start.Value; if (round9Start.Value) { TryStartSingleRound(RoundGameType.MemoryMatch); ResetRoundStartToggleButton(RoundGameType.MemoryMatch); } } if (round10Start.Value != lastRound10StartValue) { lastRound10StartValue = round10Start.Value; if (round10Start.Value) { TryStartSingleRound(RoundGameType.HalliGalli); ResetRoundStartToggleButton(RoundGameType.HalliGalli); } } if (round11Start.Value != lastRound11StartValue) { lastRound11StartValue = round11Start.Value; if (round11Start.Value) { TryStartSingleRound(RoundGameType.DinoRun); ResetRoundStartToggleButton(RoundGameType.DinoRun); } } } private void ForceNightForMiniGameStart() { if (forceNightOnGameStart != null && forceNightOnGameStart.Value) { float num = Mathf.Clamp((forcedNightTimeOfDay != null) ? forcedNightTimeOfDay.Value : 22.5f, 0f, 24f); SetMiniGameNightLocal(num); RaiseSimpleEvent(113, new object[1] { num }, (ReceiverGroup)0); } } private void SetMiniGameNightLocal(float time) { try { DayNightManager instance = DayNightManager.instance; if (!((Object)(object)instance == (Object)null)) { time = Mathf.Clamp(time, 0f, 24f); instance.setTimeOfDay(time); instance.RPCA_SyncTime(time); instance.UpdateCycle(); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Failed to force night time: " + ex.Message)); } } private void TryPatchFlareStartHook() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown try { if (harmony == null) { harmony = new Harmony("songt.peak.cloudarena.flare_start"); harmony.PatchAll(typeof(Plugin).Assembly); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Flare start hook patched."); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Flare start hook patch failed: " + ex.Message)); } } internal void RequestStartFromFlare() { try { if (enableMod != null && enableMod.Value && !(Time.time < lastFlareStartRequestTime + 1f)) { lastFlareStartRequestTime = Time.time; if (PhotonNetwork.InRoom && !PhotonNetwork.OfflineMode && !PhotonNetwork.IsMasterClient) { RaiseMiniGameEvent(122, Array.Empty(), (ReceiverGroup)2); ((BaseUnityPlugin)this).Logger.LogInfo((object)"[FlareStart] Non-host sent start request to host."); } else { StartGameFromFlareAsAuthority(); } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("RequestStartFromFlare failed: " + ex.Message)); } } private void HandleFlareStartRequestEvent() { try { if (!PhotonNetwork.InRoom || PhotonNetwork.IsMasterClient) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"[FlareStart] Host received flare start request."); StartGameFromFlareAsAuthority(); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("HandleFlareStartRequestEvent failed: " + ex.Message)); } } private void StartGameFromFlareAsAuthority() { if (enableMod == null || !enableMod.Value || (PhotonNetwork.InRoom && !PhotonNetwork.IsMasterClient)) { return; } if (!IsProbablyInIslandMap()) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"[FlareStart] Host rejected flare start: not in island map."); return; } if (gameState != 0) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[FlareStart] Host rejected flare start: gameState=" + gameState)); return; } if (mainGameRoutine != null) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"[FlareStart] Host rejected flare start: mainGameRoutine already running."); return; } if (singleRoundTestRunning) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"[FlareStart] Host rejected flare start: single round test running."); return; } suppressGameStartToggleEvents = true; try { gameStart.Value = true; lastGameStartValue = true; } finally { suppressGameStartToggleEvents = false; } StartFlareReadyPhaseAsAuthority(); } private void StartFlareReadyPhaseAsAuthority() { if (enableMod == null || !enableMod.Value || (PhotonNetwork.InRoom && !PhotonNetwork.IsMasterClient)) { return; } if (flareReadyRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(flareReadyRoutine); } catch { } flareReadyRoutine = null; } flareReadyRoutine = ((MonoBehaviour)this).StartCoroutine(FlareReadyThenStartRoutine()); } [IteratorStateMachine(typeof(d__858))] private IEnumerator FlareReadyThenStartRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__858(0) { <>4__this = this }; } private void BuildFlareReadyActorList() { flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); RefreshActorNamesFromCharacters(); try { if (PhotonNetwork.InRoom && PhotonNetwork.PlayerList != null && PhotonNetwork.PlayerList.Length != 0) { Player[] playerList = PhotonNetwork.PlayerList; foreach (Player val in playerList) { if (val != null) { int actorNumber = val.ActorNumber; if (!flareReadyActorOrder.Contains(actorNumber)) { flareReadyActorOrder.Add(actorNumber); } string value = val.NickName; if (string.IsNullOrWhiteSpace(value)) { value = (actorNames.ContainsKey(actorNumber) ? actorNames[actorNumber] : ("Player " + actorNumber)); } flareReadyActorNames[actorNumber] = value; if (!string.IsNullOrWhiteSpace(value)) { actorNames[actorNumber] = value; } } } } } catch { } try { if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter == (Object)null) { continue; } int actorNumber2 = GetActorNumber(allCharacter); if (actorNumber2 > 0) { if (!flareReadyActorOrder.Contains(actorNumber2)) { flareReadyActorOrder.Add(actorNumber2); } string characterDisplayName = GetCharacterDisplayName(allCharacter); if (!string.IsNullOrWhiteSpace(characterDisplayName)) { flareReadyActorNames[actorNumber2] = characterDisplayName; actorNames[actorNumber2] = characterDisplayName; } } } } } catch { } if (flareReadyActorOrder.Count == 0 && (Object)(object)Character.localCharacter != (Object)null) { int actorNumber3 = GetActorNumber(Character.localCharacter); if (actorNumber3 > 0) { flareReadyActorOrder.Add(actorNumber3); string characterDisplayName2 = GetCharacterDisplayName(Character.localCharacter); flareReadyActorNames[actorNumber3] = (string.IsNullOrWhiteSpace(characterDisplayName2) ? ("Player " + actorNumber3) : characterDisplayName2); } } flareReadyActorOrder.Sort(); } private object[] BuildFlareReadyStartEventData() { int[] array = flareReadyActorOrder.ToArray(); string[] array2 = new string[array.Length]; for (int i = 0; i < array.Length; i++) { int key = array[i]; if (flareReadyActorNames.ContainsKey(key)) { array2[i] = flareReadyActorNames[key]; } else if (actorNames.ContainsKey(key)) { array2[i] = actorNames[key]; } else { array2[i] = "Player " + key; } } return new object[3] { flareReadySequence, array, array2 }; } private bool AreAllFlareReadyActorsReady() { if (flareReadyActorOrder.Count <= 0) { return false; } for (int i = 0; i < flareReadyActorOrder.Count; i++) { int key = flareReadyActorOrder[i]; if (!flareReadyByActor.ContainsKey(key) || !flareReadyByActor[key]) { return false; } } return true; } private void ApplyFlareReadyStartLocal(object[] data) { try { ForceEndAllLocalRoundUiStates("FlareReadyStart"); StopTimingBgm(); StopRoundEndFrontCamera(); ClearCenterNoticeOnly(); roundVoteActive = false; int num = ((data != null && data.Length >= 1) ? Convert.ToInt32(data[0]) : (flareReadySequence + 1)); flareReadySequence = num; flareReadyActive = true; flareReadyLocalConfirmed = false; flareReadyStartedAt = Time.unscaledTime; flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); int[] array = ((data != null && data.Length >= 2) ? (data[1] as int[]) : null); string[] array2 = ((data != null && data.Length >= 3) ? (data[2] as string[]) : null); if (array != null) { for (int i = 0; i < array.Length; i++) { int num2 = array[i]; if (!flareReadyActorOrder.Contains(num2)) { flareReadyActorOrder.Add(num2); } string value = ((array2 != null && i < array2.Length) ? array2[i] : (actorNames.ContainsKey(num2) ? actorNames[num2] : ("Player " + num2))); flareReadyActorNames[num2] = value; if (!string.IsNullOrWhiteSpace(value)) { actorNames[num2] = value; } flareReadyByActor[num2] = false; } } else { BuildFlareReadyActorList(); for (int j = 0; j < flareReadyActorOrder.Count; j++) { flareReadyByActor[flareReadyActorOrder[j]] = false; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("[FlareReady] Start UI local. seq=" + flareReadySequence + " players=" + flareReadyActorOrder.Count)); if (IsLocalThirdPersonAlreadyEnabled()) { ConfirmLocalFlareReadyOnce("AlreadyThirdPersonOnStart"); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("ApplyFlareReadyStartLocal failed: " + ex.Message)); } } private void ApplyFlareReadySubmitLocal(object[] data) { try { if (data == null || data.Length < 2) { return; } int num = Convert.ToInt32(data[0]); int num2 = Convert.ToInt32(data[1]); if (num != flareReadySequence) { return; } flareReadyByActor[num2] = true; if (!flareReadyActorOrder.Contains(num2)) { flareReadyActorOrder.Add(num2); } if (data.Length >= 3) { string value = Convert.ToString(data[2]); if (!string.IsNullOrWhiteSpace(value)) { flareReadyActorNames[num2] = value; actorNames[num2] = value; } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("ApplyFlareReadySubmitLocal failed: " + ex.Message)); } } private void ApplyFlareReadyEndLocal(object[] data) { try { int num = ((data != null && data.Length >= 1) ? Convert.ToInt32(data[0]) : flareReadySequence); if (num == flareReadySequence || !flareReadyActive) { bool flag = data != null && data.Length >= 2 && Convert.ToBoolean(data[1]); flareReadyActive = false; if (!flag) { flareReadyLocalConfirmed = false; flareReadyThirdPersonLockUntil = -999f; FastBlockThirdPersonVInput = false; } else { FastBlockThirdPersonVInput = true; } flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[FlareReady] End local. seq=" + num)); } } catch { flareReadyActive = false; flareReadyLocalConfirmed = false; FastBlockThirdPersonVInput = false; FastBlockThirdPersonVInput = false; } } private bool IsLocalThirdPersonAlreadyEnabled() { try { bool enabled; return TryGetThirdPersonToggleEnabled(out enabled) && enabled; } catch { return false; } } private void ConfirmLocalFlareReadyOnce(string reason) { if (!flareReadyActive || flareReadyLocalConfirmed) { return; } int num = -1; try { if ((Object)(object)Character.localCharacter != (Object)null) { num = GetActorNumber(Character.localCharacter); } } catch { } if (num <= 0) { try { if (PhotonNetwork.LocalPlayer != null) { num = PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } } if (num > 0) { flareReadyLocalConfirmed = true; FastBlockThirdPersonVInput = true; string text = (actorNames.ContainsKey(num) ? actorNames[num] : ""); if ((Object)(object)Character.localCharacter != (Object)null) { text = GetCharacterDisplayName(Character.localCharacter); } if (string.IsNullOrWhiteSpace(text)) { text = "Player " + num; } object[] data = new object[3] { flareReadySequence, num, text }; ApplyFlareReadySubmitLocal(data); RaiseMiniGameEvent(139, data, (ReceiverGroup)1); thirdPersonToggleWasAlreadyOnBeforePartyGames = TryGetThirdPersonToggleEnabled(out var enabled) && enabled; thirdPersonToggleManagedActive = true; TrySetThirdPersonToggleEnabled(enabled: true); TrySetThirdPersonToggleKeyBlocked(block: true); TrySetThirdPersonToggleDistanceLocked(locked: true); forcedThirdPersonCameraActive = true; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[FlareReady] Local player ready. reason=" + reason + ", actor=" + num)); } } private void HandleFlareReadyLocalInput() { if (flareReadyActive && !flareReadyLocalConfirmed) { if (IsLocalThirdPersonAlreadyEnabled()) { ConfirmLocalFlareReadyOnce("AlreadyThirdPerson"); } else if (Input.GetKeyDown((KeyCode)118)) { ConfirmLocalFlareReadyOnce("PressedV"); } } } private void DrawFlareReadyPanelBox(Rect rect, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) Color color2 = GUI.color; GUI.color = color; GUI.DrawTexture(rect, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.22f); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + ((Rect)(ref rect)).height - 2f, ((Rect)(ref rect)).width, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y, 2f, ((Rect)(ref rect)).height), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x + ((Rect)(ref rect)).width - 2f, ((Rect)(ref rect)).y, 2f, ((Rect)(ref rect)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color2; } private void DrawFlareReadyUI() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) if (flareReadyActive) { if (flareReadyTitleStyle == null) { flareReadyTitleStyle = new GUIStyle(GUI.skin.label); flareReadyTitleStyle.alignment = (TextAnchor)4; flareReadyTitleStyle.fontSize = 34; flareReadyTitleStyle.fontStyle = (FontStyle)1; flareReadyTitleStyle.normal.textColor = Color.white; } if (flareReadyLineStyle == null) { flareReadyLineStyle = new GUIStyle(GUI.skin.label); flareReadyLineStyle.alignment = (TextAnchor)3; flareReadyLineStyle.fontSize = 18; flareReadyLineStyle.fontStyle = (FontStyle)1; flareReadyLineStyle.normal.textColor = Color.white; } if (flareReadyHintStyle == null) { flareReadyHintStyle = new GUIStyle(GUI.skin.label); flareReadyHintStyle.alignment = (TextAnchor)4; flareReadyHintStyle.fontSize = 20; flareReadyHintStyle.fontStyle = (FontStyle)1; flareReadyHintStyle.normal.textColor = new Color(0.75f, 0.95f, 1f, 1f); } float num = 560f; float num2 = 290f + (float)Mathf.Max(0, flareReadyActorOrder.Count - 1) * 48f; Rect rect = default(Rect); ((Rect)(ref rect))..ctor(((float)Screen.width - num) * 0.5f, ((float)Screen.height - num2) * 0.5f, num, num2); DrawFlareReadyPanelBox(rect, new Color(0f, 0f, 0f, 0.72f)); DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x + 20f, ((Rect)(ref rect)).y + 18f, ((Rect)(ref rect)).width - 40f, 52f), "게임준비 : V", flareReadyTitleStyle, Color.white, Color.black, 2f); DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x + 20f, ((Rect)(ref rect)).y + 72f, ((Rect)(ref rect)).width - 40f, 40f), "V를 눌러 3인칭 Ready", flareReadyHintStyle, new Color(0.72f, 0.95f, 1f, 1f), Color.black, 1.5f); RefreshActorNamesFromCharacters(); float num3 = ((Rect)(ref rect)).y + 132f; for (int i = 0; i < flareReadyActorOrder.Count; i++) { int key = flareReadyActorOrder[i]; string text = (flareReadyActorNames.ContainsKey(key) ? flareReadyActorNames[key] : (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key))); bool flag = flareReadyByActor.ContainsKey(key) && flareReadyByActor[key]; Color textColor = (flag ? new Color(0.55f, 1f, 0.55f, 1f) : new Color(1f, 0.92f, 0.55f, 1f)); DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x + 70f, num3, ((Rect)(ref rect)).width - 170f, 44f), text, flareReadyLineStyle, textColor, Color.black, 1.5f); GUIStyle style = flareReadyLineStyle; DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x + ((Rect)(ref rect)).width - 120f, num3, 70f, 44f), flag ? "✓" : "…", style, textColor, Color.black, 1.5f); num3 += 48f; } } } private void TryKeepThirdPersonToggleOffForRoundEndCameraThrottled() { try { if (!ShouldSuppressThirdPersonToggleRuntimeCameraNow()) { return; } float unscaledTime = Time.unscaledTime; if (!roundEndCameraThirdPersonOffAppliedOnce || !(unscaledTime < roundEndCameraNextThirdPersonOffAttempt)) { roundEndCameraPerfThirdPersonSuppressCalls++; if (TryGetThirdPersonToggleEnabled(out var enabled) && enabled) { TrySetThirdPersonToggleEnabled(enabled: false); TrySetThirdPersonToggleKeyBlocked(block: true); } roundEndCameraThirdPersonOffAppliedOnce = true; roundEndCameraNextThirdPersonOffAttempt = unscaledTime + 0.75f; } } catch { } } internal bool ShouldBlockThirdPersonToggleVKeyNow() { try { if (!enableMod.Value) { return false; } if (roundEndFrontCameraActive) { return true; } if (flareReadyActive && flareReadyLocalConfirmed) { return true; } if (flareReadyLocalConfirmed && (gameState != 0 || roundFinishInProgress || roundVoteActive || roundResultPanelActive || autoScoreboardUntil > Time.time || finalScoreboardActive)) { return true; } if (thirdPersonToggleManagedActive && (gameState != 0 || roundFinishInProgress || roundVoteActive || roundResultPanelActive || autoScoreboardUntil > Time.time || finalScoreboardActive)) { return true; } } catch { } return false; } private void UpdateFastThirdPersonVInputBlockCache() { FastBlockThirdPersonVInput = ShouldBlockThirdPersonToggleVKeyNow(); } internal static bool ShouldFastBlockThirdPersonVInput() { return FastBlockThirdPersonVInput; } internal bool ShouldSuppressThirdPersonToggleRuntimeCameraNow() { try { return enableMod != null && enableMod.Value && roundEndFrontCameraActive; } catch { return false; } } internal void ForceThirdPersonToggleOffForFixedCamera() { TryKeepThirdPersonToggleOffForRoundEndCameraThrottled(); } internal void RepairThirdPersonToggleAfterDependencyUpdate() { try { if (ShouldSuppressThirdPersonToggleRuntimeCameraNow()) { TryKeepThirdPersonToggleOffForRoundEndCameraThrottled(); } else if (ShouldBlockThirdPersonToggleVKeyNow()) { TrySetThirdPersonToggleKeyBlocked(block: true); } } catch { } } private bool IsHostOrOffline() { try { if (PhotonNetwork.OfflineMode) { return true; } if (!PhotonNetwork.InRoom) { return true; } return PhotonNetwork.IsMasterClient; } catch { return true; } } private void TryStartAutoGame() { if (hostOnly.Value && !IsHostOrOffline()) { return; } if (!PhotonNetwork.InRoom && !PhotonNetwork.OfflineMode) { gameStart.Value = false; lastGameStartValue = false; return; } if (gameState != 0) { StopAndResetGame(); } ResetScoresForNewMatch(); TurnOffOnlyRoundStartTriggers(); ClearCenterNoticeOnly(); roundIntroUntil = -1f; roundIntroTitleText = ""; ForceNightForMiniGameStart(); mainGameRoutine = ((MonoBehaviour)this).StartCoroutine(AutoGameRoutine()); } private void TryStartSingleRound(RoundGameType roundType) { if ((hostOnly.Value && !IsHostOrOffline()) || (!PhotonNetwork.InRoom && !PhotonNetwork.OfflineMode)) { return; } if (gameState != 0 || round11DinoActive) { if (currentRoundType == roundType && roundType == RoundGameType.DinoRun && round11DinoActive) { LogRound11Debug("Round 11 restart requested. Force reset before restart. " + GetRound11StateString()); } StopAndResetGame(); } activeSingleRoundTestType = roundType; singleRoundTestRunning = true; if (mainGameRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(mainGameRoutine); } catch { } mainGameRoutine = null; } ResetScoresForNewMatch(); ForceNightForMiniGameStart(); SetOnlyThisRoundToggleOn(roundType); mainGameRoutine = ((MonoBehaviour)this).StartCoroutine(SingleRoundTestRoutine(roundType)); } private void SetOnlyThisRoundToggleOn(RoundGameType roundType) { suppressRoundStartToggleEvents = true; try { round1Start.Value = roundType == RoundGameType.CloudDynamite; round2Start.Value = roundType == RoundGameType.ShelfHook; round3Start.Value = roundType == RoundGameType.BounceFrisbee; round4Start.Value = roundType == RoundGameType.DoubleCloudCoconut; round5Start.Value = roundType == RoundGameType.RhythmGame; round6Start.Value = roundType == RoundGameType.ColorCloudSurvival; round7Start.Value = roundType == RoundGameType.ButtonMashRace; round8Start.Value = roundType == RoundGameType.StarGrid; round9Start.Value = roundType == RoundGameType.MemoryMatch; round10Start.Value = roundType == RoundGameType.HalliGalli; round11Start.Value = roundType == RoundGameType.DinoRun; } finally { suppressRoundStartToggleEvents = false; } lastRound1StartValue = round1Start.Value; lastRound2StartValue = round2Start.Value; lastRound3StartValue = round3Start.Value; lastRound4StartValue = round4Start.Value; lastRound5StartValue = round5Start.Value; lastRound6StartValue = round6Start.Value; lastRound7StartValue = round7Start.Value; lastRound8StartValue = round8Start.Value; lastRound9StartValue = round9Start.Value; lastRound10StartValue = round10Start.Value; lastRound11StartValue = round11Start.Value; } [IteratorStateMachine(typeof(d__881))] private IEnumerator AutoGameRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__881(0) { <>4__this = this }; } private bool IsRoundEndPresentationStillActive() { if (!roundEndPresentationComplete) { return true; } if (roundFinishInProgress) { return true; } if (gameState == GameState.RoundEnding) { return true; } if (roundEndStartedAt > 0f) { return true; } if (roundResultPanelActive) { return true; } if (roundEndEmoteRoutine != null) { return true; } if (autoScoreboardUntil > Time.time) { return true; } if (roundBetweenMovementLockUntil > Time.time && gameState != GameState.RoundStarting && gameState != GameState.Running) { return true; } return false; } [IteratorStateMachine(typeof(d__883))] private IEnumerator WaitForRoundEndPresentationCompleteRoutine(string reason) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__883(0) { <>4__this = this, reason = reason }; } [IteratorStateMachine(typeof(d__884))] private IEnumerator RunRoundVoteSelectionRoutine(int voteRoundNumber, int roundsToPlay, Action onSelected) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__884(0) { <>4__this = this, voteRoundNumber = voteRoundNumber, roundsToPlay = roundsToPlay, onSelected = onSelected }; } private RoundGameType[] PickRoundVoteOptions() { List list = new List(); BuildRoundOrder(); for (int i = 0; i < currentRoundOrder.Count; i++) { RoundGameType item = currentRoundOrder[i]; if (!votedPlayedRounds.Contains(item)) { list.Add(item); } } if (list.Count < 3) { for (int j = 0; j < currentRoundOrder.Count; j++) { RoundGameType item2 = currentRoundOrder[j]; if (!list.Contains(item2)) { list.Add(item2); } } } RoundGameType[] array = new RoundGameType[3]; for (int k = 0; k < 3; k++) { if (list.Count == 0) { array[k] = RoundGameType.CloudDynamite; continue; } int num = 0; for (int l = 0; l < list.Count; l++) { num += GetRoundVoteWeight(list[l]); } int num2 = Random.Range(0, Mathf.Max(1, num)); int index = 0; for (int m = 0; m < list.Count; m++) { int roundVoteWeight = GetRoundVoteWeight(list[m]); if (num2 < roundVoteWeight) { index = m; break; } num2 -= roundVoteWeight; } array[k] = list[index]; list.RemoveAt(index); } return array; } private bool AllCurrentPlayersVoted() { RefreshActorNamesFromCharacters(); List currentRoundActorListForVote = GetCurrentRoundActorListForVote(); if (currentRoundActorListForVote.Count == 0) { return roundVoteByActor.Count > 0; } for (int i = 0; i < currentRoundActorListForVote.Count; i++) { if (!roundVoteByActor.ContainsKey(currentRoundActorListForVote[i])) { return false; } } return true; } private List GetCurrentRoundActorListForVote() { List list = new List(); try { if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if (!((Object)(object)allCharacter == (Object)null)) { int actorNumber = GetActorNumber(allCharacter); if (!list.Contains(actorNumber)) { list.Add(actorNumber); } } } } if (list.Count == 0 && (Object)(object)Character.localCharacter != (Object)null) { int actorNumber2 = GetActorNumber(Character.localCharacter); if (!list.Contains(actorNumber2)) { list.Add(actorNumber2); } } } catch { } list.Sort(); return list; } private int ResolveRoundVoteWinnerIndex() { int[] array = new int[3]; foreach (int value in roundVoteByActor.Values) { if (value >= 0 && value < 3) { array[value]++; } } int num = Mathf.Max(array[0], Mathf.Max(array[1], array[2])); List list = new List(); for (int i = 0; i < 3; i++) { if (array[i] == num) { list.Add(i); } } if (list.Count == 0) { return Random.Range(0, 3); } return list[Random.Range(0, list.Count)]; } private void ApplyRoundVoteStartLocal(object[] data) { ForceEndAllLocalRoundUiStates("VoteStart"); if (data != null && data.Length >= 7) { roundVoteSequence = Convert.ToInt32(data[0]); currentRoundIndex = Convert.ToInt32(data[1]); roundVoteOptions[0] = (RoundGameType)Convert.ToInt32(data[3]); roundVoteOptions[1] = (RoundGameType)Convert.ToInt32(data[4]); roundVoteOptions[2] = (RoundGameType)Convert.ToInt32(data[5]); float num = Convert.ToSingle(data[6]); roundVoteEndTime = Time.time + Mathf.Max(1f, num); roundVoteLocalChoice = -1; roundVoteLocalHoverChoice = 1; roundVoteByActor.Clear(); ClearCenterNoticeOnly(); roundIntroUntil = -1f; roundIntroTitleText = ""; roundResultPanelActive = false; roundResultPanelUntil = -1f; roundResultPanelForcedLines = null; roundResultPanelForcedTitle = ""; autoScoreboardUntil = -1f; if (roundEndEmoteRoutine != null) { ((MonoBehaviour)this).StopCoroutine(roundEndEmoteRoutine); roundEndEmoteRoutine = null; } roundVoteActive = true; gameState = GameState.RoundStarting; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[Vote] Start UI local: " + currentRoundIndex + "/7 options=" + GetRoundVoteDisplayName(roundVoteOptions[0]) + ", " + GetRoundVoteDisplayName(roundVoteOptions[1]) + ", " + GetRoundVoteDisplayName(roundVoteOptions[2]))); } } private void HandleRoundVoteSubmitEvent(object[] data) { if (data != null && data.Length >= 3) { int num = Convert.ToInt32(data[0]); if (num == roundVoteSequence) { int key = Convert.ToInt32(data[1]); int value = Mathf.Clamp(Convert.ToInt32(data[2]), 0, 2); roundVoteByActor[key] = value; } } } private void HandleRoundVoteLocalInput() { if (!roundVoteActive) { return; } if (roundVoteLocalHoverChoice < 0 || roundVoteLocalHoverChoice > 2) { roundVoteLocalHoverChoice = 1; } if (roundVoteLocalChoice < 0) { if (Input.GetKeyDown((KeyCode)97)) { roundVoteLocalHoverChoice = (roundVoteLocalHoverChoice + 2) % 3; PlayRoundVoteSelectSound(); } else if (Input.GetKeyDown((KeyCode)100)) { roundVoteLocalHoverChoice = (roundVoteLocalHoverChoice + 1) % 3; PlayRoundVoteSelectSound(); } if (Input.GetKeyDown((KeyCode)32)) { int num = Mathf.Clamp(roundVoteLocalHoverChoice, 0, 2); int localActorNumberSafe = GetLocalActorNumberSafe(); roundVoteLocalChoice = num; roundVoteByActor[localActorNumberSafe] = num; PlayRoundVoteSelectSound(); RaiseMiniGameEvent(137, new object[3] { roundVoteSequence, localActorNumberSafe, num }, (ReceiverGroup)1); } } } private bool IsFavoriteRoundVoteGame(RoundGameType t) { return t == RoundGameType.CloudDynamite || t == RoundGameType.DoubleCloudCoconut || t == RoundGameType.RhythmGame || t == RoundGameType.ColorCloudSurvival || t == RoundGameType.DinoRun; } private int GetRoundVoteWeight(RoundGameType t) { return (!IsFavoriteRoundVoteGame(t)) ? 1 : 3; } private string GetRoundVoteDisplayName(RoundGameType t) { string text = t switch { RoundGameType.CloudDynamite => "폭탄 구름섬", RoundGameType.ShelfHook => "타이밍 PVP", RoundGameType.BounceFrisbee => "별 도착 레이스", RoundGameType.DoubleCloudCoconut => "구름섬 서바이벌", RoundGameType.RhythmGame => "리듬게임", RoundGameType.ColorCloudSurvival => "색깔구름", RoundGameType.ButtonMashRace => "방향키 레이스", RoundGameType.StarGrid => "별 쟁탈전", RoundGameType.MemoryMatch => "기억력 PVP", RoundGameType.HalliGalli => "할리갈리", RoundGameType.DinoRun => "애니멀 점프", _ => t.ToString(), }; if (IsFavoriteRoundVoteGame(t)) { text += " ⭐"; } return text; } private string GetRoundVotePlayerNamesText(int choice) { RefreshActorNamesFromCharacters(); List list = new List(); foreach (KeyValuePair item in roundVoteByActor) { if (item.Value == choice) { string text = (actorNames.ContainsKey(item.Key) ? actorNames[item.Key] : ("Player " + item.Key)); if (!string.IsNullOrWhiteSpace(text) && !list.Contains(text)) { list.Add(text); } } } list.Sort(); if (list.Count == 0) { return "투표자 : 없음"; } return "투표자 : " + string.Join(", ", list.ToArray()); } private void EnsureRoundVoteAudio() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if ((Object)(object)roundVoteAudioSource == (Object)null) { GameObject val = new GameObject("PEAKPartyGames_RoundVoteAudio"); Object.DontDestroyOnLoad((Object)(object)val); roundVoteAudioSource = val.AddComponent(); roundVoteAudioSource.playOnAwake = false; roundVoteAudioSource.spatialBlend = 0f; roundVoteAudioSource.volume = 0.72f; } if ((Object)(object)roundVoteSelectClip == (Object)null) { roundVoteSelectClip = CreateRoundVoteSelectClip("RoundVote_Select_Pop", 44100); } } private void PlayRoundVoteSelectSound() { try { EnsureRoundVoteAudio(); if ((Object)(object)roundVoteAudioSource != (Object)null && (Object)(object)roundVoteSelectClip != (Object)null) { roundVoteAudioSource.PlayOneShot(roundVoteSelectClip, 0.78f); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Round vote select sound failed: " + ex.Message)); } } private AudioClip CreateRoundVoteSelectClip(string name, int sampleRate) { float num = 0.16f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Exp((0f - num3) * 13.5f); float num5 = Mathf.Lerp(820f, 1320f, Mathf.Clamp01(num3 / num)); float num6 = Mathf.Sin((float)Math.PI * 2f * num5 * num3); float num7 = Mathf.Sin((float)Math.PI * 4200f * num3) * Mathf.Exp((0f - num3) * 42f) * 0.35f; array[i] = (num6 * 0.55f + num7) * num4 * 0.75f; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void DrawRect(Rect rect, Color color) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Color color2 = GUI.color; GUI.color = color; GUI.DrawTexture(rect, (Texture)(object)Texture2D.whiteTexture); GUI.color = color2; } private void DrawRoundVoteSelectionUI() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Expected O, but got Unknown //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0527: Unknown result type (might be due to invalid IL or missing references) //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) if (!roundVoteActive) { return; } if (Time.time > roundVoteEndTime + 0.5f) { roundVoteActive = false; roundVoteLocalChoice = -1; roundVoteLocalHoverChoice = 1; return; } if (roundVoteTitleStyle == null) { roundVoteTitleStyle = new GUIStyle(GUI.skin.label); roundVoteTitleStyle.alignment = (TextAnchor)4; roundVoteTitleStyle.fontSize = 42; roundVoteTitleStyle.fontStyle = (FontStyle)1; roundVoteTitleStyle.normal.textColor = Color.white; } if (roundVoteOptionStyle == null) { roundVoteOptionStyle = new GUIStyle(GUI.skin.label); roundVoteOptionStyle.alignment = (TextAnchor)4; roundVoteOptionStyle.fontSize = 30; roundVoteOptionStyle.fontStyle = (FontStyle)1; roundVoteOptionStyle.wordWrap = true; roundVoteOptionStyle.normal.textColor = Color.white; } if (roundVoteSmallStyle == null) { roundVoteSmallStyle = new GUIStyle(GUI.skin.label); roundVoteSmallStyle.alignment = (TextAnchor)4; roundVoteSmallStyle.fontSize = 20; roundVoteSmallStyle.fontStyle = (FontStyle)1; roundVoteSmallStyle.normal.textColor = new Color(1f, 0.95f, 0.55f, 1f); } if (roundVotePlayerStyle == null) { roundVotePlayerStyle = new GUIStyle(GUI.skin.label); roundVotePlayerStyle.alignment = (TextAnchor)1; roundVotePlayerStyle.fontSize = 16; roundVotePlayerStyle.fontStyle = (FontStyle)1; roundVotePlayerStyle.wordWrap = true; roundVotePlayerStyle.normal.textColor = new Color(0.78f, 0.92f, 1f, 1f); } if (roundVoteCornerStyle == null) { roundVoteCornerStyle = new GUIStyle(GUI.skin.label); roundVoteCornerStyle.alignment = (TextAnchor)0; roundVoteCornerStyle.fontSize = 18; roundVoteCornerStyle.fontStyle = (FontStyle)1; roundVoteCornerStyle.normal.textColor = new Color(1f, 0.95f, 0.55f, 1f); } float num = Mathf.Max(0f, roundVoteEndTime - Time.time); string text = Mathf.Clamp(currentRoundIndex, 1, 7) + "번째 게임 / 7"; DrawOutlinedLabel(new Rect(18f, 18f, 260f, 34f), text, roundVoteCornerStyle, new Color(1f, 0.95f, 0.55f, 1f), Color.black, 2f); DrawOutlinedLabel(new Rect(0f, 70f, (float)Screen.width, 60f), "다음 게임 선택", roundVoteTitleStyle, Color.white, Color.black, 3f); DrawOutlinedLabel(new Rect(0f, 122f, (float)Screen.width, 36f), "A/D 순환 이동 · Space 확정 · " + num.ToString("0.0") + "초", roundVoteSmallStyle, new Color(1f, 0.95f, 0.55f, 1f), Color.black, 2f); float num2 = Mathf.Min(300f, (float)Screen.width * 0.28f); float num3 = 205f; float num4 = (float)Screen.height * 0.39f; float[] array = new float[3] { (float)Screen.width * 0.22f - num2 * 0.5f, (float)Screen.width * 0.5f - num2 * 0.5f, (float)Screen.width * 0.78f - num2 * 0.5f }; int[] array2 = new int[3]; foreach (int value in roundVoteByActor.Values) { if (value >= 0 && value < 3) { array2[value]++; } } Rect rect = default(Rect); for (int i = 0; i < 3; i++) { ((Rect)(ref rect))..ctor(array[i], num4, num2, num3); bool flag = roundVoteLocalChoice == i; bool flag2 = roundVoteLocalChoice < 0 && roundVoteLocalHoverChoice == i; Color color = (flag ? new Color(0.25f, 0.65f, 0.25f, 0.78f) : (flag2 ? new Color(0.25f, 0.45f, 0.9f, 0.74f) : new Color(0f, 0f, 0f, 0.62f))); DrawRect(rect, color); DrawRect(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, (flag2 || flag) ? 7f : 4f), flag ? new Color(0.55f, 1f, 0.55f, 0.95f) : (flag2 ? new Color(0.75f, 0.9f, 1f, 0.95f) : new Color(1f, 1f, 1f, 0.85f))); DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x + 8f, ((Rect)(ref rect)).y + 28f, ((Rect)(ref rect)).width - 16f, 70f), GetRoundVoteDisplayName(roundVoteOptions[i]), roundVoteOptionStyle, Color.white, Color.black, 2.5f); DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + 108f, ((Rect)(ref rect)).width, 26f), "선택 " + array2[i] + "명", roundVoteSmallStyle, Color.white, Color.black, 2f); DrawOutlinedLabel(new Rect(((Rect)(ref rect)).x + 10f, ((Rect)(ref rect)).y + 136f, ((Rect)(ref rect)).width - 20f, 62f), GetRoundVotePlayerNamesText(i), roundVotePlayerStyle, new Color(0.78f, 0.92f, 1f, 1f), Color.black, 1.5f); } } private void BuildRoundOrder() { currentRoundOrder.Clear(); roundVoteByActor.Clear(); roundVoteActive = false; roundVoteLocalChoice = -1; roundVoteLocalHoverChoice = 1; currentRoundOrder.Add(RoundGameType.CloudDynamite); currentRoundOrder.Add(RoundGameType.ShelfHook); currentRoundOrder.Add(RoundGameType.BounceFrisbee); currentRoundOrder.Add(RoundGameType.DoubleCloudCoconut); currentRoundOrder.Add(RoundGameType.RhythmGame); currentRoundOrder.Add(RoundGameType.ColorCloudSurvival); currentRoundOrder.Add(RoundGameType.ButtonMashRace); currentRoundOrder.Add(RoundGameType.StarGrid); currentRoundOrder.Add(RoundGameType.MemoryMatch); currentRoundOrder.Add(RoundGameType.HalliGalli); currentRoundOrder.Add(RoundGameType.DinoRun); } [IteratorStateMachine(typeof(d__902))] private IEnumerator SingleRoundTestRoutine(RoundGameType roundType) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__902(0) { <>4__this = this, roundType = roundType }; } [IteratorStateMachine(typeof(d__903))] private IEnumerator WaitAndCleanupRound11SingleTestRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__903(0) { <>4__this = this }; } private void BeginRoundStartFinishGuard(string reason) { roundStartFinishGuardActive = true; roundStartFinishGuardUntil = Time.time + 2f; lastRoundProgressCheckTime = -999f; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[RoundGuard] begin reason=" + reason + ", until=" + roundStartFinishGuardUntil.ToString("0.00") + ", type=" + currentRoundType)); } private void EndRoundStartFinishGuard(string reason) { if (roundStartFinishGuardActive) { roundStartFinishGuardActive = false; roundStartFinishGuardUntil = -999f; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[RoundGuard] end reason=" + reason + ", type=" + currentRoundType)); } } private bool IsRoundStartFinishGuardActive() { if (!roundStartFinishGuardActive) { return false; } if (gameState != GameState.Running) { return false; } if (Time.time < roundStartFinishGuardUntil) { return true; } EndRoundStartFinishGuard("expired"); return false; } [IteratorStateMachine(typeof(d__907))] private IEnumerator RunRoundRoutine(RoundGameType roundType, bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__907(0) { <>4__this = this, roundType = roundType, testMode = testMode }; } private bool IsRoundToggleStillOn(RoundGameType roundType) { if (singleRoundTestRunning && roundType == activeSingleRoundTestType) { return true; } return roundType switch { RoundGameType.CloudDynamite => round1Start.Value, RoundGameType.ShelfHook => round2Start.Value, RoundGameType.BounceFrisbee => round3Start.Value, RoundGameType.DoubleCloudCoconut => round4Start.Value, RoundGameType.RhythmGame => round5Start.Value, RoundGameType.ColorCloudSurvival => round6Start.Value, RoundGameType.ButtonMashRace => round7Start.Value, RoundGameType.StarGrid => round8Start.Value, RoundGameType.MemoryMatch => round9Start.Value, RoundGameType.HalliGalli => round10Start.Value, RoundGameType.DinoRun => round11Start.Value, _ => false, }; } [IteratorStateMachine(typeof(d__909))] private IEnumerator RoundReadyAndTeleportRoutine(RoundGameType roundType) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__909(0) { <>4__this = this, roundType = roundType }; } private void ResetScoresForNewMatch() { totalScores.Clear(); currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); roundFinishInProgress = false; roundStartFinishGuardActive = false; roundStartFinishGuardUntil = -999f; roundEndPresentationComplete = true; finishRoundRoutineHandle = null; flareReadyActive = false; flareReadyLocalConfirmed = false; flareReadyThirdPersonLockUntil = -999f; flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); if (flareReadyRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(flareReadyRoutine); } catch { } flareReadyRoutine = null; } currentRoundHardTimeoutAt = -1f; roundEndStartedAt = -1f; actorsNeedingReviveAtRoundEnd.Clear(); actorNames.Clear(); RefreshActorNamesFromCharacters(); RaiseSimpleEvent(108, Array.Empty(), (ReceiverGroup)0); SyncScoresToAll(); } private void ResetCurrentRoundState() { currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); roundFinishInProgress = false; roundStartFinishGuardActive = false; roundStartFinishGuardUntil = -999f; flareReadyActive = false; flareReadyLocalConfirmed = false; flareReadyThirdPersonLockUntil = -999f; flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); if (flareReadyRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(flareReadyRoutine); } catch { } flareReadyRoutine = null; } currentRoundHardTimeoutAt = -1f; roundEndStartedAt = -1f; actorsNeedingReviveAtRoundEnd.Clear(); pendingStandingTileDeletes.Clear(); lastRound5FallPenaltyTime.Clear(); lastDrowsyStatus.Clear(); round6TileColors.Clear(); round6FallRescueCooldownUntilByActor.Clear(); round6OriginalPositions.Clear(); round6OriginalRendererMaterials.Clear(); round7ProgressByActor.Clear(); round7FinishTimes.Clear(); round7RankByActor.Clear(); round9FinishTimes.Clear(); EndRound9MemoryLocal(); EndRound10HalliGalliLocal(); EndRound11DinoLocal(); round11DinoPassedByActor.Clear(); round11DinoFailedByActor.Clear(); round8PositionsByActor.Clear(); round8StarsByActor.Clear(); round8ParalyzedUntilByActor.Clear(); ClearRound8ElectricCells(); round8StarsEatenTotal = 0; EndRound7ButtonMashLocal(); EndRound8StarGridLocal(); ResetLocalMovementLockAnchor(); round5CursedCharacter = null; round5CurseActive = false; } private void InitRoundPlayersAllCurrent() { roundPlayers.Clear(); alivePlayers.Clear(); eliminatedPlayers.Clear(); RefreshActorNamesFromCharacters(); if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if (!((Object)(object)allCharacter == (Object)null) && !((Object)(object)allCharacter.data == (Object)null)) { if (!NeedsRevive(allCharacter)) { PrepareLivingCharacterForNewPhase(allCharacter); } if (!roundPlayers.Contains(allCharacter)) { roundPlayers.Add(allCharacter); } if (!alivePlayers.Contains(allCharacter)) { alivePlayers.Add(allCharacter); } int actorNumber = GetActorNumber(allCharacter); EnsureActorScoreEntries(actorNumber, GetCharacterDisplayName(allCharacter)); } } } if (roundPlayers.Count == 0 && (Object)(object)Character.localCharacter != (Object)null) { Character localCharacter = Character.localCharacter; if (!NeedsRevive(localCharacter)) { PrepareLivingCharacterForNewPhase(localCharacter); } roundPlayers.Add(localCharacter); alivePlayers.Add(localCharacter); int actorNumber2 = GetActorNumber(localCharacter); EnsureActorScoreEntries(actorNumber2, GetCharacterDisplayName(localCharacter)); } SyncScoresToAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"100sec round players initialized. Count: {roundPlayers.Count}"); } private void EnsureActorScoreEntries(int actor, string name) { if (!totalScores.ContainsKey(actor)) { totalScores[actor] = 0; } if (!currentRoundScores.ContainsKey(actor)) { currentRoundScores[actor] = 0; } if (!string.IsNullOrWhiteSpace(name)) { actorNames[actor] = name; } } private void RefreshActorNamesFromCharacters() { try { if (Character.AllCharacters == null) { return; } foreach (Character allCharacter in Character.AllCharacters) { if (!((Object)(object)allCharacter == (Object)null)) { int actorNumber = GetActorNumber(allCharacter); string characterDisplayName = GetCharacterDisplayName(allCharacter); if (!string.IsNullOrWhiteSpace(characterDisplayName)) { actorNames[actorNumber] = characterDisplayName; } if (!totalScores.ContainsKey(actorNumber)) { totalScores[actorNumber] = 0; } } } } catch { } } private int GetActorNumber(Character character) { if ((Object)(object)character == (Object)null) { return -1; } try { if ((Object)(object)((MonoBehaviourPun)character).photonView != (Object)null && ((MonoBehaviourPun)character).photonView.Owner != null) { return ((MonoBehaviourPun)character).photonView.Owner.ActorNumber; } } catch { } try { if ((Object)(object)((MonoBehaviourPun)character).photonView != (Object)null) { return ((MonoBehaviourPun)character).photonView.ViewID; } } catch { } return ((Object)character).GetInstanceID(); } private string GetCharacterDisplayName(Character character) { if ((Object)(object)character == (Object)null) { return "Player"; } try { if ((Object)(object)((MonoBehaviourPun)character).photonView != (Object)null && ((MonoBehaviourPun)character).photonView.Owner != null) { string nickName = ((MonoBehaviourPun)character).photonView.Owner.NickName; if (!string.IsNullOrWhiteSpace(nickName)) { return nickName; } } } catch { } try { if (!string.IsNullOrWhiteSpace(character.characterName)) { return character.characterName; } } catch { } try { if (!string.IsNullOrWhiteSpace(((Object)character).name)) { return ((Object)character).name.Replace("(Clone)", "").Trim(); } } catch { } return "Player"; } private int GetCurrentRoundPoint() { if (gameState != GameState.Running) { return 0; } float num = Time.time - currentRoundRunningStartTime; return Mathf.Clamp(Mathf.CeilToInt(num), 1, Mathf.Max(1, roundDurationPoints.Value)); } private float GetRoundHardTimeoutSeconds(RoundGameType roundType) { return roundType switch { RoundGameType.ShelfHook => 75f, RoundGameType.BounceFrisbee => Mathf.Max(75f, arrowRoundTimeLimit.Value + 25f), RoundGameType.RhythmGame => Mathf.Max(85f, rhythmRoundTimeLimit.Value + 25f), RoundGameType.ButtonMashRace => 80f, RoundGameType.StarGrid => 100f, RoundGameType.MemoryMatch => 110f, RoundGameType.HalliGalli => 100f, RoundGameType.DinoRun => 120f, RoundGameType.ColorCloudSurvival => 90f, _ => Mathf.Max(90f, standardSurvivalRoundSeconds.Value + 35f), }; } private void HandleRoundEndSafetyWatchdog() { try { if (gameState == GameState.Running && !roundFinishInProgress && currentRoundHardTimeoutAt > 0f && Time.time > currentRoundHardTimeoutAt) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[RoundEndWatchdog] Force finishing stuck round. type=" + currentRoundType)); if (currentRoundType == RoundGameType.ColorCloudSurvival) { LockRound6ScoresAtEnd(); } else { LockMissingSurvivalScoresAtRoundEnd(GetCurrentRoundPoint()); } currentRoundHardTimeoutAt = -1f; RequestFinishCurrentRound("WATCHDOG_TIMEOUT"); } else { if (gameState != GameState.RoundEnding || !(roundEndStartedAt > 0f) || !(Time.time > roundEndStartedAt + 28f)) { return; } ((BaseUnityPlugin)this).Logger.LogWarning((object)("[RoundEndWatchdog] RoundEnding state stayed too long. Forcing local cleanup. type=" + currentRoundType)); ForceEndAllLocalRoundUiStates("RoundEndWatchdog"); roundResultPanelActive = false; roundResultPanelForcedLines = null; roundResultPanelForcedTitle = ""; finalScoreboardActive = false; autoScoreboardUntil = -1f; StopRoundEndFrontCamera(); roundFinishInProgress = false; roundEndPresentationComplete = true; finishRoundRoutineHandle = null; flareReadyActive = false; flareReadyLocalConfirmed = false; FastBlockThirdPersonVInput = false; flareReadyThirdPersonLockUntil = -999f; flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); if (flareReadyRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(flareReadyRoutine); } catch { } flareReadyRoutine = null; } roundEndStartedAt = -1f; currentRoundHardTimeoutAt = -1f; if (!currentRoundIsTestMode) { gameState = GameState.Idle; } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[RoundEndWatchdog] failed: " + ex.Message)); } } private void CheckRoundProgressAndEliminations() { if (roundFinishInProgress || IsRoundStartFinishGuardActive() || currentRoundType == RoundGameType.ShelfHook || currentRoundType == RoundGameType.BounceFrisbee || currentRoundType == RoundGameType.ButtonMashRace || currentRoundType == RoundGameType.StarGrid || currentRoundType == RoundGameType.MemoryMatch || currentRoundType == RoundGameType.HalliGalli || currentRoundType == RoundGameType.DinoRun || Time.time < lastRoundProgressCheckTime + 0.1f) { return; } lastRoundProgressCheckTime = Time.time; int currentRoundPoint = GetCurrentRoundPoint(); if (currentRoundType == RoundGameType.ColorCloudSurvival) { CheckRound6EliminationsOnly(currentRoundPoint); return; } if (currentRoundType != RoundGameType.RhythmGame) { for (int i = 0; i < alivePlayers.Count; i++) { Character val = alivePlayers[i]; if (!((Object)(object)val == (Object)null)) { int actorNumber = GetActorNumber(val); if (!currentRoundScoreLocked.Contains(actorNumber)) { currentRoundScores[actorNumber] = ConvertSurvivalPointToRoundScore(currentRoundPoint); } } } } if (Time.time - lastScoreSyncTime >= 0.5f) { lastScoreSyncTime = Time.time; SyncScoresToAll(); } for (int num = alivePlayers.Count - 1; num >= 0; num--) { Character val2 = alivePlayers[num]; if ((Object)(object)val2 == (Object)null) { alivePlayers.RemoveAt(num); } else if (IsPlayerEliminatedForCurrentRound(val2)) { EliminatePlayerFromRound(val2, currentRoundPoint); } } if (alivePlayers.Count <= 0) { LockMissingSurvivalScoresAtRoundEnd(currentRoundPoint); RequestFinishCurrentRound("ALL_ELIMINATED"); } else if (currentRoundType != RoundGameType.RhythmGame && alivePlayers.Count == 1 && roundPlayers.Count >= 2) { Character character = alivePlayers[0]; int actorNumber2 = GetActorNumber(character); currentRoundScores[actorNumber2] = Mathf.Clamp(winnerScoreValue.Value, 1, maxRoundScore.Value); currentRoundScoreLocked.Add(actorNumber2); RequestFinishCurrentRound("LAST_SURVIVOR"); } else { if (currentRoundPoint < roundDurationPoints.Value) { return; } if (currentRoundType != RoundGameType.RhythmGame) { for (int j = 0; j < alivePlayers.Count; j++) { Character val3 = alivePlayers[j]; if (!((Object)(object)val3 == (Object)null)) { int actorNumber3 = GetActorNumber(val3); if (!currentRoundScoreLocked.Contains(actorNumber3)) { currentRoundScores[actorNumber3] = maxRoundScore.Value; currentRoundScoreLocked.Add(actorNumber3); } } } } else { foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber4 = GetActorNumber(roundPlayer); if (!currentRoundScores.ContainsKey(actorNumber4)) { currentRoundScores[actorNumber4] = 0; } currentRoundScores[actorNumber4] = Mathf.Clamp(currentRoundScores[actorNumber4], 0, maxRoundScore.Value); } } } RequestFinishCurrentRound("TIME_UP"); } } private void LockMissingSurvivalScoresAtRoundEnd(int currentPoint) { try { foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { if (!currentRoundScores.ContainsKey(actorNumber)) { currentRoundScores[actorNumber] = Mathf.Clamp(ConvertSurvivalPointToRoundScore(currentPoint), 0, maxRoundScore.Value); } if (!currentRoundScoreLocked.Contains(actorNumber)) { currentRoundScoreLocked.Add(actorNumber); } } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("LockMissingSurvivalScoresAtRoundEnd failed: " + ex.Message)); } } private void CheckRound6EliminationsOnly(int currentPoint) { for (int num = alivePlayers.Count - 1; num >= 0; num--) { Character val = alivePlayers[num]; if ((Object)(object)val == (Object)null) { alivePlayers.RemoveAt(num); } else if (IsPlayerEliminatedForCurrentRound(val)) { alivePlayers.RemoveAt(num); MarkRound6PlayerEliminatedWithoutScore(val); } } if (Time.time - lastScoreSyncTime >= 0.5f) { lastScoreSyncTime = Time.time; SyncScoresToAll(); } if (alivePlayers.Count <= 0) { LockRound6ScoresAtEnd(); RequestFinishCurrentRound("ROUND6_ALL_ELIMINATED"); } } private void MarkRound6PlayerEliminatedWithoutScore(Character character) { if ((Object)(object)character == (Object)null) { return; } if (!eliminatedPlayers.Contains(character)) { eliminatedPlayers.Add(character); } int actorNumber = GetActorNumber(character); try { if (actorNumber > 0 && NeedsRevive(character)) { actorsNeedingReviveAtRoundEnd.Add(actorNumber); } } catch { } try { ClearCharacterInventory(character); } catch { } try { ClearCharacterDebuffs(character); } catch { } try { PrepareLivingCharacterForNewPhase(character); } catch { } try { ((MonoBehaviour)this).StartCoroutine(ForceClearSkeletonForSeconds(character, 2f)); } catch { } } private bool IsPlayerEliminatedForCurrentRound(Character character) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null || (Object)(object)character.data == (Object)null) { return false; } if (currentRoundType == RoundGameType.RhythmGame) { if (character.data.dead || character.data.passedOut || character.data.fullyPassedOut) { return true; } return false; } if (character.data.dead || character.data.passedOut || character.data.fullyPassedOut) { return true; } try { if (character.Center.y <= fallEliminationY.Value) { return true; } } catch { } return false; } private void EliminatePlayerFromRound(Character character, int currentPoint) { if ((Object)(object)character == (Object)null || !alivePlayers.Contains(character)) { return; } alivePlayers.Remove(character); if (!eliminatedPlayers.Contains(character)) { eliminatedPlayers.Add(character); } int actorNumber = GetActorNumber(character); try { if (actorNumber > 0 && NeedsRevive(character)) { actorsNeedingReviveAtRoundEnd.Add(actorNumber); } } catch { } if (currentRoundType == RoundGameType.ColorCloudSurvival) { int count = eliminatedPlayers.Count; int value = Mathf.Clamp(count * 5, 5, Mathf.Max(5, maxRoundScore.Value - 5)); if (!currentRoundScores.ContainsKey(actorNumber)) { currentRoundScores[actorNumber] = 0; } if (!currentRoundScoreLocked.Contains(actorNumber)) { currentRoundScores[actorNumber] = value; currentRoundScoreLocked.Add(actorNumber); } } else { if (!currentRoundScores.ContainsKey(actorNumber)) { currentRoundScores[actorNumber] = ConvertSurvivalPointToRoundScore(currentPoint); } if (!currentRoundScoreLocked.Contains(actorNumber)) { currentRoundScores[actorNumber] = Mathf.Clamp(ConvertSurvivalPointToRoundScore(currentPoint), 0, maxRoundScore.Value); currentRoundScoreLocked.Add(actorNumber); } } try { ClearCharacterInventory(character); } catch { } try { ClearCharacterDebuffs(character); } catch { } try { PrepareLivingCharacterForNewPhase(character); } catch { } try { ((MonoBehaviour)this).StartCoroutine(ForceClearSkeletonForSeconds(character, 2f)); } catch { } SyncScoresToAll(); } private Vector3 GetSpectatorPosition(Character character) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) return new Vector3((arenaStartX.Value + arenaEndX.Value) * 0.5f, arenaY.Value + 25f, ForcedArenaMinZ() - 20f); } [IteratorStateMachine(typeof(d__927))] private IEnumerator ForceClearSkeletonForSeconds(Character character, float seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__927(0) { <>4__this = this, character = character, seconds = seconds }; } private int ConvertSurvivalPointToRoundScore(int currentPoint) { float num = Mathf.Max(1f, standardSurvivalRoundSeconds.Value); float num2 = Mathf.Clamp01((float)currentPoint / num); return Mathf.Clamp(Mathf.CeilToInt(num2 * (float)Mathf.Max(1, maxRoundScore.Value)), 1, Mathf.Max(1, maxRoundScore.Value)); } private int GetCurrentDisplayedRoundScore() { if (currentRoundType == RoundGameType.ShelfHook || currentRoundType == RoundGameType.BounceFrisbee) { int key = (((Object)(object)Character.localCharacter != (Object)null) ? GetActorNumber(Character.localCharacter) : (-999)); return currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0; } return ConvertSurvivalPointToRoundScore(GetCurrentRoundPoint()); } private void BeginTimingRoundLocal(float target) { timingRoundTargetSeconds = target; timingRoundStartLocalTime = Time.time; timingLocalSubmitted = false; timingLocalPressedSeconds = -1f; timingLastTickSecond = -1; EnsureTimingAudio(); PlayTimingBgm(); timingRoundActive = true; } private void EndTimingRoundLocal() { timingRoundActive = false; timingLastTickSecond = -1; StopTimingRoundSoundsLocal(); } private void StopTimingRoundSoundsLocal() { try { if ((Object)(object)timingAudioSource != (Object)null) { timingAudioSource.Stop(); } StopTimingBgm(); } catch { } } private void BeginArrowRoundLocal(string sequence) { arrowRoundSequence = sequence ?? ""; arrowRoundStartLocalTime = Time.time + 3.25f; arrowLocalInputIndex = 0; arrowLocalSubmitted = false; ParseRound3GridMazeFromSequence(sequence); ParseRound3GridMazePoints(); ParseRound3GridTarget(sequence); round3GridLocalX = round3GridStartX; round3GridLocalY = round3GridStartY; round3GridPhase = 1; round3GridReturnTime = -1f; round3GridLocalFinishTime = -1f; round3GridLocalClearPopupUntil = -1f; arrowRoundActive = true; } private void EndArrowRoundLocal() { arrowRoundActive = false; arrowLocalInputIndex = 0; arrowLocalSubmitted = false; } private string[] BuildRandomRound3GridMazeRowsTopToBottom() { return BuildRandomRound3GridMazeRowsTopToBottom(secondPhase: false); } private string[] BuildRandomRound3GridMazeRowsTopToBottom(bool secondPhase) { string[] array = new string[11]; int num = 3; int[] array2 = new int[4] { 2, 4, 6, 8 }; int[] array3 = new int[7]; for (int i = 0; i < 7; i++) { array3[i] = i; } for (int j = 0; j < array3.Length; j++) { int num2 = Random.Range(j, array3.Length); int num3 = array3[j]; array3[j] = array3[num2]; array3[num2] = num3; } for (int k = 0; k < 11; k++) { switch (k) { case 0: { char[] array5 = new string('x', 7).ToCharArray(); array5[num] = (secondPhase ? 'o' : 'r'); array[k] = new string(array5); continue; } case 10: { char[] array4 = new string('x', 7).ToCharArray(); array4[num] = (secondPhase ? 'e' : 's'); array[k] = new string(array4); continue; } } if (k % 2 == 1) { array[k] = new string('o', 7); continue; } int num4 = 0; for (int l = 0; l < array2.Length; l++) { if (array2[l] == k) { num4 = l; break; } } int num5 = array3[Mathf.Clamp(num4, 0, array3.Length - 1)]; char[] array6 = new string('x', 7).ToCharArray(); array6[num5] = 'o'; array[k] = new string(array6); } return array; } private string[] BuildDeterministicRound3GridSecondMazeRowsTopToBottom() { string[] array = new string[11]; int num = 3; int[] array2 = new int[4] { 1, 5, 2, 4 }; for (int i = 0; i < 11; i++) { switch (i) { case 0: { char[] array4 = new string('x', 7).ToCharArray(); array4[num] = 'o'; array[i] = new string(array4); continue; } case 10: { char[] array3 = new string('x', 7).ToCharArray(); array3[num] = 'e'; array[i] = new string(array3); continue; } } if (i % 2 == 1) { array[i] = new string('o', 7); continue; } int num2 = Mathf.Clamp(i / 2 - 1, 0, array2.Length - 1); int num3 = array2[num2]; char[] array5 = new string('x', 7).ToCharArray(); array5[num3] = 'o'; array[i] = new string(array5); } return array; } private string EncodeRound3GridMazeRows(string[] rows) { try { if (rows == null || rows.Length == 0) { rows = Round3GridDefaultMazeRowsTopToBottom; } return string.Join("/", rows); } catch { return string.Join("/", Round3GridDefaultMazeRowsTopToBottom); } } private void ApplyRound3GridMazeRows(string[] rows) { try { if (rows == null || rows.Length != 11) { round3GridMazeRowsTopToBottom = (string[])Round3GridDefaultMazeRowsTopToBottom.Clone(); return; } string[] array = new string[11]; for (int i = 0; i < 11; i++) { string text = rows[i] ?? ""; if (text.Length < 7) { text = text.PadRight(7, 'x'); } if (text.Length > 7) { text = text.Substring(0, 7); } array[i] = text.ToLowerInvariant(); } round3GridMazeRowsTopToBottom = array; } catch { round3GridMazeRowsTopToBottom = (string[])Round3GridDefaultMazeRowsTopToBottom.Clone(); } } private string[] NormalizeRound3GridMazeRows(string[] rows) { try { if (rows == null || rows.Length != 11) { return (string[])Round3GridDefaultMazeRowsTopToBottom.Clone(); } string[] array = new string[11]; for (int i = 0; i < 11; i++) { string text = rows[i] ?? ""; if (text.Length < 7) { text = text.PadRight(7, 'x'); } if (text.Length > 7) { text = text.Substring(0, 7); } array[i] = text.ToLowerInvariant(); } return array; } catch { return (string[])Round3GridDefaultMazeRowsTopToBottom.Clone(); } } private void ParseRound3GridMazeFromSequence(string sequence) { try { if (string.IsNullOrWhiteSpace(sequence) || !sequence.StartsWith("GRID:", StringComparison.OrdinalIgnoreCase)) { ApplyRound3GridMazeRows(Round3GridDefaultMazeRowsTopToBottom); return; } int num = sequence.IndexOf('|'); if (num < 0 || num >= sequence.Length - 1) { ApplyRound3GridMazeRows(Round3GridDefaultMazeRowsTopToBottom); return; } string text = sequence.Substring(num + 1); string text2 = text; string text3 = null; int num2 = text.IndexOf("||", StringComparison.Ordinal); if (num2 >= 0) { text2 = text.Substring(0, num2); text3 = text.Substring(num2 + 2); } string[] rows = text2.Split(new char[1] { '/' }); ApplyRound3GridMazeRows(rows); round3GridSecondMazeReceivedFromHost = !string.IsNullOrWhiteSpace(text3); round3GridSecondMazeRowsTopToBottom = (round3GridSecondMazeReceivedFromHost ? NormalizeRound3GridMazeRows(text3.Split(new char[1] { '/' })) : BuildDeterministicRound3GridSecondMazeRowsTopToBottom()); } catch { ApplyRound3GridMazeRows(Round3GridDefaultMazeRowsTopToBottom); round3GridSecondMazeReceivedFromHost = false; round3GridSecondMazeRowsTopToBottom = BuildDeterministicRound3GridSecondMazeRowsTopToBottom(); } } private void ParseRound3GridTarget(string sequence) { try { if (!string.IsNullOrWhiteSpace(sequence) && sequence.StartsWith("GRID:", StringComparison.OrdinalIgnoreCase)) { string text = sequence.Substring(5); int num = text.IndexOf('|'); if (num >= 0) { text = text.Substring(0, num); } string[] array = text.Split(new char[1] { ',' }); if (array.Length >= 2 && int.TryParse(array[0], out var result) && int.TryParse(array[1], out var result2)) { round3GridStarX = Mathf.Clamp(result, 0, 6); round3GridStarY = Mathf.Clamp(result2, 0, 10); } } } catch { } } private void ParseRound3GridMazePoints() { round3GridStartX = 3; round3GridStartY = 0; round3GridStarX = 3; round3GridStarY = 10; try { for (int i = 0; i < round3GridMazeRowsTopToBottom.Length; i++) { string text = round3GridMazeRowsTopToBottom[i] ?? ""; int num = 10 - i; for (int j = 0; j < Mathf.Min(7, text.Length); j++) { char c = char.ToLowerInvariant(text[j]); switch (c) { case 's': round3GridStartX = j; round3GridStartY = num; continue; default: if (c != 'r') { continue; } break; case 'e': break; } round3GridStarX = j; round3GridStarY = num; } } } catch { } } private char GetRound3GridCellChar(int x, int y) { try { if (x < 0 || x >= 7 || y < 0 || y >= 11) { return 'x'; } int num = 10 - y; if (num < 0 || num >= round3GridMazeRowsTopToBottom.Length) { return 'x'; } string text = round3GridMazeRowsTopToBottom[num] ?? ""; if (x < 0 || x >= text.Length) { return 'o'; } return char.ToLowerInvariant(text[x]); } catch { return 'x'; } } private bool IsRound3GridWalkable(int x, int y) { char round3GridCellChar = GetRound3GridCellChar(x, y); return round3GridCellChar == 'o' || round3GridCellChar == 's' || round3GridCellChar == 'e' || round3GridCellChar == 'r'; } private void BeginRhythmRoundLocal(string sequence, float[] noteOffsets = null) { rhythmSequence = (string.IsNullOrWhiteSpace(sequence) ? BuildRandomArrowSequence(30) : sequence); rhythmNoteTargetOffsets = BuildSafeRhythmNoteTargetOffsets(rhythmSequence.Length, noteOffsets); rhythmRoundStartLocalTime = Time.time + Mathf.Max(0.25f, rhythmNoteTravelSeconds.Value); rhythmLocalInputIndex = 0; rhythmLocalHitCount = 0; rhythmLocalSubmitted = false; int roundLocalActorSafe = GetRoundLocalActorSafe(); if (roundLocalActorSafe > 0) { rhythmRoundProgressByActor[roundLocalActorSafe] = 0; } rhythmRoundActive = true; for (int i = 0; i < rhythmSlotPopUntil.Length; i++) { rhythmSlotPopUntil[i] = 0f; } for (int j = 0; j < rhythmNoteJudged.Length; j++) { rhythmNoteJudged[j] = false; rhythmNoteHit[j] = false; } EnsureRhythmAudio(); } private void EndRhythmRoundLocal() { rhythmRoundActive = false; rhythmLocalInputIndex = 0; rhythmLocalSubmitted = false; rhythmNoteTargetOffsets = new float[0]; } private void ForceEndAllLocalRoundUiStates(string reason) { try { StopTimingRoundSoundsLocal(); RemoveLocalRound6MoveSpeedBoost(); timingRoundActive = false; timingLastTickSecond = -1; arrowRoundActive = false; rhythmRoundActive = false; rhythmCenterResultPanelActive = false; rhythmCenterResultPanelUntil = -1f; round6AnswerGaugeActive = false; round5CurseActive = false; showDynamiteChargeBar = false; localDynamiteChargeActive = false; EndRound7ButtonMashLocal(); EndRound8StarGridLocal(); EndRound9MemoryLocal(); EndRound10HalliGalliLocal(); ForceEndRound11DinoLocal(reason); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("ForceEndAllLocalRoundUiStates failed (" + reason + "): " + ex.Message)); } } private void ApplyMatchResetLocal() { ForceEndAllLocalRoundUiStates("MatchReset"); totalScores.Clear(); currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); actorNames.Clear(); RefreshActorNamesFromCharacters(); gameState = GameState.Idle; timingRoundActive = false; arrowRoundActive = false; rhythmRoundActive = false; centerNoticeText = ""; showDynamiteChargeBar = false; } private void ApplyUiRoundStartLocal(RoundGameType roundType, int roundIndex) { ForceEndAllLocalRoundUiStates("UiRoundStart:" + roundType); if (roundType != RoundGameType.ShelfHook) { timingLocalSubmitted = false; timingLocalPressedSeconds = -1f; } currentRoundType = roundType; currentRoundIndex = roundIndex; roundFinishInProgress = false; flareReadyActive = false; flareReadyLocalConfirmed = false; flareReadyThirdPersonLockUntil = -999f; flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); if (flareReadyRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(flareReadyRoutine); } catch { } flareReadyRoutine = null; } actorsNeedingReviveAtRoundEnd.Clear(); roundVoteActive = false; roundVoteLocalChoice = -1; roundVoteLocalHoverChoice = 1; gameState = GameState.Running; currentRoundRunningStartTime = Time.time; currentRoundHardTimeoutAt = Time.time + GetRoundHardTimeoutSeconds(roundType); roundEndStartedAt = -1f; standingTileDeleteStarted = false; RefreshActorNamesFromCharacters(); } private void ApplyUiRoundEndLocal(string reason) { ForceEndAllLocalRoundUiStates("UiRoundEnd:" + reason); gameState = GameState.RoundEnding; roundEndStartedAt = Time.time; currentRoundHardTimeoutAt = -1f; centerNoticeText = ""; centerNoticeUntil = 0f; if (roundEndEmoteRoutine != null) { ((MonoBehaviour)this).StopCoroutine(roundEndEmoteRoutine); } roundEndEmoteRoutine = ((MonoBehaviour)this).StartCoroutine(PlayClientRoundEndPresentationRoutine()); } private void RaiseSimpleEvent(byte code, object data, ReceiverGroup receivers) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) try { if (PhotonNetwork.InRoom) { RaiseEventOptions val = new RaiseEventOptions { Receivers = receivers }; SendOptions val2 = default(SendOptions); ((SendOptions)(ref val2)).Reliability = true; SendOptions val3 = val2; PhotonNetwork.RaiseEvent(code, data, val, val3); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); } } private void BroadcastForceClearAllPlayerInventories(string reason) { ApplyForceClearAllPlayerInventoriesLocal(reason + ":local"); RaiseSimpleEvent(141, new object[1] { reason }, (ReceiverGroup)0); } private void ApplyForceClearAllPlayerInventoriesLocal(string reason) { try { HashSet hashSet = new HashSet(); int num = 0; if (Character.AllCharacters != null) { foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter == (Object)null) { continue; } int actorNumber = GetActorNumber(allCharacter); if (actorNumber <= 0 || !hashSet.Contains(actorNumber)) { ClearCharacterInventory(allCharacter); if (actorNumber > 0) { hashSet.Add(actorNumber); } num++; } } } for (int i = 0; i < roundPlayers.Count; i++) { Character val = roundPlayers[i]; if ((Object)(object)val == (Object)null) { continue; } int actorNumber2 = GetActorNumber(val); if (actorNumber2 <= 0 || !hashSet.Contains(actorNumber2)) { ClearCharacterInventory(val); if (actorNumber2 > 0) { hashSet.Add(actorNumber2); } num++; } } ((BaseUnityPlugin)this).Logger.LogInfo((object)("[InventoryClear] Force-cleared all player inventories. reason=" + reason + ", count=" + num)); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[InventoryClear] Force clear failed. reason=" + reason + ", error=" + ex.GetType().Name + ": " + ex.Message)); } } private void SyncScoresToAll() { RefreshActorNamesFromCharacters(); HashSet hashSet = new HashSet(); foreach (int key2 in totalScores.Keys) { hashSet.Add(key2); } foreach (int key3 in currentRoundScores.Keys) { hashSet.Add(key3); } foreach (int key4 in actorNames.Keys) { hashSet.Add(key4); } List list = new List(hashSet); list.Sort(); int[] array = list.ToArray(); int[] array2 = new int[list.Count]; int[] array3 = new int[list.Count]; string[] array4 = new string[list.Count]; for (int i = 0; i < list.Count; i++) { int key = list[i]; array2[i] = (totalScores.ContainsKey(key) ? totalScores[key] : 0); array3[i] = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); array4[i] = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); } object[] data = new object[4] { array, array2, array3, array4 }; ApplyScoreSyncLocal(data); RaiseSimpleEvent(107, data, (ReceiverGroup)0); } private void ApplyScoreSyncLocal(object[] data) { if (data == null || data.Length < 4) { return; } int[] array = data[0] as int[]; int[] array2 = data[1] as int[]; int[] array3 = data[2] as int[]; string[] array4 = data[3] as string[]; if (array == null) { return; } totalScores.Clear(); currentRoundScores.Clear(); for (int i = 0; i < array.Length; i++) { int key = array[i]; totalScores[key] = ((array2 != null && i < array2.Length) ? array2[i] : 0); currentRoundScores[key] = ((array3 != null && i < array3.Length) ? array3[i] : 0); if (array4 != null && i < array4.Length && !string.IsNullOrWhiteSpace(array4[i])) { actorNames[key] = array4[i]; } } } private void RaiseMiniGameEvent(byte code, object data, ReceiverGroup receivers) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) try { RaiseEventOptions val = new RaiseEventOptions { Receivers = receivers }; SendOptions val2 = default(SendOptions); ((SendOptions)(ref val2)).Reliability = true; SendOptions val3 = val2; PhotonNetwork.RaiseEvent(code, data, val, val3); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); } } [IteratorStateMachine(typeof(d__958))] private IEnumerator RunTimingRoundRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__958(0) { <>4__this = this, testMode = testMode }; } private bool HaveAllTimingParticipantsSubmitted() { int num = 0; foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { num++; if (!timingRoundSubmissions.ContainsKey(actorNumber)) { return false; } } } return num > 0; } private void HandleTimingRoundLocalInput() { if (timingRoundActive && !timingLocalSubmitted && currentRoundType == RoundGameType.ShelfHook && !((Object)(object)Character.localCharacter == (Object)null) && Input.GetKeyDown((KeyCode)32)) { timingLocalSubmitted = true; float num = (timingLocalPressedSeconds = Mathf.Max(0f, Time.time - timingRoundStartLocalTime)); StopTimingRoundSoundsLocal(); int actorNumber = GetActorNumber(Character.localCharacter); if (!timingRoundSubmissions.ContainsKey(actorNumber)) { timingRoundSubmissions[actorNumber] = num; } RaiseMiniGameEvent(102, new object[2] { actorNumber, num }, (ReceiverGroup)1); } } private void AwardTimingRoundScores() { List> list = new List>(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (!timingRoundSubmissions.TryGetValue(actorNumber, out var value)) { value = 9999f; } list.Add(new KeyValuePair(actorNumber, Mathf.Abs(value - timingRoundTargetSeconds))); } } list.Sort((KeyValuePair a, KeyValuePair b) => a.Value.CompareTo(b.Value)); ApplyRankScores(list, "Timing Result"); } private float[] BuildRandomRhythmNoteTargetOffsets(int count) { int num = Mathf.Max(1, count); float[] array = new float[num]; array[0] = 0f; for (int i = 1; i < num; i++) { array[i] = array[i - 1] + Random.Range(0.25f, 0.5f); } return array; } private float[] BuildSafeRhythmNoteTargetOffsets(int count, float[] provided) { int num = Mathf.Max(1, count); float[] array = new float[num]; array[0] = 0f; if (provided != null && provided.Length >= num) { float num2 = 0f; for (int i = 1; i < num; i++) { num2 = (array[i] = Mathf.Max(num2 + 0.05f, provided[i])); } return array; } return BuildRandomRhythmNoteTargetOffsets(num); } private float GetRhythmNoteTargetOffset(int index) { if (rhythmNoteTargetOffsets != null && index >= 0 && index < rhythmNoteTargetOffsets.Length) { return rhythmNoteTargetOffsets[index]; } return Mathf.Max(0f, (float)index) * GetForcedRhythmNoteInterval(); } private float GetRhythmLastNoteTargetOffset() { if (rhythmNoteTargetOffsets != null && rhythmNoteTargetOffsets.Length != 0) { return rhythmNoteTargetOffsets[rhythmNoteTargetOffsets.Length - 1]; } return 0.5f * (float)Mathf.Max(0, 29); } [IteratorStateMachine(typeof(d__966))] private IEnumerator RunRhythmRoundRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__966(0) { <>4__this = this, testMode = testMode }; } private char GetPressedRhythmArrow() { if (Input.GetKeyDown((KeyCode)100)) { return 'R'; } if (Input.GetKeyDown((KeyCode)97)) { return 'L'; } if (Input.GetKeyDown((KeyCode)119)) { return 'U'; } if (Input.GetKeyDown((KeyCode)115)) { return 'D'; } return '\0'; } private int RhythmLaneIndex(char c) { return c switch { 'L' => 0, 'D' => 1, 'U' => 2, 'R' => 3, _ => 0, }; } private int GetRoundLocalActorSafe() { try { if ((Object)(object)Character.localCharacter != (Object)null) { int actorNumber = GetActorNumber(Character.localCharacter); if (actorNumber > 0) { return actorNumber; } } if (PhotonNetwork.LocalPlayer != null) { return PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } return -1; } private void BroadcastRhythmProgressLocal() { int roundLocalActorSafe = GetRoundLocalActorSafe(); if (roundLocalActorSafe > 0) { rhythmRoundProgressByActor[roundLocalActorSafe] = Mathf.Clamp(rhythmLocalHitCount, 0, 30); RaiseMiniGameEvent(133, new object[2] { roundLocalActorSafe, rhythmLocalHitCount }, (ReceiverGroup)1); } } private void ShowRhythmJudgementLocal(bool perfect) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (!perfect) { PlayRhythmFailSound(); } ShowCenterNotice(perfect ? "Perfect" : "Fail", 0.22f, perfect ? new Color(0.35f, 1f, 0.45f, 1f) : new Color(1f, 0.25f, 0.22f, 1f), thickRounded: true); } private void SubmitRhythmResultIfNeeded() { if (!rhythmLocalSubmitted && !((Object)(object)Character.localCharacter == (Object)null)) { rhythmLocalSubmitted = true; int actorNumber = GetActorNumber(Character.localCharacter); rhythmRoundSubmissions[actorNumber] = rhythmLocalHitCount; rhythmRoundProgressByActor[actorNumber] = rhythmLocalHitCount; RaiseMiniGameEvent(111, new object[2] { actorNumber, rhythmLocalHitCount }, (ReceiverGroup)1); } } private void HandleRhythmRoundLocalInput() { //IL_02a8: Unknown result type (might be due to invalid IL or missing references) if (!rhythmRoundActive || rhythmLocalSubmitted || currentRoundType != RoundGameType.RhythmGame || (Object)(object)Character.localCharacter == (Object)null || string.IsNullOrEmpty(rhythmSequence)) { return; } float num = Mathf.Max(0.01f, rhythmHitWindow.Value); while (rhythmLocalInputIndex < rhythmSequence.Length) { float num2 = rhythmRoundStartLocalTime + GetRhythmNoteTargetOffset(rhythmLocalInputIndex) + num; if (Time.time <= num2) { break; } if (rhythmLocalInputIndex < rhythmNoteJudged.Length) { rhythmNoteJudged[rhythmLocalInputIndex] = true; } ShowRhythmJudgementLocal(perfect: false); BroadcastRhythmProgressLocal(); rhythmLocalInputIndex++; } if (rhythmLocalInputIndex >= rhythmSequence.Length) { SubmitRhythmResultIfNeeded(); return; } char pressedRhythmArrow = GetPressedRhythmArrow(); if (pressedRhythmArrow == '\0') { return; } char c = rhythmSequence[rhythmLocalInputIndex]; float num3 = rhythmRoundStartLocalTime + GetRhythmNoteTargetOffset(rhythmLocalInputIndex); float num4 = Mathf.Abs(Time.time - num3); if (num4 <= num) { if (pressedRhythmArrow == c) { rhythmLocalHitCount++; PlayRhythmHitSound(); ShowRhythmJudgementLocal(perfect: true); int num5 = RhythmLaneIndex(c); if (num5 >= 0 && num5 < rhythmSlotPopUntil.Length) { rhythmSlotPopUntil[num5] = Time.time + 0.16f; } if (rhythmLocalInputIndex < rhythmNoteHit.Length) { rhythmNoteHit[rhythmLocalInputIndex] = true; } } else { ShowRhythmJudgementLocal(perfect: false); } BroadcastRhythmProgressLocal(); if (rhythmLocalInputIndex < rhythmNoteJudged.Length) { rhythmNoteJudged[rhythmLocalInputIndex] = true; } rhythmLocalInputIndex++; if (rhythmLocalInputIndex >= rhythmSequence.Length) { SubmitRhythmResultIfNeeded(); } } else if (Time.time < num3 - num) { ShowCenterNotice("Fail", 0.18f, new Color(1f, 0.25f, 0.22f, 1f), thickRounded: true); } } private void AwardRhythmRoundScores() { currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); List> list = new List>(); foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { if (!rhythmRoundSubmissions.TryGetValue(actorNumber, out var value)) { value = (rhythmRoundProgressByActor.TryGetValue(actorNumber, out var value2) ? ((float)value2) : 0f); } int value3 = Mathf.Clamp(Mathf.RoundToInt(value), 0, 30); list.Add(new KeyValuePair(actorNumber, value3)); } } list.Sort(delegate(KeyValuePair a, KeyValuePair b) { int num4 = b.Value.CompareTo(a.Value); return (num4 != 0) ? num4 : a.Key.CompareTo(b.Key); }); for (int i = 0; i < list.Count; i++) { int key = list[i].Key; int value4 = list[i].Value; int num = 0; for (int j = 0; j < list.Count; j++) { if (list[j].Value > value4) { num++; } } int num2 = num + 1; int num3 = 0; switch (num2) { case 1: num3 = 20; break; case 2: num3 = 15; break; case 3: num3 = 10; break; case 4: num3 = 5; break; } currentRoundScores[key] = Mathf.Clamp(num3, 0, maxRoundScore.Value); currentRoundScoreLocked.Add(key); } SyncScoresToAll(); } [IteratorStateMachine(typeof(d__975))] private IEnumerator RunArrowRoundRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__975(0) { <>4__this = this, testMode = testMode }; } private string BuildRound3GridTargetSequence() { string[] rows = BuildRandomRound3GridMazeRowsTopToBottom(secondPhase: false); string[] rows2 = BuildRandomRound3GridMazeRowsTopToBottom(secondPhase: true); ApplyRound3GridMazeRows(rows); round3GridSecondMazeRowsTopToBottom = rows2; round3GridSecondMazeReceivedFromHost = true; ParseRound3GridMazePoints(); return "GRID:" + round3GridStarX + "," + round3GridStarY + "|" + EncodeRound3GridMazeRows(rows) + "||" + EncodeRound3GridMazeRows(rows2); } private string BuildRandomArrowSequence(int count) { char[] array = new char[4] { 'R', 'L', 'U', 'D' }; string text = ""; for (int i = 0; i < count; i++) { text += array[Random.Range(0, array.Length)]; } return text; } private string ArrowCharToSymbol(char c) { return c switch { 'R' => "D", 'L' => "A", 'U' => "W", 'D' => "S", _ => "?", }; } private void SwitchRound3GridToSecondPhase() { try { if (round3GridSecondMazeRowsTopToBottom == null || round3GridSecondMazeRowsTopToBottom.Length != 11) { round3GridSecondMazeRowsTopToBottom = BuildDeterministicRound3GridSecondMazeRowsTopToBottom(); round3GridSecondMazeReceivedFromHost = false; } ApplyRound3GridMazeRows(round3GridSecondMazeRowsTopToBottom); round3GridPhase = 2; round3GridReturnTime = Mathf.Max(0f, Time.time - arrowRoundStartLocalTime); round3GridLocalClearPopupUntil = Time.time + 1.45f; round3GridStarX = 3; round3GridStarY = 0; for (int i = 0; i < round3GridMazeRowsTopToBottom.Length; i++) { string text = round3GridMazeRowsTopToBottom[i] ?? ""; int num = 10 - i; for (int j = 0; j < Mathf.Min(7, text.Length); j++) { if (char.ToLowerInvariant(text[j]) == 'e') { round3GridStarX = j; round3GridStarY = num; return; } } } } catch { round3GridPhase = 2; round3GridStarX = 3; round3GridStarY = 0; } } private void HandleArrowRoundLocalInput() { if (!arrowRoundActive || arrowLocalSubmitted || currentRoundType != RoundGameType.BounceFrisbee || (Object)(object)Character.localCharacter == (Object)null || Time.time < arrowRoundStartLocalTime) { return; } int num = 0; int num2 = 0; if (Input.GetKeyDown((KeyCode)100)) { num = 1; } else if (Input.GetKeyDown((KeyCode)97)) { num = -1; } else if (Input.GetKeyDown((KeyCode)119)) { num2 = 1; } else { if (!Input.GetKeyDown((KeyCode)115)) { return; } num2 = -1; } int num3 = Mathf.Clamp(round3GridLocalX + num, 0, 6); int num4 = Mathf.Clamp(round3GridLocalY + num2, 0, 10); if (num3 == round3GridLocalX && num4 == round3GridLocalY) { PlayRound3GridBlockedSoundLocal(); return; } if (!IsRound3GridWalkable(num3, num4)) { PlayRound3GridBlockedSoundLocal(); return; } round3GridLocalX = num3; round3GridLocalY = num4; arrowLocalInputIndex++; PlayRound8MoveSoundLocal(); if (round3GridLocalX != round3GridStarX || round3GridLocalY != round3GridStarY) { return; } PlayRound8StarSoundLocal(); if (round3GridPhase <= 1) { SwitchRound3GridToSecondPhase(); return; } arrowLocalSubmitted = true; float num5 = (round3GridLocalFinishTime = Mathf.Max(0f, Time.time - arrowRoundStartLocalTime)); round3GridLocalClearPopupUntil = Time.time + 2.2f; int actorNumber = GetActorNumber(Character.localCharacter); if (!arrowRoundSubmissions.ContainsKey(actorNumber)) { arrowRoundSubmissions[actorNumber] = num5; } RaiseMiniGameEvent(104, new object[2] { actorNumber, num5 }, (ReceiverGroup)1); } private void AwardArrowRoundScores() { currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); List> list = new List>(); HashSet hashSet = new HashSet(); foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { hashSet.Add(actorNumber); if (arrowRoundSubmissions.TryGetValue(actorNumber, out var value)) { list.Add(new KeyValuePair(actorNumber, value)); } } } list.Sort(delegate(KeyValuePair a, KeyValuePair b) { int num2 = a.Value.CompareTo(b.Value); return (num2 != 0) ? num2 : a.Key.CompareTo(b.Key); }); int[] array = new int[4] { 20, 15, 10, 5 }; for (int i = 0; i < list.Count; i++) { int key = list[i].Key; int num = array[Mathf.Clamp(i, 0, array.Length - 1)]; currentRoundScores[key] = Mathf.Clamp(num, 0, maxRoundScore.Value); currentRoundScoreLocked.Add(key); } foreach (int item in hashSet) { if (!currentRoundScores.ContainsKey(item)) { currentRoundScores[item] = 0; } currentRoundScoreLocked.Add(item); } SyncScoresToAll(); } private void ApplyRankScores(List> ranked, string resultTitle) { int[] array = new int[4] { 20, 15, 10, 5 }; for (int i = 0; i < ranked.Count; i++) { int key = ranked[i].Key; int num = array[Mathf.Clamp(i, 0, array.Length - 1)]; if (!currentRoundScores.ContainsKey(key)) { currentRoundScores[key] = 0; } currentRoundScores[key] = Mathf.Clamp(num, 0, maxRoundScore.Value); currentRoundScoreLocked.Add(key); } SyncScoresToAll(); } private void DrawTimingRoundUI() { //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) if (currentRoundType == RoundGameType.ShelfHook && (timingRoundActive || timingLocalSubmitted)) { EnsureMiniGameStyles(); if (timingRoundActive) { float num = Mathf.Max(0f, Time.time - timingRoundStartLocalTime); string text = "목표 " + timingRoundTargetSeconds.ToString("0.00") + "초"; string text2 = ((num <= timingStopwatchVisibleSeconds.Value) ? Mathf.Max(0.01f, num).ToString("0.00") : "???"); DrawOutlinedLabel(new Rect(0f, 190f, (float)Screen.width, 55f), text, minigameTitleStyle, Color.white, Color.black, 2f); DrawOutlinedLabel(new Rect(0f, 245f, (float)Screen.width, 90f), text2, minigameMainStyle, Color.white, Color.black, 3f); } else { DrawOutlinedLabel(new Rect(0f, 190f, (float)Screen.width, 52f), "2라운드 결과", minigameTitleStyle, Color.white, Color.black, 2f); } if (timingLocalSubmitted && timingLocalPressedSeconds >= 0f) { float num2 = timingLocalPressedSeconds - timingRoundTargetSeconds; string text3 = ((num2 >= 0f) ? "+" : "-"); GUIStyle val = new GUIStyle(minigameSmallStyle); val.alignment = (TextAnchor)4; val.fontStyle = (FontStyle)1; val.fontSize = Mathf.Clamp(Mathf.RoundToInt((float)Screen.height / 36f), 17, 25); val.clipping = (TextClipping)0; val.wordWrap = false; string text4 = "입력: " + timingLocalPressedSeconds.ToString("0.00") + "초"; string text5 = "차이: " + text3 + Mathf.Abs(num2).ToString("0.00") + "초"; float num3 = Mathf.Min((float)Screen.width - 40f, 560f); float num4 = ((float)Screen.width - num3) * 0.5f; float num5 = (timingRoundActive ? 350f : 260f); DrawOutlinedLabel(new Rect(num4, num5, num3, 40f), text4, val, Color.white, Color.black, 2f); DrawOutlinedLabel(new Rect(num4, num5 + 40f, num3, 40f), text5, val, Color.white, Color.black, 2f); } else if (timingRoundActive) { DrawOutlinedLabel(new Rect(0f, 360f, (float)Screen.width, 42f), "Space 키를 목표 시간에 맞춰 누르기", minigameSmallStyle, Color.white, Color.black, 2f); } DrawTimingRoundDifferencePanelUI(); } } private void DrawTimingRoundDifferencePanelUI() { } private void DrawArrowRoundUI() { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Expected O, but got Unknown //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) if (!arrowRoundActive || currentRoundType != RoundGameType.BounceFrisbee) { return; } EnsureMiniGameStyles(); float num = arrowRoundStartLocalTime - Time.time; string text = ((num > 2.25f) ? "3" : ((num > 1.25f) ? "2" : ((num > 0.25f) ? "1" : ((!(num > 0f)) ? (arrowLocalSubmitted ? "도착!" : ((round3GridPhase <= 1) ? "리턴 표시까지 이동!" : "별까지 내려가기!")) : "START")))); Color textColor = (Color)((num > 0f) ? new Color(1f, 0.86f, 0.25f, 1f) : Color.white); DrawOutlinedLabel(new Rect(0f, 78f, (float)Screen.width, 58f), text, minigameTitleStyle, textColor, Color.black, 2.5f); float num2 = (float)Screen.height - 190f; float num3 = Mathf.Floor(Mathf.Min((float)Screen.width * 0.7f / 7f, num2 / 11f)); num3 = Mathf.Clamp(num3, 34f, 58f); float num4 = num3 * 7f; float num5 = num3 * 11f; float num6 = ((float)Screen.width - num4) * 0.5f; float num7 = 145f; Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.55f); GUI.DrawTexture(new Rect(num6 - 10f, num7 - 10f, num4 + 20f, num5 + 20f), (Texture)(object)Texture2D.whiteTexture); Rect val = default(Rect); for (int i = 0; i < 11; i++) { for (int j = 0; j < 7; j++) { float num8 = num6 + (float)j * num3; float num9 = num7 + (float)(10 - i) * num3; ((Rect)(ref val))..ctor(num8 + 2f, num9 + 2f, num3 - 4f, num3 - 4f); bool flag = j == round3GridLocalX && i == round3GridLocalY; bool flag2 = j == round3GridStarX && i == round3GridStarY; char round3GridCellChar = GetRound3GridCellChar(j, i); bool flag3 = flag2 && round3GridPhase <= 1; bool flag4 = !IsRound3GridWalkable(j, i); GUI.color = (flag4 ? new Color(0.04f, 0.04f, 0.04f, 0.88f) : (flag ? new Color(1f, 1f, 1f, 0.96f) : (flag2 ? new Color(1f, 0.82f, 0.15f, 0.95f) : new Color(1f, 1f, 1f, 0.18f)))); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(0f, 0f, 0f, 0.65f); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, ((Rect)(ref val)).width, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, 2f, ((Rect)(ref val)).height), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; if (flag) { string text2 = "\ud83d\udc64"; DrawOutlinedLabel(val, text2, minigameSmallStyle, Color.white, Color.black, 1.4f); continue; } string text3 = ((!flag2) ? (flag4 ? "⬛" : "") : (flag3 ? "\ud83d\udd03" : "⭐")); if (!string.IsNullOrEmpty(text3)) { GUI.Label(val, TranslateUiText(text3), minigameSmallStyle); } } } GUI.color = color; float num10 = Mathf.Max(0f, Time.time - arrowRoundStartLocalTime); float num11 = Mathf.Max(0f, Mathf.Max(3f, arrowRoundTimeLimit.Value) - num10); float num12 = ((round3GridLocalFinishTime >= 0f) ? round3GridLocalFinishTime : num10); string text4 = ((round3GridPhase <= 1) ? "\ud83d\udd03" : "⭐"); string text5 = (arrowLocalSubmitted ? ("도착 완료 " + num12.ToString("0.00") + "초") : ("WASD 이동 남은 시간 " + num11.ToString("0.0") + "초 목표 " + text4)); DrawOutlinedLabel(new Rect(0f, num7 + num5 + 12f, (float)Screen.width, 42f), text5, minigameSmallStyle, Color.white, Color.black, 2f); if ((round3GridLocalFinishTime >= 0f || (round3GridPhase == 2 && round3GridReturnTime >= 0f)) && Time.time < round3GridLocalClearPopupUntil) { GUIStyle val2 = new GUIStyle(minigameMainStyle); val2.fontSize = Mathf.Clamp(Mathf.RoundToInt((float)Screen.height / 18f), 36, 64); val2.alignment = (TextAnchor)4; val2.fontStyle = (FontStyle)1; string text6 = ((round3GridLocalFinishTime >= 0f) ? ("CLEAR " + round3GridLocalFinishTime.ToString("0.00") + "초") : ("RETURN " + round3GridReturnTime.ToString("0.00") + "초")); DrawOutlinedLabel(new Rect(0f, (float)Screen.height * 0.42f, (float)Screen.width, 90f), text6, val2, new Color(1f, 0.92f, 0.25f, 1f), Color.black, 3f); } DrawArrowRoundClearTimePanelUI(); } private void DrawArrowRoundClearTimePanelUI() { } private void DrawRhythmRoundUI() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) if (!rhythmRoundActive || currentRoundType != RoundGameType.RhythmGame) { return; } EnsureMiniGameStyles(); EnsureArrowTextures(); EnsureRhythmTextures(); if (string.IsNullOrEmpty(rhythmSequence)) { return; } if (rhythmCenterResultPanelActive) { DrawRhythmProgressPanelUI(centerMode: true); return; } float num = Mathf.Clamp((float)Screen.width / 17f, 48f, 72f); float num2 = 18f; char[] array = new char[4] { 'L', 'D', 'U', 'R' }; float num3 = (float)array.Length * num + (float)(array.Length - 1) * num2; float num4 = ((float)Screen.width - num3) * 0.5f; float num5 = (float)Screen.height * 0.72f; float num6 = 95f; float num7 = Mathf.Max(0.25f, rhythmNoteTravelSeconds.Value); DrawOutlinedLabel(new Rect(0f, 56f, (float)Screen.width, 45f), "Rhythm Arrow", minigameTitleStyle, Color.white, Color.black, 2f); char c = rhythmSequence[Mathf.Clamp(rhythmLocalInputIndex, 0, rhythmSequence.Length - 1)]; Rect rect = default(Rect); for (int i = 0; i < array.Length; i++) { float num8 = num4 + (float)i * (num + num2); ((Rect)(ref rect))..ctor(num8, num5, num, num); float scale = 1f; if (i < rhythmSlotPopUntil.Length && Time.time < rhythmSlotPopUntil[i]) { float num9 = Mathf.Clamp01((rhythmSlotPopUntil[i] - Time.time) / 0.16f); scale = 1f + Mathf.Sin(num9 * (float)Math.PI) * 0.22f; } DrawUnifiedArrowIcon(ScaleRect(rect, scale), array[i], completed: false, array[i] == c && !rhythmLocalSubmitted); } Rect rect2 = default(Rect); for (int j = 0; j < rhythmSequence.Length; j++) { if (j >= rhythmNoteJudged.Length || !rhythmNoteJudged[j]) { char c2 = rhythmSequence[j]; int num10 = RhythmLaneIndex(c2); float num11 = num4 + (float)num10 * (num + num2); float num12 = rhythmRoundStartLocalTime + GetRhythmNoteTargetOffset(j); float num13 = 1f - (num12 - Time.time) / num7; if (num13 >= -0.2f && num13 <= 1.22f) { float num14 = Mathf.Lerp(num6, num5, num13); ((Rect)(ref rect2))..ctor(num11, num14, num, num); DrawUnifiedArrowIcon(rect2, c2, completed: false, j == rhythmLocalInputIndex); } } } string text = (rhythmLocalSubmitted ? ("결과 제출: " + rhythmLocalHitCount + " / " + rhythmSequence.Length) : (rhythmLocalHitCount + " / " + rhythmSequence.Length)); DrawOutlinedLabel(new Rect(0f, num5 + num + 18f, (float)Screen.width, 45f), text, minigameSmallStyle, Color.white, Color.black, 2f); } private void DrawRhythmProgressPanelUI(bool centerMode) { //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) RefreshActorNamesFromCharacters(); List list = new List(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int key in rhythmRoundProgressByActor.Keys) { if (key > 0 && !list.Contains(key)) { list.Add(key); } } foreach (int key2 in rhythmRoundSubmissions.Keys) { if (key2 > 0 && !list.Contains(key2)) { list.Add(key2); } } list.Sort(delegate(int a, int b) { int rhythmDisplayHitCount2 = GetRhythmDisplayHitCount(a); int num8 = GetRhythmDisplayHitCount(b).CompareTo(rhythmDisplayHitCount2); return (num8 != 0) ? num8 : a.CompareTo(b); }); float num = (centerMode ? Mathf.Min(720f, (float)Screen.width * 0.72f) : 330f); float num2 = (centerMode ? (86f + (float)Mathf.Min(4, list.Count) * 48f) : (58f + (float)Mathf.Min(4, list.Count) * 38f)); float num3 = (centerMode ? (((float)Screen.width - num) * 0.5f) : ((float)Screen.width - num - 28f)); float num4 = (centerMode ? (((float)Screen.height - num2) * 0.5f) : 245f); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, centerMode ? 0.78f : 0.68f); GUI.DrawTexture(new Rect(num3, num4, num, num2), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; string text = (centerMode ? "리듬 게임 결과" : "성공률"); DrawOutlinedLabel(new Rect(num3 + 8f, num4 + 12f, num - 16f, centerMode ? 42f : 30f), text, centerMode ? minigameTitleStyle : minigameSmallStyle, new Color(1f, 0.92f, 0.25f, 1f), Color.black, 1.8f); float num5 = (centerMode ? (num4 + 64f) : (num4 + 48f)); int num6 = Mathf.Min(4, list.Count); for (int i = 0; i < num6; i++) { int num7 = list[i]; string text2 = (actorNames.ContainsKey(num7) ? actorNames[num7] : ("Player " + num7)); int rhythmDisplayHitCount = GetRhythmDisplayHitCount(num7); string text3 = i + 1 + ". " + text2 + " " + rhythmDisplayHitCount + "/" + 30; DrawOutlinedLabel(new Rect(num3 + 10f, num5, num - 20f, centerMode ? 42f : 32f), text3, centerMode ? minigameSmallStyle : minigameSmallStyle, Color.white, Color.black, centerMode ? 1.6f : 1.2f); num5 += (centerMode ? 48f : 38f); } } private int GetRhythmDisplayHitCount(int actor) { if (rhythmRoundSubmissions.TryGetValue(actor, out var value)) { return Mathf.Clamp(Mathf.RoundToInt(value), 0, 30); } if (rhythmRoundProgressByActor.TryGetValue(actor, out var value2)) { return Mathf.Clamp(value2, 0, 30); } return 0; } private void EnsureRhythmTextures() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)rhythmSlotTexture == (Object)null) { rhythmSlotTexture = MakeSolidTexture(4, 4, Color.white); } if ((Object)(object)rhythmNoteTexture == (Object)null) { rhythmNoteTexture = MakeSolidTexture(4, 4, new Color(1f, 0.72f, 0.22f, 1f)); } if ((Object)(object)rhythmHitTexture == (Object)null) { rhythmHitTexture = MakeSolidTexture(4, 4, new Color(0.35f, 1f, 0.55f, 1f)); } } private void DrawRhythmSlot(Rect rect, string label, bool done, bool current, float scale) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) Color color = GUI.color; Rect val = ScaleRect(rect, scale); GUI.color = Color.white; GUI.DrawTexture(val, (Texture)(object)rhythmSlotTexture); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref val)).x + 3f, ((Rect)(ref val)).y + 3f, ((Rect)(ref val)).width - 6f, ((Rect)(ref val)).height - 6f); GUI.color = (done ? new Color(0.15f, 0.8f, 0.25f, 0.85f) : (current ? new Color(1f, 0.55f, 0.15f, 0.85f) : new Color(0f, 0f, 0f, 0.68f))); GUI.DrawTexture(val2, (Texture)(object)rhythmSlotTexture); GUI.color = color; GUIStyle style = minigameSmallStyle ?? GUI.skin.label; DrawOutlinedLabel(val, label, style, Color.white, Color.black, 2f); } private void DrawRhythmNote(Rect rect, string label) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) Color color = GUI.color; GUI.color = new Color(1f, 0.75f, 0.2f, 0.96f); GUI.DrawTexture(rect, (Texture)(object)rhythmNoteTexture); GUI.color = color; GUIStyle style = minigameSmallStyle ?? GUI.skin.label; DrawOutlinedLabel(rect, label, style, Color.white, Color.black, 2f); } private Rect ScaleRect(Rect rect, float scale) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) float num = ((Rect)(ref rect)).width * scale; float num2 = ((Rect)(ref rect)).height * scale; return new Rect(((Rect)(ref rect)).center.x - num * 0.5f, ((Rect)(ref rect)).center.y - num2 * 0.5f, num, num2); } private void HandleTimingTickSound() { try { if (!timingRoundActive || currentRoundType != RoundGameType.ShelfHook || timingLocalSubmitted || (Object)(object)Character.localCharacter == (Object)null || (timingTickSoundEnabled != null && !timingTickSoundEnabled.Value)) { return; } float num = Mathf.Max(0f, Time.time - timingRoundStartLocalTime); int num2 = Mathf.FloorToInt(num); if (num2 > 0 && num2 != timingLastTickSecond) { timingLastTickSecond = num2; EnsureTimingAudio(); if ((Object)(object)timingAudioSource != (Object)null && (Object)(object)timingTickClip != (Object)null) { timingAudioSource.volume = Mathf.Clamp01((timingTickSoundVolume != null) ? timingTickSoundVolume.Value : 0.45f); timingAudioSource.PlayOneShot(timingTickClip); } } } catch { } } private void EnsureTimingAudio() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if ((Object)(object)timingAudioSource == (Object)null) { GameObject val = new GameObject("100sec_TimingTickAudio"); Object.DontDestroyOnLoad((Object)(object)val); timingAudioSource = val.AddComponent(); timingAudioSource.playOnAwake = false; timingAudioSource.spatialBlend = 0f; timingAudioSource.volume = Mathf.Clamp01((timingTickSoundVolume != null) ? timingTickSoundVolume.Value : 0.45f); } if ((Object)(object)timingTickClip == (Object)null) { timingTickClip = CreateTickClip("100sec_TickTock", 44100); } } private void PlayTimingBgm() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown try { if (timingBgmEnabled != null && !timingBgmEnabled.Value) { return; } EnsureTimingAudio(); if ((Object)(object)timingBgmAudioSource == (Object)null) { GameObject val = new GameObject("100sec_Round2ProceduralBgmAudio"); Object.DontDestroyOnLoad((Object)(object)val); timingBgmAudioSource = val.AddComponent(); timingBgmAudioSource.playOnAwake = false; timingBgmAudioSource.spatialBlend = 0f; timingBgmAudioSource.loop = true; } if ((Object)(object)timingBgmClip == (Object)null) { timingBgmClip = CreateProceduralRound2BgmClip("100sec_Round2_Procedural_BGM", 44100); } if (!((Object)(object)timingBgmClip == (Object)null)) { timingBgmAudioSource.clip = timingBgmClip; timingBgmAudioSource.volume = Mathf.Clamp01((timingBgmVolume != null) ? timingBgmVolume.Value : 0.8f); if (!timingBgmAudioSource.isPlaying) { timingBgmAudioSource.Play(); } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Round2 procedural BGM play failed: " + ex.Message)); } } private void StopTimingBgm() { try { if ((Object)(object)timingBgmAudioSource != (Object)null) { timingBgmAudioSource.Stop(); timingBgmAudioSource.loop = false; timingBgmAudioSource.clip = null; } } catch { } } private AudioClip TryLoadRound2BgmClip() { try { string text = ""; string text2 = FindPluginFile(text); if (string.IsNullOrEmpty(text2) || !File.Exists(text2)) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Round2 BGM file not found: " + text + " / place it in BepInEx/plugins")); return null; } return LoadWavClip(text2, "100sec_Round2_BGM"); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Round2 BGM load failed: " + ex.Message)); return null; } } private string FindPluginFile(string fileName) { if (string.IsNullOrWhiteSpace(fileName)) { return null; } string text = Path.Combine(Paths.PluginPath, fileName); if (File.Exists(text)) { return text; } try { string[] files = Directory.GetFiles(Paths.PluginPath, fileName, SearchOption.AllDirectories); if (files != null && files.Length != 0) { return files[0]; } } catch { } return null; } private AudioClip LoadWavClip(string path, string clipName) { byte[] array = File.ReadAllBytes(path); if (array == null || array.Length < 44) { return null; } int num = BitConverter.ToInt16(array, 22); int num2 = BitConverter.ToInt32(array, 24); int num3 = BitConverter.ToInt16(array, 34); int num4 = -1; int num5 = 0; int num6 = 12; while (num6 + 8 < array.Length) { string @string = Encoding.ASCII.GetString(array, num6, 4); int num7 = BitConverter.ToInt32(array, num6 + 4); if (@string == "data") { num4 = num6 + 8; num5 = num7; break; } num6 += 8 + Mathf.Max(0, num7); if ((num7 & 1) == 1) { num6++; } } if (num4 < 0 || num5 <= 0) { return null; } if (num <= 0) { num = 1; } if (num2 <= 0) { num2 = 44100; } int num8 = num3 / 8; if (num8 != 2 && num8 != 4) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"Only 16-bit PCM or 32-bit float WAV is supported for Round2 BGM."); return null; } int num9 = num5 / num8; float[] array2 = new float[num9]; int num10 = num4; for (int i = 0; i < num9; i++) { if (num10 + num8 > array.Length) { break; } if (num3 == 16) { short num11 = BitConverter.ToInt16(array, num10); array2[i] = Mathf.Clamp((float)num11 / 32768f, -1f, 1f); } else { array2[i] = Mathf.Clamp(BitConverter.ToSingle(array, num10), -1f, 1f); } num10 += num8; } int num12 = Mathf.Max(1, array2.Length / num); AudioClip val = AudioClip.Create(clipName, num12, num, num2, false); val.SetData(array2, 0); return val; } private AudioClip CreateProceduralRound2BgmClip(string clipName, int sampleRate) { float num = 22f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; float num3 = 0.55f; float num4 = 0.075f; float num5 = 0.045f; for (int i = 0; i < num2; i++) { float num6 = (float)i / (float)sampleRate; float num7 = Mathf.Clamp01(num6 / 0.35f); float num8 = Mathf.Clamp01((num - num6) / 0.35f); float num9 = Mathf.Min(num7, num8); float num10 = Mathf.Sin((float)Math.PI * 220f * num6) * 0.03f; num10 += Mathf.Sin((float)Math.PI * 440f * num6) * 0.018f; num10 *= 0.65f + 0.35f * Mathf.Sin((float)Math.PI * num6); float num11 = num6 - Mathf.Floor(num6 / num3) * num3; float num12 = 0f; if (num11 < num4) { float num13 = Mathf.Exp((0f - num11) * 55f); num12 += Mathf.Sin((float)Math.PI * 2500f * num11) * 0.34f * num13; num12 += Mathf.Sin((float)Math.PI * 3700f * num11) * 0.16f * num13; num12 += Mathf.Sin((float)Math.PI * 1440f * num11) * 0.08f * num13; } float num14 = num11 - num3 * 0.5f; if (num14 >= 0f && num14 < num5) { float num15 = Mathf.Exp((0f - num14) * 70f); num12 += Mathf.Sin((float)Math.PI * 1640f * num14) * 0.16f * num15; num12 += Mathf.Sin((float)Math.PI * 920f * num14) * 0.1f * num15; } float num16 = num3 * 4f; float num17 = num6 - Mathf.Floor(num6 / num16) * num16; float num18 = 0f; if (num17 < 0.18f) { float num19 = Mathf.Exp((0f - num17) * 12f); num18 = Mathf.Sin((float)Math.PI * 144f * num17) * 0.08f * num19; } float num20 = Mathf.Sin((float)Math.PI * 6200f * num6 + Mathf.Sin(45.867256f * num6)) * 0.006f; float num21 = (num10 + num12 + num18 + num20) * num9; array[i] = Mathf.Clamp(num21, -0.95f, 0.95f); } AudioClip val = AudioClip.Create(clipName, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private AudioClip CreateTickClip(string name, int sampleRate) { float num = 0.075f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Exp((0f - num3) * 42f); float num5 = Mathf.Sin((float)Math.PI * 2500f * num3) * 0.55f + Mathf.Sin((float)Math.PI * 3700f * num3) * 0.22f; array[i] = num5 * num4; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void EnsureRhythmAudio() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if ((Object)(object)rhythmAudioSource == (Object)null) { GameObject val = new GameObject("100sec_RhythmAudio"); Object.DontDestroyOnLoad((Object)(object)val); rhythmAudioSource = val.AddComponent(); rhythmAudioSource.playOnAwake = false; rhythmAudioSource.spatialBlend = 0f; rhythmAudioSource.volume = 0.75f; } if ((Object)(object)rhythmHitClip == (Object)null) { rhythmHitClip = CreateRhythmSuccessDing10Clip("RhythmSuccess_Ding_10", 44100); } if ((Object)(object)rhythmFailClip == (Object)null) { rhythmFailClip = CreateRhythmFail01Clip("RhythmFail_01", 44100); } } private float GetForcedRhythmNoteInterval() { return 0.35f; } private AudioClip CreateToneClip(string name, float frequency, float duration, int sampleRate) { int num = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * duration)); float[] array = new float[num]; for (int i = 0; i < num; i++) { float num2 = (float)i / (float)sampleRate; float num3 = 1f - (float)i / (float)num; array[i] = Mathf.Sin((float)Math.PI * 2f * frequency * num2) * num3 * 0.45f; } AudioClip val = AudioClip.Create(name, num, 1, sampleRate, false); val.SetData(array, 0); return val; } private float BellEnv(float t, float decay) { if (t < 0.003f) { return t / 0.003f; } return Mathf.Exp((0f - decay) * (t - 0.003f)); } private AudioClip CreateRhythmSuccessDing10Clip(string name, int sampleRate) { float num = 0.3f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; float[] array2 = new float[4] { 780f, 980f, 1220f, 1460f }; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; int num4 = Mathf.Clamp(Mathf.FloorToInt(num3 / num * (float)array2.Length), 0, array2.Length - 1); float num5 = array2[num4]; float num6 = BellEnv(num3, 7.4f); float num7 = Mathf.Sin((float)Math.PI * 2f * num5 * num3) * 0.75f + Mathf.Sin((float)Math.PI * 2f * num5 * 2.01f * num3) * 0.22f + Mathf.Sin((float)Math.PI * 2f * num5 * 3f * num3) * 0.12f; float num8 = Mathf.Sin((float)Math.PI * 3466f * num3) * Mathf.Sin((float)Math.PI * 4822f * num3) * 0.015f; array[i] = (num7 * 0.38f + num8) * num6; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private AudioClip CreateRhythmFail01Clip(string name, int sampleRate) { float num = 0.32f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = num3 / num; float num5 = 520f - 360f * num4; float num6 = 0.004f; float num7 = 0.1f; float num8 = 1f; if (num3 < num6) { num8 = num3 / num6; } else if (num3 > num - num7) { num8 = Mathf.Max(0f, (num - num3) / num7); } array[i] = Mathf.Sin((float)Math.PI * 2f * num5 * num3) * num8 * 0.45f; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void PlayRhythmHitSound() { try { EnsureRhythmAudio(); if ((Object)(object)rhythmAudioSource != (Object)null && (Object)(object)rhythmHitClip != (Object)null) { rhythmAudioSource.PlayOneShot(rhythmHitClip); } } catch { } } private void PlayRhythmFailSound() { try { EnsureRhythmAudio(); if ((Object)(object)rhythmAudioSource != (Object)null && (Object)(object)rhythmFailClip != (Object)null) { rhythmAudioSource.PlayOneShot(rhythmFailClip); } } catch { } } private void EnsureArrowInputAudio() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if ((Object)(object)arrowInputAudioSource == (Object)null) { GameObject val = new GameObject("100sec_ArrowInputAudio"); Object.DontDestroyOnLoad((Object)(object)val); arrowInputAudioSource = val.AddComponent(); arrowInputAudioSource.playOnAwake = false; arrowInputAudioSource.spatialBlend = 0f; } arrowInputAudioSource.volume = Mathf.Clamp01((arrowInputSoundVolume != null) ? arrowInputSoundVolume.Value : 0.75f); if ((Object)(object)arrowCorrectClip == (Object)null) { arrowCorrectClip = CreateArrowCorrectClip("100sec_ArrowCorrect", 44100); } if ((Object)(object)arrowWrongClip == (Object)null) { arrowWrongClip = CreateArrowWrongClip("100sec_ArrowWrong", 44100); } } private AudioClip CreateArrowCorrectClip(string name, int sampleRate) { float num = 0.14f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Clamp01(num3 / 0.012f); float num5 = Mathf.Clamp01((num - num3) / 0.09f); float num6 = num4 * num5; float num7 = Mathf.Sin((float)Math.PI * 2093f * num3); float num8 = Mathf.Sin((float)Math.PI * 3136f * num3) * 0.55f; array[i] = (num7 + num8) * num6 * 0.35f; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private AudioClip CreateArrowWrongClip(string name, int sampleRate) { float num = 0.18f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Clamp01(num3 / 0.01f); float num5 = Mathf.Clamp01((num - num3) / 0.12f); float num6 = num4 * num5; float num7 = Mathf.Lerp(210f, 95f, num3 / num); float num8 = Mathf.Sin((float)Math.PI * 2f * num7 * num3); float num9 = Mathf.Sign(num8) * 0.65f + num8 * 0.35f; array[i] = num9 * num6 * 0.32f; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void PlayArrowCorrectSound() { try { EnsureArrowInputAudio(); if ((Object)(object)arrowInputAudioSource != (Object)null && (Object)(object)arrowCorrectClip != (Object)null) { arrowInputAudioSource.PlayOneShot(arrowCorrectClip); } } catch { } } private void PlayArrowWrongSound() { try { EnsureArrowInputAudio(); if ((Object)(object)arrowInputAudioSource != (Object)null && (Object)(object)arrowWrongClip != (Object)null) { arrowInputAudioSource.PlayOneShot(arrowWrongClip); } } catch { } } private void PlayRound3GridBlockedSoundLocal() { try { EnsureArrowInputAudio(); if ((Object)(object)round3BlockedClip == (Object)null) { round3BlockedClip = CreateRound3BlockedLowBuzzClip("Round3_Blocked_LowBuzz_02", 44100); } if ((Object)(object)arrowInputAudioSource != (Object)null && (Object)(object)round3BlockedClip != (Object)null) { arrowInputAudioSource.PlayOneShot(round3BlockedClip, 0.82f); } } catch { PlayArrowWrongSound(); } } private AudioClip CreateRound3BlockedLowBuzzClip(string name, int sampleRate) { float num = 0.28f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Clamp01(num3 / 0.006f); float num5 = Mathf.Clamp01((num - num3) / 0.085f); float num6 = num4 * num5; float num7 = Mathf.Sin((float)Math.PI * 190f * num3) * 0.45f; float num8 = Mathf.Sin((float)Math.PI * 260f * num3) * 0.2f; array[i] = (num7 + num8) * num6; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void EnsureCloudDisappearAudio() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if ((Object)(object)cloudDisappearAudioSource == (Object)null) { GameObject val = new GameObject("100sec_CloudDisappearAudio"); Object.DontDestroyOnLoad((Object)(object)val); cloudDisappearAudioSource = val.AddComponent(); cloudDisappearAudioSource.playOnAwake = false; cloudDisappearAudioSource.spatialBlend = 0f; } cloudDisappearAudioSource.volume = Mathf.Clamp01((cloudDisappearSoundVolume != null) ? cloudDisappearSoundVolume.Value : 0.65f); if ((Object)(object)cloudDisappearClip == (Object)null) { cloudDisappearClip = CreateCloudDisappearClip("100sec_CloudDisappear", 44100); } } private AudioClip CreateCloudDisappearClip(string name, int sampleRate) { float num = 0.42f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; uint num3 = 2463534242u; for (int i = 0; i < num2; i++) { float num4 = (float)i / (float)sampleRate; float num5 = Mathf.Clamp01(num4 / num); float num6 = Mathf.Pow(1f - num5, 2.25f); float num7 = Mathf.Exp((0f - num4) * 45f); float num8 = Mathf.Pow(1f - num5, 1.15f); num3 ^= num3 << 13; num3 ^= num3 >> 17; num3 ^= num3 << 5; float num9 = (float)(num3 & 0xFFFFu) / 32768f - 1f; float num10 = Mathf.Sin((float)Math.PI * 2f * Mathf.Lerp(270f, 95f, num5) * num4) * num7 * 0.55f; float num11 = num9 * num8 * 0.18f; float num12 = Mathf.Sin((float)Math.PI * 2f * (1180f + 220f * Mathf.Sin((float)Math.PI * 10f * num4)) * num4) * num6 * 0.08f; float num13 = Mathf.Sin((float)Math.PI * 144f * num4) * num7 * 0.18f; array[i] = Mathf.Clamp((num10 + num11 + num12 + num13) * 0.75f, -0.95f, 0.95f); } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void PlayCloudDisappearSound() { try { if (cloudDisappearSoundEnabled == null || cloudDisappearSoundEnabled.Value) { EnsureCloudDisappearAudio(); if ((Object)(object)cloudDisappearAudioSource != (Object)null && (Object)(object)cloudDisappearClip != (Object)null) { cloudDisappearAudioSource.PlayOneShot(cloudDisappearClip, Mathf.Clamp01((cloudDisappearSoundVolume != null) ? cloudDisappearSoundVolume.Value : 0.65f)); } } } catch { } } private void EnsureRound8Audio() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown try { if ((Object)(object)round8AudioSource == (Object)null) { GameObject val = new GameObject("100sec_Round8StarGridAudio"); Object.DontDestroyOnLoad((Object)(object)val); round8AudioSource = val.AddComponent(); round8AudioSource.playOnAwake = false; round8AudioSource.spatialBlend = 0f; round8AudioSource.volume = 1f; } if ((Object)(object)round8MoveClip == (Object)null) { round8MoveClip = CreateRound8MoveClip("Round8_Move_Ttok_03", 44100); } if ((Object)(object)round8StarClip == (Object)null) { round8StarClip = CreateRound8StarClip("Round8_Star_Pong_04", 44100); } } catch { } } private void PlayRound8MoveSoundLocal() { try { EnsureRound8Audio(); if ((Object)(object)round8AudioSource != (Object)null && (Object)(object)round8MoveClip != (Object)null) { round8AudioSource.PlayOneShot(round8MoveClip, 0.68f); } } catch { } } private void PlayRound8StarSoundLocal() { try { EnsureRound8Audio(); if ((Object)(object)round8AudioSource != (Object)null && (Object)(object)round8StarClip != (Object)null) { round8AudioSource.PlayOneShot(round8StarClip, 0.78f); } } catch { } } private AudioClip CreateRound8MoveClip(string name, int sampleRate) { int num = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * 0.085f)); float[] array = new float[num]; for (int i = 0; i < num; i++) { float num2 = (float)i / (float)sampleRate; float num3 = Mathf.Min(1f, num2 / 0.004f) * Mathf.Exp((0f - num2) / 0.045f); float num4 = 520f * (1f - 0.25f * (num2 / 0.085f)); float num5 = Mathf.Sin((float)Math.PI * 2f * num4 * num2) * 0.45f; if (num2 > 0.018f) { float num6 = num2 - 0.018f; num5 += Mathf.Sin((float)Math.PI * 1300f * num6) * 0.18f * Mathf.Exp((0f - num6) / 0.02f); } array[i] = num5 * num3; } AudioClip val = AudioClip.Create(name, num, 1, sampleRate, false); val.SetData(array, 0); return val; } private AudioClip CreateRound8StarClip(string name, int sampleRate) { int num = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * 0.13f)); float[] array = new float[num]; for (int i = 0; i < num; i++) { float num2 = (float)i / (float)sampleRate; float num3 = num2 / 0.13f; float num4 = Mathf.Min(1f, num2 / 0.004f) * Mathf.Exp((0f - num2) / 0.075f); float num5 = 330f * (1f + 0.65f * num3); float num6 = Mathf.Sin((float)Math.PI * 2f * num5 * num2) * 0.48f; array[i] = num6 * num4; } AudioClip val = AudioClip.Create(name, num, 1, sampleRate, false); val.SetData(array, 0); return val; } private void EnsureRound10Audio() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown try { if ((Object)(object)round10AudioSource == (Object)null) { GameObject val = new GameObject("100sec_Round10HalliGalliAudio"); Object.DontDestroyOnLoad((Object)(object)val); round10AudioSource = val.AddComponent(); round10AudioSource.playOnAwake = false; round10AudioSource.spatialBlend = 0f; round10AudioSource.volume = 1f; } if ((Object)(object)round10CardFlipClip == (Object)null) { round10CardFlipClip = CreateRound10CardFlipClip("Round10_CardFlip_03_CleanUIFlip", 44100); } if ((Object)(object)round10SuccessClip == (Object)null) { round10SuccessClip = CreateRound10SuccessTtorongClip("Round10_Success_Ttorong_01", 44100); } } catch { } } private void PlayRound10CardFlipSoundLocal() { try { EnsureRound10Audio(); if ((Object)(object)round10AudioSource != (Object)null && (Object)(object)round10CardFlipClip != (Object)null) { round10AudioSource.PlayOneShot(round10CardFlipClip, 0.78f); } } catch { } } private void PlayRound10SuccessSoundLocal() { try { EnsureRound10Audio(); if ((Object)(object)round10AudioSource != (Object)null && (Object)(object)round10SuccessClip != (Object)null) { round10AudioSource.PlayOneShot(round10SuccessClip, 0.82f); } } catch { } } private AudioClip CreateRound10SuccessTtorongClip(string name, int sampleRate) { float num = 0.34f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = 0f; float num5 = Mathf.Min(1f, num3 / 0.004f) * Mathf.Exp((0f - num3) / 0.11f); num4 += Mathf.Sin(4142.19f * num3) * num5 * 0.36f; float num6 = num3 - 0.095f; if (num6 > 0f) { float num7 = Mathf.Min(1f, num6 / 0.004f) * Mathf.Exp((0f - num6) / 0.15f); num4 += Mathf.Sin((float)Math.PI * 2093f * num6) * num7 * 0.34f; } float num8 = num3 - 0.115f; if (num8 > 0f) { float num9 = Mathf.Min(1f, num8 / 0.004f) * Mathf.Exp((0f - num8) / 0.11f); num4 += Mathf.Sin((float)Math.PI * 3136f * num8) * num9 * 0.14f; } array[i] = num4; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private AudioClip CreateRound10CardFlipClip(string name, int sampleRate) { float num = 0.095f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Min(1f, num3 / 0.004f) * Mathf.Exp((0f - num3) / 0.027f); float num5 = Mathf.Sin((float)Math.PI * 2f * Mathf.Lerp(680f, 780f, num3 / 0.06f) * num3) * 0.28f * num4; float num6 = num3 - 0.028f; float num7 = 0f; if (num6 > 0f) { float num8 = Mathf.Min(1f, num6 / 0.003f) * Mathf.Exp((0f - num6) / 0.022f); num7 = Mathf.Sin((float)Math.PI * 2f * Mathf.Lerp(1020f, 920f, num6 / 0.045f) * num6) * 0.16f * num8; } array[i] = num5 + num7; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void EnsureArrowTextures() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)arrowBoxTexture == (Object)null) { arrowBoxTexture = MakeSolidTexture(4, 4, Color.white); } if ((Object)(object)arrowTextureRight == (Object)null) { arrowTextureRight = MakeArrowTexture(64, 'R'); } if ((Object)(object)arrowTextureLeft == (Object)null) { arrowTextureLeft = MakeArrowTexture(64, 'L'); } if ((Object)(object)arrowTextureUp == (Object)null) { arrowTextureUp = MakeArrowTexture(64, 'U'); } if ((Object)(object)arrowTextureDown == (Object)null) { arrowTextureDown = MakeArrowTexture(64, 'D'); } } private Texture2D MakeSolidTexture(int width, int height, Color color) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(width, height, (TextureFormat)5, false); Color[] array = (Color[])(object)new Color[width * height]; for (int i = 0; i < array.Length; i++) { array[i] = color; } val.SetPixels(array); val.Apply(false, true); return val; } private Texture2D GetArrowTexture(char dir) { return (Texture2D)(dir switch { 'R' => arrowTextureRight, 'L' => arrowTextureLeft, 'U' => arrowTextureUp, 'D' => arrowTextureDown, _ => arrowTextureRight, }); } private Texture2D MakeArrowTexture(int size, char dir) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(size, size, (TextureFormat)5, false); ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)1; Color val2 = default(Color); ((Color)(ref val2))..ctor(0f, 0f, 0f, 0f); Color white = Color.white; Color[] array = (Color[])(object)new Color[size * size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { float num = ((float)j + 0.5f) / (float)size * 2f - 1f; float num2 = ((float)i + 0.5f) / (float)size * 2f - 1f; float num3 = num; float num4 = num2; switch (dir) { case 'L': num3 = 0f - num; num4 = num2; break; case 'U': num3 = num2; num4 = 0f - num; break; case 'D': num3 = 0f - num2; num4 = num; break; } bool flag = num3 >= -0.62f && num3 <= 0.12f && Mathf.Abs(num4) <= 0.18f; bool flag2 = num3 >= 0.02f && num3 <= 0.7f && Mathf.Abs(num4) <= (0.7f - num3) * 0.72f; bool flag3 = flag || flag2; array[i * size + j] = (flag3 ? white : val2); } } val.SetPixels(array); val.Apply(false, true); return val; } private void DrawUnifiedArrowIcon(Rect rect, char dir, bool completed, bool current) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) Color color = GUI.color; Color color2 = (completed ? new Color(0.3f, 0.95f, 0.45f, 0.75f) : new Color(0f, 0f, 0f, 0.68f)); if (current) { ((Color)(ref color2))..ctor(1f, 0.68f, 0.25f, 0.82f); } GUI.color = new Color(1f, 1f, 1f, 0.95f); GUI.DrawTexture(rect, (Texture)(object)arrowBoxTexture); Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref rect)).x + 3f, ((Rect)(ref rect)).y + 3f, ((Rect)(ref rect)).width - 6f, ((Rect)(ref rect)).height - 6f); GUI.color = color2; GUI.DrawTexture(val, (Texture)(object)arrowBoxTexture); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref rect)).x + ((Rect)(ref rect)).width * 0.16f, ((Rect)(ref rect)).y + ((Rect)(ref rect)).height * 0.16f, ((Rect)(ref rect)).width * 0.68f, ((Rect)(ref rect)).height * 0.68f); GUI.color = Color.white; GUI.DrawTexture(val2, (Texture)(object)GetArrowTexture(dir), (ScaleMode)0, true); GUI.color = color; } private void EnsureMiniGameStyles() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) if (minigameTitleStyle == null) { minigameTitleStyle = new GUIStyle(GUI.skin.label); minigameTitleStyle.alignment = (TextAnchor)4; minigameTitleStyle.fontStyle = (FontStyle)1; minigameTitleStyle.fontSize = 38; minigameTitleStyle.normal.textColor = Color.white; } if (minigameMainStyle == null) { minigameMainStyle = new GUIStyle(GUI.skin.label); minigameMainStyle.alignment = (TextAnchor)4; minigameMainStyle.fontStyle = (FontStyle)1; minigameMainStyle.fontSize = 72; minigameMainStyle.normal.textColor = Color.white; } if (minigameSmallStyle == null) { minigameSmallStyle = new GUIStyle(GUI.skin.label); minigameSmallStyle.alignment = (TextAnchor)4; minigameSmallStyle.fontStyle = (FontStyle)1; minigameSmallStyle.fontSize = 28; minigameSmallStyle.normal.textColor = Color.white; } } [IteratorStateMachine(typeof(d__1037))] private IEnumerator SpawnShelfCornerArenaRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1037(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__1038))] private IEnumerator SpawnCloudCornerArenaRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1038(0) { <>4__this = this }; } private Vector3[] GetArenaCornerPositions(float y) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Min(arenaStartX.Value, arenaEndX.Value); float num2 = Mathf.Max(arenaStartX.Value, arenaEndX.Value); float num3 = ForcedArenaMinZ(); float num4 = ForcedArenaMaxZ(); return (Vector3[])(object)new Vector3[4] { new Vector3(num, y, num3), new Vector3(num2, y, num3), new Vector3(num, y, num4), new Vector3(num2, y, num4) }; } private object[] BuildRoundEndEventData(string reason) { List list = new List(currentRoundScores.Keys); list.Sort(); int[] array = list.ToArray(); int[] array2 = new int[list.Count]; string[] array3 = new string[list.Count]; for (int i = 0; i < list.Count; i++) { int key = list[i]; array2[i] = (currentRoundScores.ContainsKey(key) ? currentRoundScores[key] : 0); array3[i] = (actorNames.ContainsKey(key) ? actorNames[key] : ("Player " + key)); } string text = GetRoundResultPanelTitle(); string[] array4 = BuildRoundResultPanelLines().ToArray(); return new object[8] { reason, array, array2, (int)currentRoundType, currentRoundIndex, array3, text, array4 }; } private void ApplyRoundEndScoreDataLocal(object[] data) { if (data == null || data.Length < 3) { return; } try { if (data.Length >= 5) { currentRoundType = (RoundGameType)Convert.ToInt32(data[3]); currentRoundIndex = Convert.ToInt32(data[4]); } } catch { } int[] array = data[1] as int[]; int[] array2 = data[2] as int[]; string[] array3 = ((data.Length >= 6) ? (data[5] as string[]) : null); if (array != null) { currentRoundScores.Clear(); for (int i = 0; i < array.Length; i++) { int key = array[i]; int value = ((array2 != null && i < array2.Length) ? array2[i] : 0); currentRoundScores[key] = value; if (array3 != null && i < array3.Length && !string.IsNullOrWhiteSpace(array3[i])) { actorNames[key] = array3[i]; } } } roundResultPanelForcedTitle = ""; roundResultPanelForcedLines = null; try { if (data.Length >= 7 && data[6] != null) { roundResultPanelForcedTitle = Convert.ToString(data[6]); } if (data.Length >= 8 && data[7] is string[] collection) { roundResultPanelForcedLines = new List(collection); } } catch { roundResultPanelForcedTitle = ""; roundResultPanelForcedLines = null; } } private void ShowAutoScoreboardAfterRoundEnd() { autoScoreboardUntil = Time.time + 5f; roundBetweenMovementLockUntil = Mathf.Max(roundBetweenMovementLockUntil, Time.time + 5.2f); } private bool IsAutomaticRoundFinishReason(string reason) { if (string.IsNullOrEmpty(reason)) { return false; } int result; switch (reason) { default: result = ((reason == "WATCHDOG_TIMEOUT") ? 1 : 0); break; case "ALL_ELIMINATED": case "LAST_SURVIVOR": case "TIME_UP": case "ROUND6_ALL_ELIMINATED": result = 1; break; } return (byte)result != 0; } private bool CanFinishCurrentRoundNow(string reason, out string blockReason) { blockReason = ""; if (gameState != GameState.Running && gameState != GameState.RoundEnding) { blockReason = "state=" + gameState; return false; } float num = Time.time - currentRoundRunningStartTime; if (IsRoundStartFinishGuardActive() && IsAutomaticRoundFinishReason(reason)) { blockReason = "start_guard elapsed=" + num.ToString("0.00"); return false; } if (IsAutomaticRoundFinishReason(reason) && reason != "WATCHDOG_TIMEOUT" && num < 5f) { blockReason = "minimum_elapsed " + num.ToString("0.00") + " < " + 5f.ToString("0.00"); return false; } switch (reason) { case "ALL_ELIMINATED": if (roundPlayers.Count <= 0) { blockReason = "roundPlayers_empty"; return false; } if (alivePlayers.Count > 0) { blockReason = "alivePlayers=" + alivePlayers.Count; return false; } break; case "LAST_SURVIVOR": if (roundPlayers.Count < 2) { blockReason = "not_multiplayer roundPlayers=" + roundPlayers.Count; return false; } if (alivePlayers.Count != 1) { blockReason = "alivePlayers=" + alivePlayers.Count; return false; } break; case "TIME_UP": { int currentRoundPoint = GetCurrentRoundPoint(); if (currentRoundPoint < roundDurationPoints.Value) { blockReason = "point=" + currentRoundPoint + "/" + roundDurationPoints.Value; return false; } break; } case "ROUND6_ALL_ELIMINATED": if (roundPlayers.Count <= 0) { blockReason = "round6_roundPlayers_empty"; return false; } break; } switch (reason) { case "TIMING_FINISH": { float num5 = Mathf.Max(1f, timingRoundTargetSeconds + Mathf.Max(0.5f, timingSubmitWindowExtraSeconds.Value)); if (!HaveAllTimingParticipantsSubmitted() && num < num5) { blockReason = "timing_not_done elapsed=" + num.ToString("0.00") + "/" + num5.ToString("0.00"); return false; } break; } case "GRID_STAR_FINISH": { float num3 = Mathf.Max(3f, arrowRoundTimeLimit.Value); if (arrowRoundSubmissions.Count < Mathf.Max(1, roundPlayers.Count) && num < num3) { blockReason = "arrow_not_done submissions=" + arrowRoundSubmissions.Count + "/" + Mathf.Max(1, roundPlayers.Count) + ", elapsed=" + num.ToString("0.00"); return false; } break; } case "RHYTHM_FINISH": { float num7 = Mathf.Max(4f, rhythmNoteTravelSeconds.Value + GetRhythmLastNoteTargetOffset() + 2f); float num8 = Mathf.Max(num7, rhythmRoundTimeLimit.Value); if (rhythmRoundSubmissions.Count < Mathf.Max(1, roundPlayers.Count) && num < num8) { blockReason = "rhythm_not_done submissions=" + rhythmRoundSubmissions.Count + "/" + Mathf.Max(1, roundPlayers.Count) + ", elapsed=" + num.ToString("0.00"); return false; } break; } case "STAR_GRID_FINISH": { int num6 = GetRound8TotalStars(); if (round8StarsEatenTotal < num6) { blockReason = "star_grid_not_done stars=" + round8StarsEatenTotal + "/" + num6; return false; } break; } case "MEMORY_MATCH_FINISH": if (!HaveAllRound9ParticipantsFinished() && num < 45f) { blockReason = "memory_not_done elapsed=" + num.ToString("0.00") + "/45.00"; return false; } break; case "HALLI_GALLI_FINISH": if (!round10Completed && round10SuccessCount < 10) { blockReason = "halli_not_done success=" + round10SuccessCount + "/10 completed=" + round10Completed; return false; } break; case "BUTTON_MASH_FINISH": { float num4 = Mathf.Max(5f, (round7TimeLimitSeconds != null) ? round7TimeLimitSeconds.Value : 20f); if (!HaveAllRound7ParticipantsFinished() && num < num4) { blockReason = "button_mash_not_done elapsed=" + num.ToString("0.00") + "/" + num4.ToString("0.00"); return false; } break; } case "DINO_RUN_FINISH": { float num2 = 3f + Mathf.Max(4f, GetRound11ObstacleTravelSeconds() + 2.6f); if (!HaveAllRound11DinoParticipantsSubmitted() && num < num2) { blockReason = "dino_not_done elapsed=" + num.ToString("0.00") + "/" + num2.ToString("0.00"); return false; } break; } } return true; } private void RequestFinishCurrentRound(string reason) { if (!CanFinishCurrentRoundNow(reason, out var blockReason)) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[RoundGuard] Finish request blocked. reason=" + reason + ", block=" + blockReason + ", type=" + currentRoundType.ToString() + ", alive=" + alivePlayers.Count + ", players=" + roundPlayers.Count)); } else if (roundFinishInProgress) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[RoundEnd] Request ignored because finish already in progress. reason=" + reason + ", type=" + currentRoundType)); } else if (finishRoundRoutineHandle != null) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[RoundEnd] Request ignored because finish coroutine already exists. reason=" + reason + ", type=" + currentRoundType)); } else { finishRoundRoutineHandle = ((MonoBehaviour)this).StartCoroutine(FinishCurrentRoundRoutine(reason)); } } [IteratorStateMachine(typeof(d__1046))] private IEnumerator FinishCurrentRoundRoutine(string reason) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1046(0) { <>4__this = this, reason = reason }; } private void ScheduleLocalRoundEndEmoteFromScores() { try { if (roundEndEmoteRoutine != null) { ((MonoBehaviour)this).StopCoroutine(roundEndEmoteRoutine); } roundEndEmoteRoutine = ((MonoBehaviour)this).StartCoroutine(PlayLocalRoundEndEmoteDelayed()); } catch { } } [IteratorStateMachine(typeof(d__1048))] private IEnumerator PlayClientRoundEndPresentationRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1048(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__1049))] private IEnumerator PlayLocalRoundEndEmoteDelayed() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1049(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__1050))] private IEnumerator PlayLocalRoundEndEmoteSequenceRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1050(0) { <>4__this = this }; } private string GetLocalRoundEndEmoteAnimationFromScores() { try { Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null) { return ""; } if (localCharacter.data.dead || localCharacter.data.passedOut || localCharacter.data.fullyPassedOut) { return ""; } int actorNumber = GetActorNumber(localCharacter); if (actorNumber <= 0 && PhotonNetwork.LocalPlayer != null) { actorNumber = PhotonNetwork.LocalPlayer.ActorNumber; } if (actorNumber <= 0) { return ""; } int num = int.MinValue; foreach (KeyValuePair currentRoundScore in currentRoundScores) { num = Mathf.Max(num, currentRoundScore.Value); } if (num == int.MinValue) { return ""; } int value = 0; currentRoundScores.TryGetValue(actorNumber, out value); bool flag = value == num; string rawName = (flag ? "Dance" : "Defeat"); string fallbackAnim = (flag ? "A_Scout_Emote_Dance" : "A Scout_Emote_Defeat"); return ResolveEmoteAnimationName(rawName, fallbackAnim); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Round end emote resolve failed: " + ex.Message)); return ""; } } private void PlayLocalRoundEndEmote(string animName) { try { if (!string.IsNullOrEmpty(animName)) { Character localCharacter = Character.localCharacter; if (!((Object)(object)localCharacter == (Object)null) && !((Object)(object)localCharacter.data == (Object)null) && !localCharacter.data.dead && !localCharacter.data.passedOut && !localCharacter.data.fullyPassedOut) { PlayEmoteOnCharacter(localCharacter, animName); } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Round end emote failed: " + ex.Message)); } } private string ResolveEmoteAnimationName(string rawName, string fallbackAnim) { try { Type type = Type.GetType("EmoteWheelData, Assembly-CSharp"); if (type == null) { return fallbackAnim; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (array == null) { return fallbackAnim; } FieldInfo field = type.GetField("emoteName", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = type.GetField("anim", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field2 == null) { return fallbackAnim; } foreach (Object val in array) { if (!(val == (Object)null)) { string a = ((field != null) ? Convert.ToString(field.GetValue(val)) : ""); string text = Convert.ToString(field2.GetValue(val)); if (!string.IsNullOrWhiteSpace(text) && (string.Equals(a, rawName, StringComparison.OrdinalIgnoreCase) || string.Equals(text, fallbackAnim, StringComparison.OrdinalIgnoreCase) || text.IndexOf(rawName, StringComparison.OrdinalIgnoreCase) >= 0)) { return text; } } } } catch { } return fallbackAnim; } private string PickAvailableEmoteAnimation(Character character, string animName) { try { if ((Object)(object)character == (Object)null || character.refs == null || (Object)(object)character.refs.animator == (Object)null) { return animName; } List list = new List(); list.Add(animName); if (animName == "A Scout_Emote_Defeat") { list.Add("A_Scout_Emote_Defeat"); } if (animName == "A_Scout_Emote_Defeat") { list.Add("A Scout_Emote_Defeat"); } for (int i = 0; i < list.Count; i++) { string text = list[i]; if (!string.IsNullOrWhiteSpace(text) && character.refs.animator.HasState(0, Animator.StringToHash(text))) { return text; } } } catch { } return animName; } private void PlayEmoteOnCharacter(Character character, string animName) { if ((Object)(object)character == (Object)null || string.IsNullOrWhiteSpace(animName)) { return; } animName = PickAvailableEmoteAnimation(character, animName); try { object refs = character.refs; if (refs != null) { FieldInfo field = refs.GetType().GetField("animations", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); object obj = ((field != null) ? field.GetValue(refs) : null); if (obj != null) { MethodInfo method = obj.GetType().GetMethod("PlayEmote", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { method.Invoke(obj, new object[1] { animName }); return; } } } } catch { } try { if (character.refs != null && (Object)(object)character.refs.animator != (Object)null) { character.refs.animator.SetBool(Animator.StringToHash("Emote"), true); character.refs.animator.Play(animName, 0, 0f); } } catch { } } private string BuildRoundResultText(string reason) { int roundNumberForNotice = GetRoundNumberForNotice(); int localCurrentRoundScoreForNotice = GetLocalCurrentRoundScoreForNotice(); return roundNumberForNotice + "라운드 종료\n+" + localCurrentRoundScoreForNotice + "P"; } private int GetRoundNumberForType(RoundGameType roundType) { return roundType switch { RoundGameType.CloudDynamite => 1, RoundGameType.ShelfHook => 2, RoundGameType.BounceFrisbee => 3, RoundGameType.DoubleCloudCoconut => 4, RoundGameType.RhythmGame => 5, RoundGameType.ColorCloudSurvival => 6, RoundGameType.ButtonMashRace => 7, RoundGameType.StarGrid => 8, RoundGameType.MemoryMatch => 9, RoundGameType.HalliGalli => 10, RoundGameType.DinoRun => 11, _ => 1, }; } private int GetRoundNumberForNotice() { if (currentRoundType == RoundGameType.CloudDynamite) { return 1; } if (currentRoundType == RoundGameType.ShelfHook) { return 2; } if (currentRoundType == RoundGameType.BounceFrisbee) { return 3; } if (currentRoundType == RoundGameType.DoubleCloudCoconut) { return 4; } if (currentRoundType == RoundGameType.RhythmGame) { return 5; } if (currentRoundType == RoundGameType.ColorCloudSurvival) { return 6; } if (currentRoundType == RoundGameType.ButtonMashRace) { return 7; } if (currentRoundType == RoundGameType.StarGrid) { return 8; } if (currentRoundType == RoundGameType.MemoryMatch) { return 9; } if (currentRoundType == RoundGameType.HalliGalli) { return 10; } if (currentRoundType == RoundGameType.DinoRun) { return 11; } return Mathf.Clamp(currentRoundIndex, 1, 11); } private int GetLocalCurrentRoundScoreForNotice() { try { int key = -999; if ((Object)(object)Character.localCharacter != (Object)null) { key = GetActorNumber(Character.localCharacter); } else if (PhotonNetwork.LocalPlayer != null) { key = PhotonNetwork.LocalPlayer.ActorNumber; } if (currentRoundScores.TryGetValue(key, out var value)) { return Mathf.Clamp(value, 0, Mathf.Max(1, maxRoundScore.Value)); } } catch { } return 0; } private void AddCurrentRoundScoresToTotal() { RefreshActorNamesFromCharacters(); foreach (KeyValuePair currentRoundScore in currentRoundScores) { if (!totalScores.ContainsKey(currentRoundScore.Key)) { totalScores[currentRoundScore.Key] = 0; } totalScores[currentRoundScore.Key] += Mathf.Clamp(currentRoundScore.Value, 0, maxRoundScore.Value); } } private void TriggerFinalWinnersByScore() { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) if (finalEndingTriggered) { return; } finalEndingTriggered = true; RefreshActorNamesFromCharacters(); int num = int.MinValue; foreach (int value in totalScores.Values) { if (value > num) { num = value; } } List list = new List(); foreach (KeyValuePair totalScore in totalScores) { if (totalScore.Value == num) { list.Add(totalScore.Key); } } if (list.Count == 0 && (Object)(object)Character.localCharacter != (Object)null) { list.Add(GetActorNumber(Character.localCharacter)); } SyncScoresToAll(); int[] array = list.ToArray(); try { if (PhotonNetwork.InRoom) { RaiseEventOptions val = new RaiseEventOptions { Receivers = (ReceiverGroup)1 }; PhotonNetwork.RaiseEvent((byte)100, (object)array, val, SendOptions.SendReliable); } else { ApplyFinalWinnersLocal(array); } } catch { ApplyFinalWinnersLocal(array); } } private void ApplyFinalWinnersLocal(int[] winnerActors) { if (winnerActors == null || winnerActors.Length == 0) { return; } HashSet hashSet = new HashSet(winnerActors); bool flag = false; try { foreach (Character allCharacter in Character.AllCharacters) { if (!((Object)(object)allCharacter == (Object)null) && allCharacter.refs != null && !((Object)(object)allCharacter.refs.stats == (Object)null)) { int actorNumber = GetActorNumber(allCharacter); if (hashSet.Contains(actorNumber)) { allCharacter.refs.stats.Win(); flag = true; } else { allCharacter.refs.stats.Lose(true); } } } } catch { } try { MenuWindow.CloseAllWindows(); } catch { } if (flag) { try { GlobalEvents.TriggerSomeoneWonRun(); } catch { } try { Singleton.Instance.EndCutscene(); } catch { } } else { try { if ((Object)(object)GUIManager.instance != (Object)null && (Object)(object)GUIManager.instance.endScreen != (Object)null) { ((MenuWindow)GUIManager.instance.endScreen).Show(); } } catch { } } try { GlobalEvents.TriggerRunEnded(); } catch { } } [IteratorStateMachine(typeof(d__1063))] private IEnumerator SpawnArenaForRoundRoutine(RoundGameType roundType) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1063(0) { <>4__this = this, roundType = roundType }; } [IteratorStateMachine(typeof(d__1064))] private IEnumerator SpawnArenaLayerRoutine(RoundGameType roundType, float y, int layerIndex) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1064(0) { <>4__this = this, roundType = roundType, y = y, layerIndex = layerIndex }; } private float GetRoundSpacing(RoundGameType roundType) { if (roundType == RoundGameType.CloudDynamite || roundType == RoundGameType.DoubleCloudCoconut || roundType == RoundGameType.RhythmGame || roundType == RoundGameType.ColorCloudSurvival) { return cloudRoundSpacing.Value; } if (roundType == RoundGameType.ShelfHook || roundType == RoundGameType.ButtonMashRace || roundType == RoundGameType.StarGrid || roundType == RoundGameType.MemoryMatch || roundType == RoundGameType.HalliGalli || roundType == RoundGameType.DinoRun) { return shelfRoundSpacing.Value; } return bounceRoundSpacing.Value; } private string ResolveInstalledPrefabPath(RoundGameType roundType) { RoundGameType roundGameType = roundType; if (roundType == RoundGameType.DoubleCloudCoconut || roundType == RoundGameType.ColorCloudSurvival) { roundGameType = RoundGameType.CloudDynamite; } if (roundType == RoundGameType.BounceFrisbee || roundType == RoundGameType.RhythmGame || roundType == RoundGameType.ButtonMashRace || roundType == RoundGameType.StarGrid || roundType == RoundGameType.MemoryMatch || roundType == RoundGameType.HalliGalli || roundType == RoundGameType.DinoRun) { roundGameType = RoundGameType.ShelfHook; } string text = ""; text = roundGameType switch { RoundGameType.CloudDynamite => cloudInstalledPrefabPath.Value, RoundGameType.ShelfHook => shelfInstalledPrefabPath.Value, _ => bounceInstalledPrefabPath.Value, }; if (directPrefabMode.Value == DirectPrefabMode.ManualPath && !string.IsNullOrWhiteSpace(text)) { return text; } switch (roundGameType) { case RoundGameType.CloudDynamite: if (!string.IsNullOrWhiteSpace(cachedCloudInstalledPath)) { return cachedCloudInstalledPath; } cachedCloudInstalledPath = AutoResolveInstalledPrefabPath(roundGameType); return cachedCloudInstalledPath; case RoundGameType.ShelfHook: if (!string.IsNullOrWhiteSpace(cachedShelfInstalledPath)) { return cachedShelfInstalledPath; } cachedShelfInstalledPath = AutoResolveInstalledPrefabPath(roundGameType); if (string.IsNullOrWhiteSpace(cachedShelfInstalledPath)) { ((BaseUnityPlugin)this).Logger.LogError((object)"선반균류 설치 완료 프리팹 자동 탐색 실패. Shelf Item Prefab Path 또는 Shelf Installed Prefab Path를 확인하세요."); } return cachedShelfInstalledPath; default: if (!string.IsNullOrWhiteSpace(cachedBounceInstalledPath)) { return cachedBounceInstalledPath; } cachedBounceInstalledPath = AutoResolveInstalledPrefabPath(roundGameType); return cachedBounceInstalledPath; } } private string GetItemPrefabPathForRound(RoundGameType roundType) { if (roundType == RoundGameType.CloudDynamite || roundType == RoundGameType.DoubleCloudCoconut || roundType == RoundGameType.RhythmGame || roundType == RoundGameType.ColorCloudSurvival) { return cloudItemPrefabPath.Value; } if (roundType == RoundGameType.ShelfHook || roundType == RoundGameType.ButtonMashRace || roundType == RoundGameType.StarGrid || roundType == RoundGameType.MemoryMatch || roundType == RoundGameType.HalliGalli || roundType == RoundGameType.DinoRun) { return shelfItemPrefabPath.Value; } return bounceItemPrefabPath.Value; } private string AutoResolveInstalledPrefabPath(RoundGameType roundType) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) string itemPrefabPathForRound = GetItemPrefabPathForRound(roundType); if (string.IsNullOrWhiteSpace(itemPrefabPathForRound)) { return ""; } GameObject val = null; try { val = PhotonNetwork.Instantiate(itemPrefabPathForRound, new Vector3(9999f, resolverSpawnY.Value, 9999f), Quaternion.identity, (byte)0, (object[])null); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)$"아이템 프리팹 자동 탐색용 소환 실패. Type: {roundType}, ItemPath: {itemPrefabPathForRound}"); ((BaseUnityPlugin)this).Logger.LogError((object)ex); return ""; } if ((Object)(object)val == (Object)null) { return ""; } string text = ""; try { switch (roundType) { case RoundGameType.CloudDynamite: { CloudFungus val3 = val.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = val.GetComponentInChildren(true); } if ((Object)(object)val3 != (Object)null && (Object)(object)val3.instantiateOnBreak != (Object)null) { text = "0_Items/" + ((Object)val3.instantiateOnBreak).name; } break; } default: if (roundType != RoundGameType.DinoRun) { text = ResolveBounceInstalledPath(val); break; } goto case RoundGameType.ShelfHook; case RoundGameType.ShelfHook: case RoundGameType.ButtonMashRace: case RoundGameType.StarGrid: case RoundGameType.MemoryMatch: case RoundGameType.HalliGalli: { ShelfShroom val2 = val.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = val.GetComponentInChildren(true); } if ((Object)(object)val2 != (Object)null && (Object)(object)val2.instantiateOnBreak != (Object)null) { text = "0_Items/" + ((Object)val2.instantiateOnBreak).name; } break; } } } catch (Exception ex2) { ((BaseUnityPlugin)this).Logger.LogError((object)$"설치 완료 프리팹 자동 탐색 중 오류. Type: {roundType}, ItemPath: {itemPrefabPathForRound}"); ((BaseUnityPlugin)this).Logger.LogError((object)ex2); text = ""; } DestroyResolverItem(val); if (logResolvedPrefabNames.Value) { ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Resolved installed prefab. Type: {roundType}, ItemPath: {itemPrefabPathForRound}, InstalledPath: {text}"); } return text; } private string ResolveBounceInstalledPath(GameObject itemObj) { Breakable val = itemObj.GetComponent(); if ((Object)(object)val == (Object)null) { val = itemObj.GetComponentInChildren(true); } if ((Object)(object)val != (Object)null) { if (val.instantiateOnBreak != null && val.instantiateOnBreak.Count > 0 && (Object)(object)val.instantiateOnBreak[0] != (Object)null) { return "0_Items/" + ((Object)val.instantiateOnBreak[0]).name; } if (val.alternateInstantiateOnBreak != null && val.alternateInstantiateOnBreak.Count > 0 && (Object)(object)val.alternateInstantiateOnBreak[0] != (Object)null) { return "0_Items/" + ((Object)val.alternateInstantiateOnBreak[0]).name; } } CloudFungus val2 = itemObj.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = itemObj.GetComponentInChildren(true); } if ((Object)(object)val2 != (Object)null && (Object)(object)val2.instantiateOnBreak != (Object)null) { return "0_Items/" + ((Object)val2.instantiateOnBreak).name; } ShelfShroom val3 = itemObj.GetComponent(); if ((Object)(object)val3 == (Object)null) { val3 = itemObj.GetComponentInChildren(true); } if ((Object)(object)val3 != (Object)null && (Object)(object)val3.instantiateOnBreak != (Object)null) { return "0_Items/" + ((Object)val3.instantiateOnBreak).name; } return ""; } private void DestroyResolverItem(GameObject itemObj) { if ((Object)(object)itemObj == (Object)null) { return; } try { PhotonView component = itemObj.GetComponent(); if ((Object)(object)component != (Object)null && PhotonNetwork.InRoom) { PhotonNetwork.Destroy(itemObj); } else { Object.Destroy((Object)(object)itemObj); } } catch { try { Object.Destroy((Object)(object)itemObj); } catch { } } } private GameObject SpawnInstalledFungus(string prefabPath, Vector3 pos, Quaternion rot, RoundGameType roundType) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrWhiteSpace(prefabPath)) { return null; } try { GameObject val = PhotonNetwork.Instantiate(prefabPath, pos, rot, (byte)0, (object[])null); if ((Object)(object)val == (Object)null) { return null; } ((Object)val).name = "100sec_ArenaTile"; DisableItemPickupIfExists(val); if (IsCloudFungusRound(roundType)) { if (freezeSpawnedObjects.Value) { FreezeObject(val); } DisableFungusSpawnEffectsAndIdleMotion(val); AttachFungusFrameLock(val); ((MonoBehaviour)this).StartCoroutine(RemoveEffectObjectsRoutine(val)); } else if (roundType == RoundGameType.ShelfHook || roundType == RoundGameType.ButtonMashRace || roundType == RoundGameType.StarGrid || roundType == RoundGameType.MemoryMatch || roundType == RoundGameType.HalliGalli || roundType == RoundGameType.DinoRun) { if (freezeSpawnedObjects.Value) { FreezeObject(val); } ForceShelfInstalledFinalFrame(val); ((MonoBehaviour)this).StartCoroutine(ForceShelfInstalledFinalFrameDelayed(val)); } else if (freezeSpawnedObjects.Value) { FreezeObject(val); } return val; } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)$"설치 완료 균류 소환 실패. Path: {prefabPath}, Type: {roundType}"); ((BaseUnityPlugin)this).Logger.LogError((object)ex); return null; } } private bool IsCloudFungusRound(RoundGameType roundType) { return roundType == RoundGameType.CloudDynamite || roundType == RoundGameType.DoubleCloudCoconut || roundType == RoundGameType.ColorCloudSurvival; } [IteratorStateMachine(typeof(d__1073))] private IEnumerator ForceShelfInstalledFinalFrameDelayed(GameObject obj) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1073(0) { <>4__this = this, obj = obj }; } private void ForceShelfInstalledFinalFrame(GameObject obj) { //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Expected O, but got Unknown if ((Object)(object)obj == (Object)null) { return; } try { Animator[] componentsInChildren = obj.GetComponentsInChildren(true); Animator[] array = componentsInChildren; foreach (Animator val in array) { if ((Object)(object)val == (Object)null) { continue; } try { ((Behaviour)val).enabled = true; } catch { } try { val.cullingMode = (AnimatorCullingMode)0; } catch { } try { RuntimeAnimatorController runtimeAnimatorController = val.runtimeAnimatorController; if ((Object)(object)runtimeAnimatorController != (Object)null && runtimeAnimatorController.animationClips != null && runtimeAnimatorController.animationClips.Length != 0) { string name = ((Object)runtimeAnimatorController.animationClips[0]).name; if (!string.IsNullOrEmpty(name)) { val.Play(name, 0, 1f); val.Update(0f); } } else { AnimatorStateInfo currentAnimatorStateInfo = val.GetCurrentAnimatorStateInfo(0); val.Play(((AnimatorStateInfo)(ref currentAnimatorStateInfo)).fullPathHash, 0, 1f); val.Update(0f); } } catch { } try { val.speed = 0f; } catch { } try { ((Behaviour)val).enabled = false; } catch { } } } catch { } try { Animation[] componentsInChildren2 = obj.GetComponentsInChildren(true); Animation[] array2 = componentsInChildren2; foreach (Animation val2 in array2) { if ((Object)(object)val2 == (Object)null) { continue; } try { ((Behaviour)val2).enabled = true; foreach (AnimationState item in val2) { AnimationState val3 = item; if (!((TrackedReference)(object)val3 == (TrackedReference)null)) { val3.enabled = true; val3.normalizedTime = 1f; val3.speed = 0f; val2.Sample(); val3.enabled = false; } } val2.Stop(); ((Behaviour)val2).enabled = false; } catch { } } } catch { } } private Quaternion GetSpawnRotation() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (!randomRotation.Value) { return Quaternion.identity; } return Quaternion.Euler(0f, Random.Range(0f, 360f), 0f); } private int GetRound8TotalStars() { try { if (round8TotalStars != null) { return Mathf.Clamp(round8TotalStars.Value, 1, 50); } } catch { } return 10; } private void LogRound11Debug(string message) { try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[R11] " + message)); } catch { } } private void LogRound11DebugThrottled(string message) { if (!(Time.time < round11DebugNextLogTime)) { round11DebugNextLogTime = Time.time + 1f; LogRound11Debug(message); } } private void LogRound11GuiThrottled(string message) { if (!(Time.time < round11DebugNextGuiLogTime)) { round11DebugNextGuiLogTime = Time.time + 1f; LogRound11Debug("[GUI] " + message); } } private string GetRound11StateString() { string text = "null"; try { if ((Object)(object)Character.localCharacter != (Object)null) { text = ((Object)Character.localCharacter).name; try { text = text + "/airport=" + Character.localCharacter.inAirport; } catch { } } } catch { } return "state=" + gameState.ToString() + ", type=" + currentRoundType.ToString() + ", active=" + round11DinoActive + ", submitted=" + round11DinoSubmitted + ", failed=" + round11DinoFailed + ", passed=" + round11DinoPassedCount + ", next=" + round11DinoNextPassIndex + ", nonce=" + round11DinoNonce + ", elapsed=" + (round11DinoActive ? Mathf.Max(0f, Time.unscaledTime - round11DinoStartTime).ToString("0.00") : "0.00") + ", local=" + text + ", obstacles=" + ((round11DinoObstacleTimes != null) ? round11DinoObstacleTimes.Length.ToString() : "null"); } private float GetRound11ObstacleTravelSeconds() { if (round11ObstacleTravelSeconds == null) { return 2.65f; } return Mathf.Clamp(round11ObstacleTravelSeconds.Value, 1.2f, 6f); } private float GetRound11ObstacleTravelSecondsForIndex(int obstacleIndex) { float num = GetRound11ObstacleTravelSeconds(); float num2 = 0f; bool flag = true; num2 = Mathf.Clamp01((float)Mathf.Clamp(obstacleIndex, 0, 39) / 39f); float num3 = Mathf.Lerp(1f, 0.62f, num2); return Mathf.Clamp(num * num3, 1.15f, 6f); } private void DrawRound11DinoRunUI() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Invalid comparison between Unknown and I4 //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Invalid comparison between Unknown and I4 //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Expected O, but got Unknown //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Expected O, but got Unknown //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_059c: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_0799: Unknown result type (might be due to invalid IL or missing references) //IL_079e: Unknown result type (might be due to invalid IL or missing references) //IL_07e0: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_08cf: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Unknown result type (might be due to invalid IL or missing references) //IL_08e1: Unknown result type (might be due to invalid IL or missing references) if (!round11DinoActive) { return; } if (Event.current != null && (int)Event.current.type == 4 && (int)Event.current.keyCode == 32) { ForceRound11DinoJumpVisual("OnGUI.KeyDown"); Event.current.Use(); } if (currentRoundType != RoundGameType.DinoRun) { currentRoundType = RoundGameType.DinoRun; } LogRound11GuiThrottled("DrawRound11DinoRunUI " + GetRound11StateString()); EnsureMiniGameStyles(); if (round11TitleStyle == null) { round11TitleStyle = new GUIStyle(GUI.skin.label); round11TitleStyle.alignment = (TextAnchor)4; round11TitleStyle.fontSize = 38; round11TitleStyle.fontStyle = (FontStyle)1; round11TitleStyle.normal.textColor = Color.white; } if (round11DinoStyle == null) { round11DinoStyle = new GUIStyle(GUI.skin.label); round11DinoStyle.alignment = (TextAnchor)4; round11DinoStyle.fontSize = 48; round11DinoStyle.fontStyle = (FontStyle)1; round11DinoStyle.normal.textColor = Color.white; } if (round11SmallStyle == null) { round11SmallStyle = new GUIStyle(GUI.skin.label); round11SmallStyle.alignment = (TextAnchor)4; round11SmallStyle.fontSize = 24; round11SmallStyle.fontStyle = (FontStyle)1; round11SmallStyle.normal.textColor = Color.white; } float num = Mathf.Min(980f, (float)Screen.width * 0.86f); float num2 = Mathf.Min(360f, (float)Screen.height * 0.46f); float num3 = ((float)Screen.width - num) * 0.5f; float num4 = ((float)Screen.height - num2) * 0.5f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num3, num4, num, num2); Color color = GUI.color; GUI.color = new Color(0f, 0f, 0f, 0.66f); GUI.DrawTexture(val, (Texture)(object)Texture2D.whiteTexture); GUI.color = new Color(1f, 1f, 1f, 0.2f); GUI.DrawTexture(new Rect(num3, num4, num, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3, num4 + num2 - 3f, num, 3f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3, num4, 3f, num2), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num3 + num - 3f, num4, 3f, num2), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; DrawOutlinedLabel(new Rect(num3, num4 + 18f, num, 46f), "애니멀 점프", round11TitleStyle, Color.white, Color.black, 2f); float num5 = (round11DinoFailFreezeActive ? round11DinoFailFreezeRawElapsed : (round11DinoClearFreezeActive ? round11DinoClearFreezeRawElapsed : Mathf.Max(0f, Time.unscaledTime - round11DinoStartTime))); bool flag = !round11DinoSubmitted && num5 < 3f; if (flag) { int num6 = Mathf.CeilToInt(3f - num5); DrawOutlinedLabel(new Rect(num3 + 20f, num4 + 78f, num - 40f, 48f), "준비 " + num6, round11TitleStyle, new Color(1f, 0.82f, 0.22f, 1f), Color.black, 2f); } float num7 = num4 + num2 - 118f; GUI.color = new Color(1f, 1f, 1f, 0.75f); GUI.DrawTexture(new Rect(num3 + 46f, num7 + 16f, num - 92f, 4f), (Texture)(object)Texture2D.whiteTexture); GUI.color = color; float dinoX = num3 + num * 0.82f; float jumpY = Mathf.Clamp(round11DinoFailFreezeActive ? round11DinoFailFreezeJumpY : (round11DinoClearFreezeActive ? round11DinoClearFreezeJumpY : GetRound11DinoJumpY()), 0f, 92f); DrawRound11JumpManEmoji(dinoX, num7, jumpY); float num8 = Mathf.Max(0f, num5 - 3f); if (!flag) { for (int i = 0; i < round11DinoObstacleTimes.Length; i++) { float round11ObstacleTravelSecondsForIndex = GetRound11ObstacleTravelSecondsForIndex(i); float num9 = num8 - round11DinoObstacleTimes[i]; if (!(num9 < -0.05f) && !(num9 > round11ObstacleTravelSecondsForIndex + 0.05f)) { float num10 = Mathf.Clamp01(num9 / round11ObstacleTravelSecondsForIndex); float num11 = Mathf.Lerp(num3 + 36f, num3 + num - 76f, num10); int round11ObstacleType = GetRound11ObstacleType(i); if (round11ObstacleType == 1) { DrawOutlinedLabel(new Rect(num11 - 31f, num7 - 146f, 86f, 76f), "\ud83d\udef8", round11DinoStyle, Color.white, Color.black, 1.5f); } else { DrawOutlinedLabel(new Rect(num11 - 11f, num7 - 54f, 76f, 76f), "\ud83c\udf35", round11DinoStyle, Color.white, Color.black, 1.5f); } } } } if (Time.unscaledTime < round11DinoPenaltyNoticeUntil) { float num12 = Mathf.Max(0.01f, round11DinoPenaltyNoticeUntil - round11DinoPenaltyNoticeStartTime); float num13 = Mathf.Clamp01((Time.unscaledTime - round11DinoPenaltyNoticeStartTime) / num12); Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 0.12f, 0.08f, 1f - Mathf.Clamp01((num13 - 0.65f) / 0.35f)); Rect rect = default(Rect); ((Rect)(ref rect))..ctor(num3 + 20f, num4 + num2 * 0.42f - 54f - num13 * 22f, num - 40f, 96f); DrawOutlinedLabel(rect, "-3P", round11TitleStyle, val2, new Color(0f, 0f, 0f, 0.95f * val2.a), 3.2f); } string text = ((!round11DinoSubmitted) ? ((num5 < 3f) ? ("장애물 시작 " + Mathf.CeilToInt(3f - num5)) : "Space 점프") : (round11DinoFailed ? "-3P" : "Clear")); bool flag2 = round11DinoFailFreezeActive || (round11DinoSubmitted && round11DinoFailed); bool flag3 = round11DinoClearFreezeActive || (round11DinoSubmitted && !round11DinoFailed && round11DinoPassedCount >= 40); if (flag2) { DrawOutlinedLabel(new Rect(num3 + 20f, num4 + num2 * 0.42f - 42f, num - 40f, 84f), "-3P", round11TitleStyle, new Color(1f, 0.12f, 0.08f, 1f), Color.black, 3f); return; } if (flag3) { DrawOutlinedLabel(new Rect(num3 + 20f, num4 + num2 * 0.42f - 42f, num - 40f, 84f), "Game Clear", round11TitleStyle, new Color(0.15f, 1f, 0.24f, 1f), Color.black, 3f); return; } int round11DinoLocalScorePreview = GetRound11DinoLocalScorePreview(); string text2 = ((round11DinoPenaltyPoints > 0) ? (" / 페널티 -" + round11DinoPenaltyPoints + "P") : ""); string text3 = text + " / 장애물 " + round11DinoPassedCount + " / " + 40 + text2 + " / 점수 +" + round11DinoLocalScorePreview + "P"; DrawOutlinedLabel(new Rect(num3 + 20f, num4 + num2 - 48f, num - 40f, 36f), text3, round11SmallStyle, Color.white, Color.black, 1.5f); } private bool IsRound11DinoGroundedVisual() { if (round11DinoJumpStartTime < -100f) { return true; } return Time.unscaledTime - round11DinoJumpStartTime >= 0.62f; } private float GetRound11DinoJumpY() { if (round11DinoJumpStartTime < -100f) { return 0f; } float num = Time.unscaledTime - round11DinoJumpStartTime; if (num <= 0f) { return 0f; } if (num >= 0.62f) { round11DinoJumpStartTime = -999f; return 0f; } float num2 = Mathf.Clamp01(num / 0.62f); return 328f * num2 * (1f - num2); } private void DrawRound11JumpManEmoji(float dinoX, float groundY, float jumpY) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) float num = groundY - jumpY; Rect rect = default(Rect); ((Rect)(ref rect))..ctor(dinoX - 42f, num - 72f, 116f, 104f); DrawOutlinedLabel(rect, "\ud83d\udc11", round11DinoStyle, Color.white, Color.black, 1.5f); } [IteratorStateMachine(typeof(d__1089))] private IEnumerator RunRound11DinoRunRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1089(0) { <>4__this = this, testMode = testMode }; } private void BuildRound11DinoObstaclePattern(out float[] times, out int[] types) { List list = new List(); List list2 = new List(); float num = 0f; bool flag = false; float num2 = 0f; for (int i = 0; i < 40; i++) { if (i == 0) { num = 0f; } else { int num3 = Random.Range(0, 100); float num4 = ((num3 < 18) ? Random.Range(0.72f, 0.9f) : ((num3 >= 82) ? Random.Range(1.32f, 1.72f) : Random.Range(0.96f, 1.26f))); if (i > 3 && Random.value < 0.1f) { num4 += Random.Range(0.12f, 0.36f); } if (num2 > 0f) { num4 += num2; num2 = 0f; } num += num4; } list.Add(Mathf.Round(num * 100f) / 100f); list2.Add(0); if (i >= 20) { if (!flag && i < 39 && Random.value < 0.28f) { float num5 = num + Random.Range(0.56f, 0.78f); list.Add(Mathf.Round(num5 * 100f) / 100f); list2.Add(1); num2 = Random.Range(0.42f, 0.66f); flag = true; } else { flag = false; } } else { flag = false; } } times = list.ToArray(); types = list2.ToArray(); } private int GetRound11ObstacleType(int index) { if (round11DinoObstacleTypes == null || index < 0 || index >= round11DinoObstacleTypes.Length) { return 0; } return round11DinoObstacleTypes[index]; } private void ApplyRound11DinoStartEventLocal(object[] data) { LogRound11Debug("ApplyRound11DinoStartEventLocal dataLen=" + ((data != null) ? data.Length.ToString() : "null")); float[] times = null; int[] types = null; int num = 0; if (data != null && data.Length >= 1) { int num2 = 0; int num3 = 1; if (!(data[0] is float[]) && !(data[0] is object[])) { try { num = Convert.ToInt32(data[0]); num2 = 1; num3 = 2; } catch { num = 0; } } if (data.Length > num2) { times = data[num2] as float[]; if (times == null && data[num2] is object[] array) { times = new float[array.Length]; for (int i = 0; i < array.Length; i++) { times[i] = Convert.ToSingle(array[i]); } } } if (data.Length > num3) { types = data[num3] as int[]; if (types == null && data[num3] is object[] array2) { types = new int[array2.Length]; for (int j = 0; j < array2.Length; j++) { types[j] = Convert.ToInt32(array2[j]); } } } } if (times == null || times.Length == 0) { BuildRound11DinoObstaclePattern(out times, out types); } if (types == null || types.Length != times.Length) { types = new int[times.Length]; } if (num <= 0) { num = Random.Range(100000, 999999); } currentRoundType = RoundGameType.DinoRun; gameState = GameState.Running; BeginRound11DinoLocal(times, types, num); } private void BeginRound11DinoLocal(float[] obstacleTimes, int[] obstacleTypes, int nonce) { LogRound11Debug("BeginRound11DinoLocal called. incoming obstacles=" + ((obstacleTimes != null) ? obstacleTimes.Length.ToString() : "null") + ", nonce=" + nonce); round11DinoNonce = nonce; if (obstacleTimes == null || obstacleTimes.Length == 0) { BuildRound11DinoObstaclePattern(out obstacleTimes, out var types); obstacleTypes = types; } round11DinoObstacleTimes = ((obstacleTimes != null) ? ((float[])obstacleTimes.Clone()) : new float[0]); round11DinoObstacleTypes = ((obstacleTypes != null) ? ((int[])obstacleTypes.Clone()) : new int[round11DinoObstacleTimes.Length]); if (round11DinoObstacleTypes.Length != round11DinoObstacleTimes.Length) { round11DinoObstacleTypes = new int[round11DinoObstacleTimes.Length]; } round11DinoActive = true; round11DinoManualResetInProgress = false; round11DinoExternalResetGuard = true; round11DinoExternalResetGuardUntil = Time.unscaledTime + 3f + 2f; round11DinoSubmitted = false; round11DinoFailed = false; round11DinoFailFreezeActive = false; round11DinoFailFreezeEndTime = -999f; round11DinoFailFreezeRawElapsed = 0f; round11DinoFailFreezeJumpY = 0f; round11DinoClearFreezeActive = false; round11DinoClearFreezeEndTime = -999f; round11DinoClearFreezeRawElapsed = 0f; round11DinoClearFreezeJumpY = 0f; round11DinoGlobalEndAllowedTime = -999f; round11DinoPassedCount = 0; round11DinoPenaltyPoints = 0; round11DinoScoreByActor.Clear(); round11DinoPenaltyNoticeUntil = -999f; round11DinoPenaltyNoticeStartTime = -999f; round11DinoFinalSubmittedActors.Clear(); round11DinoNextPassIndex = 0; round11DinoJumpStartTime = -999f; round11DinoLastSpaceHeldJumpTime = -999f; round11DinoSpaceWasDown = false; round11DinoStartTime = Time.unscaledTime; string text = ((round11DinoObstacleTimes.Length != 0) ? (" firstObstacleTime=" + round11DinoObstacleTimes[0].ToString("0.00") + ", firstType=" + GetRound11ObstacleType(0)) : " noObstacles"); LogRound11Debug("BeginRound11DinoLocal DONE. " + GetRound11StateString() + text); } private void ForceEndRound11DinoLocal(string reason) { try { if (round11DinoActive || round11DinoObstacleTimes.Length != 0 || round11DinoNonce != 0) { LogRound11Debug("ForceEndRound11DinoLocal reason=" + reason + " BEFORE " + GetRound11StateString()); } round11DinoAllowLocalEnd = true; round11DinoManualResetInProgress = true; EndRound11DinoLocal(); if (currentRoundType == RoundGameType.DinoRun) { currentRoundType = RoundGameType.CloudDynamite; } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("ForceEndRound11DinoLocal failed: " + ex.Message)); } } private void EndRound11DinoLocal() { if (round11DinoActive || round11DinoObstacleTimes.Length != 0 || round11DinoNonce != 0) { LogRound11Debug("EndRound11DinoLocal called. BEFORE " + GetRound11StateString()); } if (round11DinoActive && currentRoundType == RoundGameType.DinoRun && gameState == GameState.Running && !round11DinoAllowLocalEnd) { LogRound11Debug("Ignored unsafe EndRound11DinoLocal while Round 11 is running. " + GetRound11StateString()); return; } round11DinoActive = false; round11DinoExternalResetGuard = false; round11DinoExternalResetGuardUntil = -999f; round11DinoAllowLocalEnd = false; round11DinoManualResetInProgress = false; round11DinoSubmitted = false; round11DinoFailed = false; round11DinoFailFreezeActive = false; round11DinoFailFreezeEndTime = -999f; round11DinoFailFreezeRawElapsed = 0f; round11DinoFailFreezeJumpY = 0f; round11DinoClearFreezeActive = false; round11DinoClearFreezeEndTime = -999f; round11DinoClearFreezeRawElapsed = 0f; round11DinoClearFreezeJumpY = 0f; round11DinoGlobalEndAllowedTime = -999f; round11DinoPassedCount = 0; round11DinoPenaltyPoints = 0; round11DinoScoreByActor.Clear(); round11DinoPenaltyNoticeUntil = -999f; round11DinoPenaltyNoticeStartTime = -999f; round11DinoFinalSubmittedActors.Clear(); round11DinoNextPassIndex = 0; round11DinoJumpStartTime = -999f; round11DinoLastSpaceHeldJumpTime = -999f; round11DinoSpaceWasDown = false; round11DinoObstacleTimes = new float[0]; round11DinoObstacleTypes = new int[0]; round11DinoNonce = 0; if (currentRoundType == RoundGameType.DinoRun && gameState != GameState.Running) { currentRoundType = RoundGameType.CloudDynamite; } } private bool IsRound11DinoProtectedRunning() { return round11DinoActive && currentRoundType == RoundGameType.DinoRun && !round11DinoAllowLocalEnd && !round11DinoManualResetInProgress; } private void MaintainRound11DinoHardKeepAlive() { if (!round11DinoActive) { return; } if (roundVoteActive || (round11DinoSubmitted && currentRoundType != RoundGameType.DinoRun)) { ForceEndRound11DinoLocal("HardKeepStaleRound11"); return; } if (round11DinoSubmitted) { float num = Mathf.Max(round11DinoFailFreezeEndTime, round11DinoClearFreezeEndTime); if (num > 0f && Time.unscaledTime > num + 1.5f) { ForceEndRound11DinoLocal("HardKeepSubmittedTimeout"); return; } } if (round11DinoExternalResetGuard && Time.unscaledTime >= round11DinoExternalResetGuardUntil) { round11DinoExternalResetGuard = false; } if (currentRoundType != RoundGameType.DinoRun) { LogRound11Debug("HardKeep corrected currentRoundType from " + currentRoundType.ToString() + " to DinoRun"); currentRoundType = RoundGameType.DinoRun; } if (gameState != GameState.Running && gameState != GameState.RoundEnding) { LogRound11Debug("HardKeep corrected gameState from " + gameState.ToString() + " to Running"); gameState = GameState.Running; } LogRound11DebugThrottled("Tick " + GetRound11StateString()); } private void EnsureRound11DinoAudio() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if ((Object)(object)round11DinoAudioSource == (Object)null) { GameObject val = new GameObject("100sec_Round11JumpBoingAudio"); Object.DontDestroyOnLoad((Object)(object)val); round11DinoAudioSource = val.AddComponent(); round11DinoAudioSource.playOnAwake = false; round11DinoAudioSource.spatialBlend = 0f; round11DinoAudioSource.volume = 0.78f; } if ((Object)(object)round11DinoBoingClip == (Object)null) { round11DinoBoingClip = CreateRound11BoingClip("Round11_Jump_Boing", 44100); } } private void PlayRound11DinoBoingSound() { try { EnsureRound11DinoAudio(); if ((Object)(object)round11DinoAudioSource != (Object)null && (Object)(object)round11DinoBoingClip != (Object)null) { round11DinoAudioSource.volume = 0.78f; round11DinoAudioSource.PlayOneShot(round11DinoBoingClip); } } catch { } } private AudioClip CreateRound11BoingClip(string name, int sampleRate) { float num = 0.24f; int num2 = Mathf.Max(1, Mathf.RoundToInt((float)sampleRate * num)); float[] array = new float[num2]; for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)sampleRate; float num4 = Mathf.Clamp01(num3 / num); float num5 = Mathf.Lerp(360f, 920f, Mathf.Sin(num4 * (float)Math.PI * 0.82f)); float num6 = Mathf.Sin(num4 * (float)Math.PI) * Mathf.Exp(-2.2f * num4); float num7 = Mathf.Sin((float)Math.PI * 2f * num5 * num3); float num8 = Mathf.Sin((float)Math.PI * 2f * (num5 * 1.98f) * num3) * 0.22f; array[i] = (num7 + num8) * num6 * 0.46f; } AudioClip val = AudioClip.Create(name, num2, 1, sampleRate, false); val.SetData(array, 0); return val; } private void ForceRound11DinoJumpVisual(string source) { if (round11DinoActive && !round11DinoSubmitted && !round11DinoFailFreezeActive && !round11DinoClearFreezeActive) { if (currentRoundType != RoundGameType.DinoRun) { currentRoundType = RoundGameType.DinoRun; } if (IsRound11DinoGroundedVisual()) { round11DinoJumpStartTime = Time.unscaledTime; round11DinoLastSpaceHeldJumpTime = Time.unscaledTime; PlayRound11DinoBoingSound(); LogRound11Debug("Space jump accepted by " + source + ". " + GetRound11StateString()); } } } private void HandleRound11DinoLocalInput() { if (round11DinoActive && !round11DinoSubmitted && !round11DinoFailFreezeActive && !round11DinoClearFreezeActive) { if (currentRoundType != RoundGameType.DinoRun) { currentRoundType = RoundGameType.DinoRun; } bool key = Input.GetKey((KeyCode)32); bool flag = Input.GetKeyDown((KeyCode)32) || (key && !round11DinoSpaceWasDown); round11DinoSpaceWasDown = key; if (flag) { ForceRound11DinoJumpVisual(Input.GetKeyDown((KeyCode)32) ? "Update.GetKeyDown" : "Update.RisingEdge"); } GetRound11DinoJumpY(); UpdateRound11DinoSimulationLocal(); } } private void UpdateRound11DinoSimulationLocal() { float num = Mathf.Max(0f, Time.unscaledTime - round11DinoStartTime); if (num < 3f) { return; } float num2 = Mathf.Max(0f, num - 3f); if (round11DinoNextPassIndex == 0 && round11DinoObstacleTimes.Length != 0) { LogRound11DebugThrottled("Obstacle phase elapsed=" + num2.ToString("0.00") + ", firstT=" + round11DinoObstacleTimes[0].ToString("0.00") + ", speedTravel=" + GetRound11ObstacleTravelSecondsForIndex(round11DinoNextPassIndex).ToString("0.00") + ", " + GetRound11StateString()); } for (int i = round11DinoNextPassIndex; i < round11DinoObstacleTimes.Length; i++) { float round11ObstacleTravelSecondsForIndex = GetRound11ObstacleTravelSecondsForIndex(i); float num3 = num2 - round11DinoObstacleTimes[i]; if (num3 < 0f || num3 > round11ObstacleTravelSecondsForIndex) { continue; } float num4 = num3 / round11ObstacleTravelSecondsForIndex; if (Mathf.Abs(num4 - 0.82f) <= 0.026f) { float round11DinoJumpY = GetRound11DinoJumpY(); int round11ObstacleType = GetRound11ObstacleType(i); if ((round11ObstacleType != 1) ? (round11DinoJumpY < 28f) : (round11DinoJumpY > 34f)) { ApplyRound11DinoHitPenalty(i, round11ObstacleType, num, round11DinoJumpY); return; } } } while (round11DinoNextPassIndex < round11DinoObstacleTimes.Length) { float round11ObstacleTravelSecondsForIndex2 = GetRound11ObstacleTravelSecondsForIndex(round11DinoNextPassIndex); float num5 = num2 - round11DinoObstacleTimes[round11DinoNextPassIndex]; float num6 = num5 / round11ObstacleTravelSecondsForIndex2; if (num6 < 0.895f) { break; } if (GetRound11ObstacleType(round11DinoNextPassIndex) == 0) { round11DinoPassedCount++; } round11DinoNextPassIndex++; } if (round11DinoPassedCount >= 40 || round11DinoNextPassIndex >= round11DinoObstacleTimes.Length) { SubmitRound11DinoResultIfNeeded(failed: false); } } private int CalculateRound11DinoScore(int passed, int penalty) { int num = Mathf.Max(1, (maxRoundScore != null) ? maxRoundScore.Value : 20); return Mathf.Clamp(num - Mathf.Max(0, penalty), 0, num); } private int GetRound11DinoLocalScorePreview() { return CalculateRound11DinoScore(round11DinoPassedCount, round11DinoPenaltyPoints); } private void ApplyRound11DinoHitPenalty(int obstacleIndex, int obstacleType, float rawElapsed, float jumpY) { round11DinoPenaltyPoints = Mathf.Max(0, round11DinoPenaltyPoints) + 3; round11DinoPenaltyNoticeStartTime = Time.unscaledTime; round11DinoPenaltyNoticeUntil = Time.unscaledTime + 0.85f; if (obstacleIndex >= round11DinoNextPassIndex) { round11DinoNextPassIndex = obstacleIndex + 1; } int roundLocalActorSafe = GetRoundLocalActorSafe(); if (roundLocalActorSafe > 0) { round11DinoPassedByActor[roundLocalActorSafe] = Mathf.Clamp(round11DinoPassedCount, 0, 40); round11DinoFailedByActor[roundLocalActorSafe] = false; round11DinoPenaltyByActor[roundLocalActorSafe] = Mathf.Max(0, round11DinoPenaltyPoints); int num = CalculateRound11DinoScore(round11DinoPassedCount, round11DinoPenaltyPoints); round11DinoScoreByActor[roundLocalActorSafe] = num; RaiseMiniGameEvent(135, new object[7] { roundLocalActorSafe, round11DinoPassedCount, false, round11DinoNonce, round11DinoPenaltyPoints, false, num }, (ReceiverGroup)1); } LogRound11Debug("Hit penalty applied. obstacle=" + obstacleIndex + ", type=" + obstacleType + ", penalty=" + round11DinoPenaltyPoints + ", scorePreview=" + GetRound11DinoLocalScorePreview() + ", rawElapsed=" + rawElapsed.ToString("0.00") + ", jumpY=" + jumpY.ToString("0.0") + ", " + GetRound11StateString()); } private void TriggerRound11DinoFailFreeze(float rawElapsed, float jumpY) { if (!round11DinoFailFreezeActive) { round11DinoFailed = true; round11DinoFailFreezeActive = true; round11DinoFailFreezeRawElapsed = Mathf.Max(0f, rawElapsed); round11DinoFailFreezeJumpY = Mathf.Clamp(jumpY, 0f, 92f); round11DinoFailFreezeEndTime = Time.unscaledTime + 3f; round11DinoGlobalEndAllowedTime = Mathf.Max(round11DinoGlobalEndAllowedTime, round11DinoFailFreezeEndTime); LogRound11Debug("Fail freeze started. endsIn=3.00, " + GetRound11StateString()); } } private void TriggerRound11DinoClearFreeze() { if (!round11DinoClearFreezeActive) { round11DinoFailed = false; round11DinoClearFreezeActive = true; round11DinoClearFreezeRawElapsed = Mathf.Max(0f, Time.unscaledTime - round11DinoStartTime); round11DinoClearFreezeJumpY = Mathf.Clamp(GetRound11DinoJumpY(), 0f, 92f); round11DinoClearFreezeEndTime = Time.unscaledTime + 3f; round11DinoGlobalEndAllowedTime = Mathf.Max(round11DinoGlobalEndAllowedTime, round11DinoClearFreezeEndTime); LogRound11Debug("Game clear freeze started. endsIn=3.00, " + GetRound11StateString()); } } private void SubmitRound11DinoResultIfNeeded(bool failed) { if (!round11DinoSubmitted) { LogRound11Debug("SubmitRound11DinoResultIfNeeded failed=" + failed + " BEFORE " + GetRound11StateString()); round11DinoSubmitted = true; round11DinoFailed = failed; if (failed) { float num = (round11DinoFailFreezeActive ? round11DinoFailFreezeEndTime : (Time.unscaledTime + 3f)); round11DinoGlobalEndAllowedTime = Mathf.Max(round11DinoGlobalEndAllowedTime, num); } else if (round11DinoPassedCount >= 40 || round11DinoNextPassIndex >= round11DinoObstacleTimes.Length) { TriggerRound11DinoClearFreeze(); } int roundLocalActorSafe = GetRoundLocalActorSafe(); if (roundLocalActorSafe > 0) { round11DinoPassedByActor[roundLocalActorSafe] = Mathf.Clamp(round11DinoPassedCount, 0, 40); round11DinoFailedByActor[roundLocalActorSafe] = failed; round11DinoPenaltyByActor[roundLocalActorSafe] = Mathf.Max(0, round11DinoPenaltyPoints); round11DinoFinalSubmittedActors.Add(roundLocalActorSafe); int num2 = CalculateRound11DinoScore(round11DinoPassedCount, round11DinoPenaltyPoints); round11DinoScoreByActor[roundLocalActorSafe] = num2; RaiseMiniGameEvent(135, new object[7] { roundLocalActorSafe, round11DinoPassedCount, failed, round11DinoNonce, round11DinoPenaltyPoints, true, num2 }, (ReceiverGroup)1); } } } private void HandleRound11DinoSubmitEvent(object[] data) { if (data == null || data.Length < 3 || currentRoundType != RoundGameType.DinoRun) { return; } int num = Convert.ToInt32(data[0]); int num2 = Convert.ToInt32(data[1]); bool flag = Convert.ToBoolean(data[2]); int num3 = ((data.Length >= 4) ? Convert.ToInt32(data[3]) : round11DinoNonce); int num4 = ((data.Length >= 5) ? Mathf.Max(0, Convert.ToInt32(data[4])) : 0); bool flag2 = data.Length < 6 || Convert.ToBoolean(data[5]); int value = ((data.Length >= 7) ? Mathf.Max(0, Convert.ToInt32(data[6])) : CalculateRound11DinoScore(num2, num4)); if (num > 0 && (round11DinoNonce <= 0 || num3 == round11DinoNonce)) { round11DinoPassedByActor[num] = Mathf.Clamp(num2, 0, 40); round11DinoFailedByActor[num] = flag; round11DinoPenaltyByActor[num] = num4; if (flag2) { round11DinoScoreByActor[num] = value; round11DinoFinalSubmittedActors.Add(num); } if (flag) { round11DinoGlobalEndAllowedTime = Mathf.Max(round11DinoGlobalEndAllowedTime, Time.unscaledTime + 3f); } } } private bool HaveAllRound11DinoParticipantsSubmitted() { int num = 0; foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { num++; if (!round11DinoFinalSubmittedActors.Contains(actorNumber)) { return false; } } } return num > 0; } private void AwardRound11DinoScores() { currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { int value = 0; round11DinoPassedByActor.TryGetValue(actorNumber, out value); value = Mathf.Clamp(value, 0, 40); int value2 = 0; round11DinoPenaltyByActor.TryGetValue(actorNumber, out value2); value2 = Mathf.Max(0, value2); if (!round11DinoScoreByActor.TryGetValue(actorNumber, out var value3)) { value3 = CalculateRound11DinoScore(value, value2); } value3 = Mathf.Clamp(value3, 0, Mathf.Max(1, (maxRoundScore != null) ? maxRoundScore.Value : 20)); currentRoundScores[actorNumber] = value3; currentRoundScoreLocked.Add(actorNumber); } } } [IteratorStateMachine(typeof(d__1113))] private IEnumerator RunRound10HalliGalliRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1113(0) { <>4__this = this, testMode = testMode }; } private void BeginRound10HalliGalliAsHost() { round10HalliActive = true; round10BellLocked = false; round10SuccessCount = 0; round10Completed = false; round10ScoresByActor.Clear(); round10BellPenaltyUntilByActor.Clear(); currentRoundScores.Clear(); ResetRound10CardsAndDeckAsHost(); round10NextDrawTime = Time.time + 1.25f; BroadcastRound10HalliGalliState(); } private void EndRound10HalliGalliLocal() { EndRound10HalliGalliLocal(resetCompletedFlag: true); } private void EndRound10HalliGalliLocal(bool resetCompletedFlag) { round10HalliActive = false; round10BellLocked = false; round10NextDrawTime = 0f; round10NextSlotIndex = 0; round10SuccessCount = 0; if (resetCompletedFlag) { round10Completed = false; } round10Deck.Clear(); round10BellPenaltyUntilByActor.Clear(); } private void ResetRound10CardsAndDeckAsHost() { round10CardFruit[0] = 0; round10CardCount[0] = 1; round10CardFruit[1] = 1; round10CardCount[1] = 1; round10CardFruit[2] = 2; round10CardCount[2] = 1; round10CardFruit[3] = 3; round10CardCount[3] = 1; round10Deck.Clear(); for (int i = 0; i < 4; i++) { for (int j = 1; j <= 5; j++) { if (j != 1) { round10Deck.Add(i * 10 + j); } } } ShuffleRound10Deck(); round10NextSlotIndex = 0; } private void ShuffleRound10Deck() { for (int i = 0; i < round10Deck.Count; i++) { int index = Random.Range(i, round10Deck.Count); int value = round10Deck[i]; round10Deck[i] = round10Deck[index]; round10Deck[index] = value; } } private void DrawNextRound10CardAsHost() { if (round10Deck.Count <= 0) { ResetRound10CardsAndDeckAsHost(); } int changedSlot = -1; int num = Mathf.Clamp(round10NextSlotIndex, 0, 3); if (round10Deck.Count > 0) { int num2 = FindRound10NonDuplicateCardIndexForSlot(num); if (num2 < 0) { RebuildRound10DeckOnlyAsHost(); num2 = FindRound10NonDuplicateCardIndexForSlot(num); } if (num2 < 0) { num2 = 0; } int num3 = round10Deck[num2]; round10Deck.RemoveAt(num2); int num4 = Mathf.Clamp(num3 / 10, 0, 3); int num5 = Mathf.Clamp(num3 % 10, 1, 5); changedSlot = num; round10CardFruit[num] = num4; round10CardCount[num] = num5; round10NextSlotIndex = (round10NextSlotIndex + 1) % 4; } round10NextDrawTime = Time.time + 1.25f; BroadcastRound10HalliGalliState(changedSlot, -1, -1); } private void RebuildRound10DeckOnlyAsHost() { round10Deck.Clear(); for (int i = 0; i < 4; i++) { for (int j = 1; j <= 5; j++) { if (j != 1) { round10Deck.Add(i * 10 + j); } } } ShuffleRound10Deck(); } private int FindRound10NonDuplicateCardIndexForSlot(int slot) { for (int i = 0; i < round10Deck.Count; i++) { int num = round10Deck[i]; int fruit = Mathf.Clamp(num / 10, 0, 3); int count = Mathf.Clamp(num % 10, 1, 5); if (!IsRound10SameCardVisible(fruit, count, slot)) { return i; } } return -1; } private bool IsRound10SameCardVisible(int fruit, int count, int ignoreSlot) { for (int i = 0; i < 4; i++) { if (i != ignoreSlot && Mathf.Clamp(round10CardFruit[i], 0, 3) == fruit && Mathf.Clamp(round10CardCount[i], 1, 5) == count) { return true; } } return false; } private int[] GetRound10FruitSums() { int[] array = new int[4]; for (int i = 0; i < 4; i++) { int num = Mathf.Clamp(round10CardFruit[i], 0, 3); array[num] += Mathf.Clamp(round10CardCount[i], 1, 5); } return array; } private bool IsRound10BellValid() { int[] round10FruitSums = GetRound10FruitSums(); for (int i = 0; i < round10FruitSums.Length; i++) { if (round10FruitSums[i] == 5) { return true; } } return false; } private void RebuildRound10CurrentScoresFromSuccessScores() { currentRoundScores.Clear(); foreach (KeyValuePair item in round10ScoresByActor) { currentRoundScores[item.Key] = Mathf.Clamp(item.Value, 0, 10); } } private void AwardRound10RankScoresFromSuccessCounts() { currentRoundScores.Clear(); currentRoundScoreLocked.Clear(); RefreshActorNamesFromCharacters(); List list = new List(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int key in round10ScoresByActor.Keys) { if (key > 0 && !list.Contains(key)) { list.Add(key); } } list.Sort(delegate(int a, int b) { int value = (round10ScoresByActor.ContainsKey(a) ? round10ScoresByActor[a] : 0); int num7 = (round10ScoresByActor.ContainsKey(b) ? round10ScoresByActor[b] : 0).CompareTo(value); return (num7 != 0) ? num7 : a.CompareTo(b); }); for (int i = 0; i < list.Count; i++) { int num = list[i]; int num2 = (round10ScoresByActor.ContainsKey(num) ? round10ScoresByActor[num] : 0); int num3 = 0; for (int j = 0; j < list.Count; j++) { int num4 = (round10ScoresByActor.ContainsKey(list[j]) ? round10ScoresByActor[list[j]] : 0); if (num4 > num2) { num3++; } } int num5 = num3 + 1; int num6 = 0; switch (num5) { case 1: num6 = 20; break; case 2: num6 = 15; break; case 3: num6 = 10; break; case 4: num6 = 5; break; } currentRoundScores[num] = Mathf.Clamp(num6, 0, maxRoundScore.Value); currentRoundScoreLocked.Add(num); } } private object[] BuildRound10HalliGalliStateData(int changedSlot, int penaltyActor, int successActor) { RebuildRound10CurrentScoresFromSuccessScores(); List list = new List(round10ScoresByActor.Keys); foreach (int key in round10BellPenaltyUntilByActor.Keys) { if (!list.Contains(key)) { list.Add(key); } } list.Sort(); int[] array = list.ToArray(); int[] array2 = new int[list.Count]; float[] array3 = new float[list.Count]; for (int i = 0; i < list.Count; i++) { array2[i] = (currentRoundScores.ContainsKey(list[i]) ? currentRoundScores[list[i]] : 0); array3[i] = (round10BellPenaltyUntilByActor.TryGetValue(list[i], out var value) ? Mathf.Max(0f, value - Time.time) : 0f); } return new object[12] { (int[])round10CardFruit.Clone(), (int[])round10CardCount.Clone(), round10NextSlotIndex, round10SuccessCount, round10HalliActive, round10BellLocked, array, array2, array3, changedSlot, penaltyActor, successActor }; } private void BroadcastRound10HalliGalliState() { BroadcastRound10HalliGalliState(-1, -1, -1); } private void BroadcastRound10HalliGalliState(int changedSlot, int penaltyActor, int successActor) { object[] data = BuildRound10HalliGalliStateData(changedSlot, penaltyActor, successActor); ApplyRound10HalliGalliStateLocal(data); RaiseMiniGameEvent(127, data, (ReceiverGroup)0); } private void ApplyRound10HalliGalliStateLocal(object[] data) { if (data == null || data.Length < 6) { return; } int[] array = data[0] as int[]; int[] array2 = data[1] as int[]; if (array != null) { for (int i = 0; i < 4 && i < array.Length; i++) { round10CardFruit[i] = Mathf.Clamp(array[i], 0, 3); } } if (array2 != null) { for (int j = 0; j < 4 && j < array2.Length; j++) { round10CardCount[j] = Mathf.Clamp(array2[j], 1, 5); } } round10NextSlotIndex = Mathf.Clamp(Convert.ToInt32(data[2]), 0, 3); round10SuccessCount = Mathf.Clamp(Convert.ToInt32(data[3]), 0, 10); round10HalliActive = Convert.ToBoolean(data[4]); round10BellLocked = Convert.ToBoolean(data[5]); int num = ((data.Length >= 10) ? Convert.ToInt32(data[9]) : (-1)); int num2 = ((data.Length >= 11) ? Convert.ToInt32(data[10]) : (-1)); int num3 = ((data.Length >= 12) ? Convert.ToInt32(data[11]) : (-1)); if (data.Length >= 8) { int[] array3 = data[6] as int[]; int[] array4 = data[7] as int[]; float[] array5 = ((data.Length >= 9) ? (data[8] as float[]) : null); round10BellPenaltyUntilByActor.Clear(); if (array3 != null && array4 != null) { for (int k = 0; k < array3.Length && k < array4.Length; k++) { int key = array3[k]; int num4 = Mathf.Clamp(array4[k], 0, 10); if (num4 > 0) { round10ScoresByActor[key] = num4; currentRoundScores[key] = num4; } else { round10ScoresByActor.Remove(key); currentRoundScores.Remove(key); } if (array5 != null && k < array5.Length && array5[k] > 0f) { round10BellPenaltyUntilByActor[key] = Time.time + array5[k]; } } } } if (round10HalliActive && num >= 0) { PlayRound10CardFlipSoundLocal(); } int round10LocalActor = GetRound10LocalActor(); if (round10HalliActive && num2 > 0 && round10LocalActor == num2) { PlayArrowWrongSound(); } if (round10HalliActive && num3 > 0 && round10LocalActor == num3) { PlayRound10SuccessSoundLocal(); } } private void HandleRound10HalliGalliBellEvent(object[] data) { if (IsHostOrOffline() && data != null && data.Length >= 1) { int actor = Convert.ToInt32(data[0]); TryApplyRound10BellAsHost(actor); } } private void TryApplyRound10BellAsHost(int actor) { if (!round10HalliActive || currentRoundType != RoundGameType.HalliGalli || round10BellLocked || round10SuccessCount >= 10 || actor <= 0) { return; } if (IsRound10ActorPenalized(actor)) { BroadcastRound10HalliGalliState(); return; } if (!IsRound10BellValid()) { round10BellPenaltyUntilByActor[actor] = Time.time + 3f; BroadcastRound10HalliGalliState(-1, actor, -1); return; } round10BellLocked = true; if (!round10ScoresByActor.ContainsKey(actor)) { round10ScoresByActor[actor] = 0; } round10ScoresByActor[actor] = Mathf.Clamp(round10ScoresByActor[actor] + 1, 0, 10); RebuildRound10CurrentScoresFromSuccessScores(); round10SuccessCount++; if (round10SuccessCount >= 10) { round10Completed = true; } if (round10SuccessCount < 10) { ResetRound10CardsAndDeckAsHost(); round10BellLocked = false; round10NextDrawTime = Time.time + 1.25f; } SyncScoresToAll(); BroadcastRound10HalliGalliState(-1, -1, actor); } private void HandleRound10HalliGalliLocalInput() { if (!round10HalliActive || currentRoundType != RoundGameType.HalliGalli || !Input.GetKeyDown((KeyCode)32)) { return; } int num = -1; try { if ((Object)(object)Character.localCharacter != (Object)null) { num = GetActorNumber(Character.localCharacter); } if (num <= 0 && PhotonNetwork.LocalPlayer != null) { num = PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } if (num > 0 && !IsRound10ActorPenalized(num)) { if (IsHostOrOffline()) { TryApplyRound10BellAsHost(num); return; } RaiseMiniGameEvent(128, new object[1] { num }, (ReceiverGroup)2); } } [IteratorStateMachine(typeof(d__1134))] private IEnumerator RunRound9MemoryMatchRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1134(0) { <>4__this = this, testMode = testMode }; } private void BeginRound9MemoryAsHost() { BuildRound9BoardLocal(); for (int i = 0; i < round9Revealed.Length; i++) { round9Revealed[i] = false; } round9TurnOrder.Clear(); round9PairScores.Clear(); round9FinishTimes.Clear(); RefreshActorNamesFromCharacters(); List round9ParticipantActors = GetRound9ParticipantActors(); for (int j = 0; j < round9ParticipantActors.Count; j++) { int item = round9ParticipantActors[j]; if (!round9TurnOrder.Contains(item)) { round9TurnOrder.Add(item); } } if (round9TurnOrder.Count == 0 && PhotonNetwork.LocalPlayer != null) { round9TurnOrder.Add(PhotonNetwork.LocalPlayer.ActorNumber); } round9SelectedIndex = 0; round9ProgressIndex = 0; round9FirstPickIndex = -1; round9TempRevealIndex = -1; round9CurrentTurnOrderIndex = 0; round9WrongRevealUntil = -1f; round9MemorySubmitted = false; round9MemoryActive = true; round9MemoryInputEnabled = false; round9MemoryShowAllUntil = Time.time + 5f; round9MemoryInputStartTime = Time.time + 8f; BroadcastRound9MemoryState(); } private void BeginRound9MemoryLocal() { BuildRound9BoardLocal(); for (int i = 0; i < round9Revealed.Length; i++) { round9Revealed[i] = false; } round9TurnOrder.Clear(); int round9LocalActor = GetRound9LocalActor(); if (round9LocalActor > 0) { round9TurnOrder.Add(round9LocalActor); } round9SelectedIndex = 0; round9ProgressIndex = 0; round9FirstPickIndex = -1; round9TempRevealIndex = -1; round9CurrentTurnOrderIndex = 0; round9MemorySubmitted = false; round9MemoryActive = true; round9MemoryInputEnabled = false; round9WrongRevealUntil = -1f; round9MemoryShowAllUntil = Time.time + 5f; round9MemoryInputStartTime = Time.time + 8f; } private void EndRound9MemoryLocal() { round9MemoryActive = false; round9MemoryInputEnabled = false; round9MemorySubmitted = false; round9WrongRevealUntil = -1f; round9SelectedIndex = 0; round9ProgressIndex = 0; round9FirstPickIndex = -1; round9TempRevealIndex = -1; round9CurrentTurnOrderIndex = 0; round9TurnOrder.Clear(); if (round9WrongRevealRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(round9WrongRevealRoutine); } catch { } round9WrongRevealRoutine = null; } for (int i = 0; i < round9Revealed.Length; i++) { round9Revealed[i] = false; } } private void BuildRound9BoardLocal() { List list = new List(); for (int i = 0; i < 6; i++) { list.Add(i); list.Add(i); } while (list.Count < round9BoardNumbers.Length) { list.Add(-1); } for (int j = 0; j < round9BoardNumbers.Length; j++) { int index = Random.Range(0, list.Count); round9BoardNumbers[j] = list[index]; list.RemoveAt(index); } } private string GetRound9FruitEmoji(int fruit) { return fruit switch { 0 => "\ud83c\udf4b", 1 => "\ud83c\udf45", 2 => "\ud83c\udf52", 3 => "\ud83c\udf4d", 4 => "\ud83e\udd5d", 5 => "\ud83e\uded0", _ => "", }; } private string GetRound9FruitName(int fruit) { return fruit switch { 0 => "레몬", 1 => "토마토", 2 => "체리", 3 => "파인애플", 4 => "키위", 5 => "블루베리", _ => "빈칸", }; } private List GetRound9ParticipantActors() { HashSet hashSet = new HashSet(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { hashSet.Add(actorNumber); } } } foreach (Character allCharacter in Character.AllCharacters) { if (!((Object)(object)allCharacter == (Object)null)) { int actorNumber2 = GetActorNumber(allCharacter); if (actorNumber2 > 0) { hashSet.Add(actorNumber2); } } } List list = new List(hashSet); list.Sort(); if (list.Count > 4) { list.RemoveRange(4, list.Count - 4); } return list; } private int GetRound9ExpectedNumber() { return Mathf.Clamp(round9ProgressIndex / 2 + 1, 1, 6); } private int GetRound9LocalActor() { try { if ((Object)(object)Character.localCharacter != (Object)null) { int actorNumber = GetActorNumber(Character.localCharacter); if (actorNumber > 0) { return actorNumber; } } if (PhotonNetwork.LocalPlayer != null) { return PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } return -1; } private int GetRound9CurrentTurnActor() { return -1; } private bool IsRound9LocalTurn() { return round9MemoryInputEnabled && !round9MemorySubmitted; } private void AdvanceRound9Turn() { } private object[] BuildRound9MemoryStateData() { int[] array = new int[round9Revealed.Length]; for (int i = 0; i < round9Revealed.Length; i++) { array[i] = 0; } return new object[10] { round9BoardNumbers, array, round9TurnOrder.ToArray(), 0, 0, -1, -1, false, new int[0], new int[0] }; } private void BroadcastRound9MemoryState() { object[] data = BuildRound9MemoryStateData(); ApplyRound9MemoryStateLocal(data); RaiseMiniGameEvent(125, data, (ReceiverGroup)0); } private void ApplyRound9MemoryStateLocal(object[] data) { if (data == null || data.Length < 8) { return; } int[] array = data[0] as int[]; int[] array2 = data[2] as int[]; if (array == null) { return; } currentRoundType = RoundGameType.MemoryMatch; gameState = GameState.Running; roundBetweenMovementLockUntil = -1f; for (int i = 0; i < round9BoardNumbers.Length && i < array.Length; i++) { round9BoardNumbers[i] = array[i]; } for (int j = 0; j < round9Revealed.Length; j++) { round9Revealed[j] = false; } round9TurnOrder.Clear(); if (array2 != null) { for (int k = 0; k < array2.Length; k++) { if (!round9TurnOrder.Contains(array2[k])) { round9TurnOrder.Add(array2[k]); } } } round9SelectedIndex = Mathf.Clamp(round9SelectedIndex, 0, 15); round9CurrentTurnOrderIndex = 0; round9ProgressIndex = 0; round9FirstPickIndex = -1; round9TempRevealIndex = -1; round9MemorySubmitted = false; round9WrongRevealUntil = -1f; round9PairScores.Clear(); round9MemoryActive = true; round9MemoryInputEnabled = false; round9MemoryShowAllUntil = Time.time + 5f; round9MemoryInputStartTime = Time.time + 8f; } private object[] BuildRound9FinishListData() { List> list = new List>(round9FinishTimes); list.Sort(delegate(KeyValuePair a, KeyValuePair b) { int num = a.Value.CompareTo(b.Value); return (num != 0) ? num : a.Key.CompareTo(b.Key); }); int[] array = new int[list.Count]; float[] array2 = new float[list.Count]; for (int i = 0; i < list.Count; i++) { array[i] = list[i].Key; array2[i] = list[i].Value; } return new object[2] { array, array2 }; } private void BroadcastRound9FinishList() { object[] data = BuildRound9FinishListData(); ApplyRound9FinishListLocal(data); RaiseSimpleEvent(132, data, (ReceiverGroup)0); } private void ApplyRound9FinishListLocal(object[] data) { if (data == null || data.Length < 2) { return; } int[] array = data[0] as int[]; float[] array2 = data[1] as float[]; if (array == null || array2 == null) { return; } round9FinishTimes.Clear(); for (int i = 0; i < array.Length && i < array2.Length; i++) { if (array[i] > 0) { round9FinishTimes[array[i]] = Mathf.Max(0f, array2[i]); } } } private void HandleRound9MemoryPickRequestEvent(object[] data) { if (IsHostOrOffline() && data != null && data.Length >= 2) { int num = Convert.ToInt32(data[0]); float value = Convert.ToSingle(data[1]); if (num > 0 && !round9FinishTimes.ContainsKey(num)) { round9FinishTimes[num] = value; AwardRound9MemoryScores(); SyncScoresToAll(); BroadcastRound9FinishList(); } } } private void TryApplyRound9PickAsHost(int actor, int index) { } [IteratorStateMachine(typeof(d__1155))] private IEnumerator Round9WrongThenNextTurnRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1155(0) { <>4__this = this }; } private void ShowRound9SmallClearTimeNoticeLocal(float clearTime) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) float num = 2f; centerNoticeText = "클리어!\n" + Mathf.Max(0f, clearTime).ToString("0.00") + "초"; centerNoticeStartTime = Time.time; centerNoticeDuration = num; centerNoticeUntil = Time.time + num; centerNoticeColor = Color.white; centerNoticeThickRounded = false; centerNoticeRoundEndStyle = true; } private void HandleRound9MemoryLocalInput() { if (!round9MemoryActive || round9MemorySubmitted) { return; } if (currentRoundType != RoundGameType.MemoryMatch) { currentRoundType = RoundGameType.MemoryMatch; } if ((Object)(object)Character.localCharacter == (Object)null) { return; } if (!round9MemoryInputEnabled) { if (!(Time.time >= round9MemoryInputStartTime)) { return; } round9MemoryInputEnabled = true; } if (Time.time >= round9MemoryInputStartTime + 45f) { round9MemorySubmitted = true; } else { if (round9WrongRevealUntil > 0f && Time.time < round9WrongRevealUntil) { return; } int num = round9SelectedIndex % 4; int num2 = round9SelectedIndex / 4; bool flag = false; if (Input.GetKeyDown((KeyCode)97)) { num = Mathf.Max(0, num - 1); flag = true; } else if (Input.GetKeyDown((KeyCode)100)) { num = Mathf.Min(3, num + 1); flag = true; } else if (Input.GetKeyDown((KeyCode)119)) { num2 = Mathf.Max(0, num2 - 1); flag = true; } else if (Input.GetKeyDown((KeyCode)115)) { num2 = Mathf.Min(3, num2 + 1); flag = true; } if (flag) { round9SelectedIndex = num2 * 4 + num; } else { if (!Input.GetKeyDown((KeyCode)32) || round9SelectedIndex < 0 || round9SelectedIndex >= round9BoardNumbers.Length || round9Revealed[round9SelectedIndex] || round9BoardNumbers[round9SelectedIndex] < 0 || round9SelectedIndex == round9FirstPickIndex) { return; } int num3 = round9BoardNumbers[round9SelectedIndex]; if (round9FirstPickIndex < 0) { round9FirstPickIndex = round9SelectedIndex; round9TempRevealIndex = -1; return; } int num4 = round9BoardNumbers[Mathf.Clamp(round9FirstPickIndex, 0, round9BoardNumbers.Length - 1)]; if (num3 == num4) { round9Revealed[round9FirstPickIndex] = true; round9Revealed[round9SelectedIndex] = true; round9FirstPickIndex = -1; round9TempRevealIndex = -1; round9ProgressIndex += 2; if (round9ProgressIndex < 12) { return; } round9MemorySubmitted = true; int round9LocalActor = GetRound9LocalActor(); float num5 = Time.time - round9MemoryInputStartTime; ShowRound9SmallClearTimeNoticeLocal(num5); if (round9LocalActor <= 0) { return; } if (IsHostOrOffline()) { if (!round9FinishTimes.ContainsKey(round9LocalActor)) { round9FinishTimes[round9LocalActor] = num5; AwardRound9MemoryScores(); SyncScoresToAll(); BroadcastRound9FinishList(); } } else { RaiseMiniGameEvent(126, new object[2] { round9LocalActor, num5 }, (ReceiverGroup)2); } return; } PlayArrowWrongSound(); round9TempRevealIndex = round9SelectedIndex; if (round9WrongRevealRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(round9WrongRevealRoutine); } catch { } } round9WrongRevealRoutine = ((MonoBehaviour)this).StartCoroutine(Round9WrongThenNextTurnRoutine()); } } } private bool HaveAllRound9ParticipantsFinished() { if (round9TurnOrder.Count <= 0) { return false; } for (int i = 0; i < round9TurnOrder.Count; i++) { int num = round9TurnOrder[i]; if (num > 0 && !round9FinishTimes.ContainsKey(num)) { return false; } } return true; } private void AwardRound9MemoryScores() { currentRoundScores.Clear(); RefreshActorNamesFromCharacters(); List list = new List(); foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { EnsureActorScoreEntries(actorNumber, GetCharacterDisplayName(roundPlayer)); if (!list.Contains(actorNumber)) { list.Add(actorNumber); } } } foreach (int item in round9TurnOrder) { if (item > 0 && !list.Contains(item)) { list.Add(item); } } list.Sort(); foreach (int item2 in list) { currentRoundScores[item2] = 0; } List> list2 = new List>(); foreach (KeyValuePair round9FinishTime in round9FinishTimes) { if (list.Contains(round9FinishTime.Key)) { list2.Add(round9FinishTime); } } list2.Sort((KeyValuePair a, KeyValuePair b) => a.Value.CompareTo(b.Value)); int[] array = new int[4] { 20, 15, 10, 5 }; for (int i = 0; i < list2.Count && i < array.Length; i++) { currentRoundScores[list2[i].Key] = Mathf.Clamp(array[i], 0, maxRoundScore.Value); } SyncScoresToAll(); } [IteratorStateMachine(typeof(d__1160))] private IEnumerator RunRound8StarGridRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1160(0) { <>4__this = this, testMode = testMode }; } private void BeginRound8StarGridAsHost() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) round8StarGridActive = true; round8StarsEatenTotal = 0; round8PositionsByActor.Clear(); round8StarsByActor.Clear(); round8ParalyzedUntilByActor.Clear(); ClearRound8ElectricCells(); RefreshActorNamesFromCharacters(); List round8ParticipantActors = GetRound8ParticipantActors(); Vector2Int[] array = (Vector2Int[])(object)new Vector2Int[4] { new Vector2Int(0, 0), new Vector2Int(6, 0), new Vector2Int(0, 6), new Vector2Int(6, 6) }; for (int i = 0; i < round8ParticipantActors.Count && i < array.Length; i++) { round8PositionsByActor[round8ParticipantActors[i]] = array[i]; round8StarsByActor[round8ParticipantActors[i]] = 0; } round8StarCell = PickRound8StarCell(); PickRound8ElectricCells(); BroadcastRound8StarGridState(); } private List GetRound8ParticipantActors() { HashSet hashSet = new HashSet(); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { hashSet.Add(actorNumber); } } } foreach (Character allCharacter in Character.AllCharacters) { if (!((Object)(object)allCharacter == (Object)null)) { int actorNumber2 = GetActorNumber(allCharacter); if (actorNumber2 > 0) { hashSet.Add(actorNumber2); } } } List list = new List(hashSet); list.Sort(); if (list.Count > 4) { list.RemoveRange(4, list.Count - 4); } return list; } private Vector2Int PickRound8StarCell() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) List list = new List(); Vector2Int val = default(Vector2Int); for (int i = 0; i < 7; i++) { for (int j = 0; j < 7; j++) { ((Vector2Int)(ref val))..ctor(j, i); if (!IsRound8CellOccupied(val, -1)) { list.Add(val); } } } if (list.Count == 0) { return new Vector2Int(3, 3); } return list[Random.Range(0, list.Count)]; } private void ClearRound8ElectricCells() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < round8ElectricCells.Length; i++) { round8ElectricCells[i] = new Vector2Int(-1, -1); } } private int[] BuildRound8ElectricXArray() { int[] array = new int[round8ElectricCells.Length]; for (int i = 0; i < round8ElectricCells.Length; i++) { array[i] = ((Vector2Int)(ref round8ElectricCells[i])).x; } return array; } private int[] BuildRound8ElectricYArray() { int[] array = new int[round8ElectricCells.Length]; for (int i = 0; i < round8ElectricCells.Length; i++) { array[i] = ((Vector2Int)(ref round8ElectricCells[i])).y; } return array; } private void PickRound8ElectricCells() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) ClearRound8ElectricCells(); List list = new List(); Vector2Int val = default(Vector2Int); for (int i = 0; i < 7; i++) { for (int j = 0; j < 7; j++) { ((Vector2Int)(ref val))..ctor(j, i); if (!IsRound8CellOccupied(val, -1) && !(val == round8StarCell)) { list.Add(val); } } } for (int k = 0; k < round8ElectricCells.Length; k++) { if (list.Count <= 0) { break; } int index = Random.Range(0, list.Count); round8ElectricCells[k] = list[index]; list.RemoveAt(index); } } private bool IsRound8ElectricCell(Vector2Int cell) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < round8ElectricCells.Length; i++) { if (round8ElectricCells[i] == cell) { return true; } } return false; } private bool IsRound8CellOccupied(Vector2Int cell, int ignoreActor) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair item in round8PositionsByActor) { if (item.Key == ignoreActor || !(item.Value == cell)) { continue; } return true; } return false; } private void BroadcastRound8StarGridState() { BroadcastRound8StarGridState(-1, -1); } private void BroadcastRound8StarGridState(int movedActor, int starActor) { object[] data = BuildRound8StarGridStateData(movedActor, starActor, -1); ApplyRound8StarGridStateLocal(data); RaiseMiniGameEvent(123, data, (ReceiverGroup)0); } private object[] BuildRound8StarGridStateData(int movedActor, int starActor, int electricActor) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) List list = new List(round8PositionsByActor.Keys); list.Sort(); int[] array = list.ToArray(); int[] array2 = new int[list.Count]; int[] array3 = new int[list.Count]; int[] array4 = new int[list.Count]; for (int i = 0; i < list.Count; i++) { Vector2Int val = round8PositionsByActor[list[i]]; array2[i] = ((Vector2Int)(ref val)).x; array3[i] = ((Vector2Int)(ref val)).y; array4[i] = (round8StarsByActor.ContainsKey(list[i]) ? round8StarsByActor[list[i]] : 0); } return new object[13] { array, array2, array3, array4, ((Vector2Int)(ref round8StarCell)).x, ((Vector2Int)(ref round8StarCell)).y, round8StarsEatenTotal, GetRound8TotalStars(), movedActor, starActor, BuildRound8ElectricXArray(), BuildRound8ElectricYArray(), electricActor }; } private void ApplyRound8StarGridStateLocal(object[] data) { //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) if (data == null || data.Length < 8) { return; } int num = -999; try { if ((Object)(object)Character.localCharacter != (Object)null) { num = GetActorNumber(Character.localCharacter); } else if (PhotonNetwork.LocalPlayer != null) { num = PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } int num2 = ((data.Length >= 9) ? Convert.ToInt32(data[8]) : (-1)); int num3 = ((data.Length >= 10) ? Convert.ToInt32(data[9]) : (-1)); int[] array = data[0] as int[]; int[] array2 = data[1] as int[]; int[] array3 = data[2] as int[]; int[] array4 = data[3] as int[]; if (array == null || array2 == null || array3 == null) { return; } round8PositionsByActor.Clear(); round8StarsByActor.Clear(); for (int i = 0; i < array.Length; i++) { int key = array[i]; int num4 = ((i < array2.Length) ? array2[i] : 0); int num5 = ((i < array3.Length) ? array3[i] : 0); round8PositionsByActor[key] = new Vector2Int(Mathf.Clamp(num4, 0, 6), Mathf.Clamp(num5, 0, 6)); round8StarsByActor[key] = ((array4 != null && i < array4.Length) ? array4[i] : 0); } round8StarCell = new Vector2Int(Mathf.Clamp(Convert.ToInt32(data[4]), 0, 6), Mathf.Clamp(Convert.ToInt32(data[5]), 0, 6)); round8StarsEatenTotal = Mathf.Clamp(Convert.ToInt32(data[6]), 0, Mathf.Max(1, Convert.ToInt32(data[7]))); int num6 = ((data.Length >= 13) ? Convert.ToInt32(data[12]) : (-1)); if (data.Length >= 12) { int[] array5 = data[10] as int[]; int[] array6 = data[11] as int[]; ClearRound8ElectricCells(); if (array5 != null && array6 != null) { int num7 = Mathf.Min(round8ElectricCells.Length, Mathf.Min(array5.Length, array6.Length)); for (int j = 0; j < num7; j++) { round8ElectricCells[j] = new Vector2Int(Mathf.Clamp(array5[j], -1, 6), Mathf.Clamp(array6[j], -1, 6)); } } } else { ClearRound8ElectricCells(); } if (num6 > 0) { round8ParalyzedUntilByActor[num6] = Time.time + 0.5f; } round8StarGridActive = currentRoundType == RoundGameType.StarGrid && gameState == GameState.Running; if (round8StarGridActive && num > 0) { if (num2 == num) { PlayRound8MoveSoundLocal(); } if (num3 == num) { PlayRound8StarSoundLocal(); } if (num6 == num) { PlayArrowWrongSound(); } } } private void HandleRound8StarGridMoveRequestEvent(object[] data) { if (IsHostOrOffline() && data != null && data.Length >= 3) { int actor = Convert.ToInt32(data[0]); int dx = Convert.ToInt32(data[1]); int dy = Convert.ToInt32(data[2]); TryApplyRound8MoveAsHost(actor, dx, dy); } } private void TryApplyRound8MoveAsHost(int actor, int dx, int dy) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) if (!round8StarGridActive || currentRoundType != RoundGameType.StarGrid || round8StarsEatenTotal >= GetRound8TotalStars() || !round8PositionsByActor.ContainsKey(actor) || (round8ParalyzedUntilByActor.TryGetValue(actor, out var value) && Time.time < value)) { return; } Vector2Int val = round8PositionsByActor[actor]; Vector2Int val2 = default(Vector2Int); ((Vector2Int)(ref val2))..ctor(Mathf.Clamp(((Vector2Int)(ref val)).x + dx, 0, 6), Mathf.Clamp(((Vector2Int)(ref val)).y + dy, 0, 6)); if (val2 == val || IsRound8CellOccupied(val2, actor)) { return; } round8PositionsByActor[actor] = val2; int starActor = -1; if (val2 == round8StarCell) { if (!round8StarsByActor.ContainsKey(actor)) { round8StarsByActor[actor] = 0; } round8StarsByActor[actor]++; round8StarsEatenTotal++; starActor = actor; if (round8StarsEatenTotal < GetRound8TotalStars()) { round8StarCell = PickRound8StarCell(); PickRound8ElectricCells(); } else { round8ElectricCells[0] = new Vector2Int(-1, -1); round8ElectricCells[1] = new Vector2Int(-1, -1); } } int electricActor = -1; if (IsRound8ElectricCell(val2)) { round8ParalyzedUntilByActor[actor] = Time.time + 0.5f; electricActor = actor; } object[] data = BuildRound8StarGridStateData(actor, starActor, electricActor); ApplyRound8StarGridStateLocal(data); RaiseMiniGameEvent(123, data, (ReceiverGroup)0); } private void HandleRound8StarGridLocalInput() { if (!round8StarGridActive || currentRoundType != RoundGameType.StarGrid || (Object)(object)Character.localCharacter == (Object)null) { return; } int num = 0; int num2 = 0; if (Input.GetKeyDown((KeyCode)119)) { num2 = -1; } else if (Input.GetKeyDown((KeyCode)115)) { num2 = 1; } else if (Input.GetKeyDown((KeyCode)97)) { num = -1; } else { if (!Input.GetKeyDown((KeyCode)100)) { return; } num = 1; } int actorNumber = GetActorNumber(Character.localCharacter); if (actorNumber <= 0 && PhotonNetwork.LocalPlayer != null) { actorNumber = PhotonNetwork.LocalPlayer.ActorNumber; } if (actorNumber > 0) { object[] data = new object[3] { actorNumber, num, num2 }; if (IsHostOrOffline()) { TryApplyRound8MoveAsHost(actorNumber, num, num2); } else { RaiseMiniGameEvent(124, data, (ReceiverGroup)2); } } } private void EndRound8StarGridLocal() { round8StarGridActive = false; } private void AwardRound8StarGridScores() { currentRoundScores.Clear(); RefreshActorNamesFromCharacters(); List list = new List(round8StarsByActor.Keys); foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0 && !list.Contains(actorNumber)) { list.Add(actorNumber); } } } list.Sort(); List list2 = new List(); foreach (int item3 in list) { int item = (round8StarsByActor.ContainsKey(item3) ? round8StarsByActor[item3] : 0); if (!list2.Contains(item)) { list2.Add(item); } } list2.Sort((int a, int b) => b.CompareTo(a)); int[] array = new int[4] { 20, 15, 10, 5 }; foreach (int item4 in list) { int item2 = (round8StarsByActor.ContainsKey(item4) ? round8StarsByActor[item4] : 0); int num = list2.IndexOf(item2); int num2 = ((num >= 0 && num < array.Length) ? array[num] : 0); currentRoundScores[item4] = Mathf.Clamp(num2, 0, maxRoundScore.Value); } SyncScoresToAll(); } [IteratorStateMachine(typeof(d__1179))] private IEnumerator RunRound7ButtonMashRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1179(0) { <>4__this = this, testMode = testMode }; } private string RankOrdinalEnglish(int rank) { return rank switch { 1 => "1st", 2 => "2nd", 3 => "3rd", _ => rank + "th", }; } private int GetRound7TargetPresses() { return 100; } private bool HaveAllRound7ParticipantsFinished() { int num = 0; foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { num++; if (!round7FinishTimes.ContainsKey(actorNumber)) { return false; } } } return num > 0; } private KeyCode GetRound7SequenceKey(int progress) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.Max(1, GetRound7TargetPresses()); if (round7LocalRandomKeySequence == null || round7LocalRandomKeySequence.Length < num + 1) { BuildRound7LocalRandomKeySequence(); } if (round7LocalRandomKeySequence != null && round7LocalRandomKeySequence.Length != 0) { int num2 = Mathf.Clamp(progress, 0, round7LocalRandomKeySequence.Length - 1); return round7LocalRandomKeySequence[num2]; } return (KeyCode)119; } private void BuildRound7LocalRandomKeySequence() { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected I4, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Invalid comparison between I4 and Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.Max(1, GetRound7TargetPresses()); round7LocalRandomKeySequence = (KeyCode[])(object)new KeyCode[num + 1]; KeyCode[] array = new KeyCode[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); KeyCode[] array2 = (KeyCode[])(object)array; int num2 = 0; try { if ((Object)(object)Character.localCharacter != (Object)null) { num2 = GetActorNumber(Character.localCharacter); } if (num2 <= 0 && PhotonNetwork.LocalPlayer != null) { num2 = PhotonNetwork.LocalPlayer.ActorNumber; } } catch { num2 = 0; } int seed = (num2 * 73856093) ^ (currentRoundIndex * 19349663) ^ (Environment.TickCount * 83492791) ^ (PhotonNetwork.ServerTimestamp * 31); Random random = new Random(seed); KeyCode val = (KeyCode)0; for (int i = 0; i < round7LocalRandomKeySequence.Length; i++) { KeyCode val2 = array2[random.Next(0, array2.Length)]; if ((int)val != 0 && val2 == val) { KeyCode[] array3 = (KeyCode[])(object)new KeyCode[3]; int num3 = 0; for (int j = 0; j < array2.Length; j++) { if ((int)array2[j] != (int)val) { array3[num3++] = array2[j]; } } val2 = array3[random.Next(0, array3.Length)]; } round7LocalRandomKeySequence[i] = (KeyCode)(int)val2; val = val2; } try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[Round7AnyWASDMash] actor=" + num2 + " round=" + currentRoundIndex + " target=" + num + " seed=" + seed + " noRepeat=True first=" + KeyCodeToRound7Text(round7LocalRandomKeySequence[0]))); } catch { } } private string KeyCodeToRound7Text(KeyCode key) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Invalid comparison between Unknown and I4 if ((int)key == 119) { return "W"; } if ((int)key == 97) { return "A"; } if ((int)key == 115) { return "S"; } if ((int)key == 100) { return "D"; } return "?"; } private string KeyCodeToRound7ArrowText(KeyCode key) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Invalid comparison between Unknown and I4 //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Invalid comparison between Unknown and I4 if ((int)key == 119) { return "↑"; } if ((int)key == 97) { return "←"; } if ((int)key == 115) { return "↓"; } if ((int)key == 100) { return "→"; } return "?"; } private string GetRound7CurrentArrowText() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return KeyCodeToRound7ArrowText(round7CurrentKey); } private string GetRound7CurrentKeyText() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) return KeyCodeToRound7Text(round7CurrentKey); } private void BeginRound7ButtonMashLocal() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) round7ButtonMashActive = true; round7StartLocalTime = Time.time; round7LocalProgress = 0; round7LocalSubmitted = false; round7LocalRandomKeySequence = (KeyCode[])(object)new KeyCode[0]; round7CurrentKey = (KeyCode)0; try { Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter != (Object)null) { int actorNumber = GetActorNumber(localCharacter); if (actorNumber > 0) { round7ProgressByActor[actorNumber] = 0; } } } catch { } } private void EndRound7ButtonMashLocal() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) round7ButtonMashActive = false; round7LocalSubmitted = false; round7LocalProgress = 0; round7LocalRandomKeySequence = (KeyCode[])(object)new KeyCode[0]; round7CurrentKey = (KeyCode)0; } private void HandleRound7ButtonMashLocalInput() { if (!round7ButtonMashActive || round7LocalSubmitted || currentRoundType != RoundGameType.ButtonMashRace || (Object)(object)Character.localCharacter == (Object)null || (!Input.GetKeyDown((KeyCode)119) && !Input.GetKeyDown((KeyCode)97) && !Input.GetKeyDown((KeyCode)115) && !Input.GetKeyDown((KeyCode)100))) { return; } int num = GetRound7TargetPresses(); round7LocalProgress = Mathf.Clamp(round7LocalProgress + 1, 0, num); int actorNumber = GetActorNumber(Character.localCharacter); if (actorNumber > 0) { round7ProgressByActor[actorNumber] = round7LocalProgress; RaiseMiniGameEvent(120, new object[2] { actorNumber, round7LocalProgress }, (ReceiverGroup)1); } if (round7LocalProgress < num) { return; } round7LocalSubmitted = true; float num2 = Mathf.Max(0f, Time.time - round7StartLocalTime); if (actorNumber > 0) { if (!round7FinishTimes.ContainsKey(actorNumber)) { round7FinishTimes[actorNumber] = num2; } RaiseMiniGameEvent(121, new object[2] { actorNumber, num2 }, (ReceiverGroup)1); } } private void AwardRound7ButtonMashScores() { RefreshActorNamesFromCharacters(); List> list = new List>(); foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer == (Object)null) { continue; } int actorNumber = GetActorNumber(roundPlayer); if (actorNumber > 0) { EnsureActorScoreEntries(actorNumber, GetCharacterDisplayName(roundPlayer)); if (round7FinishTimes.ContainsKey(actorNumber)) { list.Add(new KeyValuePair(actorNumber, round7FinishTimes[actorNumber])); } else { currentRoundScores[actorNumber] = 0; } } } list.Sort((KeyValuePair a, KeyValuePair b) => a.Value.CompareTo(b.Value)); int[] array = new int[4] { 20, 15, 10, 5 }; round7RankByActor.Clear(); for (int i = 0; i < list.Count; i++) { int key = list[i].Key; int num = array[Mathf.Clamp(i, 0, array.Length - 1)]; currentRoundScores[key] = Mathf.Clamp(num, 0, maxRoundScore.Value); currentRoundScoreLocked.Add(key); round7RankByActor[key] = i + 1; } SyncScoresToAll(); } private int GetRound7DynamicRank(int actor) { if (round7RankByActor.ContainsKey(actor)) { return round7RankByActor[actor]; } if (!round7FinishTimes.ContainsKey(actor)) { return 0; } List> list = new List>(round7FinishTimes); list.Sort((KeyValuePair a, KeyValuePair b) => a.Value.CompareTo(b.Value)); for (int i = 0; i < list.Count; i++) { if (list[i].Key == actor) { return i + 1; } } return 0; } [IteratorStateMachine(typeof(d__1194))] private IEnumerator RunRound6ColorSurvivalRoutine(bool testMode) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1194(0) { <>4__this = this, testMode = testMode }; } private Round6CloudColor PickRandomRound6TargetColor() { return (Round6CloudColor)Random.Range(0, 5); } private void AwardRound6SurvivorScoresAfterAllCycles() { LockRound6ScoresAtEnd(); } private void AwardRound6CycleWinner(Character winner) { if (!((Object)(object)winner == (Object)null)) { int actorNumber = GetActorNumber(winner); AwardRound6Actor(actorNumber); } } private float GetRound6AnswerWindowSeconds() { try { if (round6AnswerWindowSeconds != null) { return Mathf.Clamp(round6AnswerWindowSeconds.Value, 0.3f, 5f); } } catch { } return 1f; } private void StartRound6AnswerGaugeToAll(float duration, Round6CloudColor color) { StartRound6AnswerGaugeLocal(duration, color); if (PhotonNetwork.InRoom && IsHostOrOffline()) { RaiseSimpleEvent(118, new object[2] { duration, (int)color }, (ReceiverGroup)0); } } private void StartRound6AnswerGaugeLocal(float duration, Round6CloudColor color) { round6AnswerGaugeActive = true; round6AnswerGaugeStartTime = Time.time; round6AnswerGaugeEndTime = Time.time + Mathf.Max(0.1f, duration); round6AnswerGaugeColor = color; } private void ShowRound6PersonalResultNoticeToAll(HashSet awardedActorsThisCycle) { int[] array = new int[0]; if (awardedActorsThisCycle != null) { List list = new List(awardedActorsThisCycle); list.Sort(); array = list.ToArray(); } object[] data = new object[1] { array }; ApplyRound6PersonalResultNoticeLocal(data); if (PhotonNetwork.InRoom && IsHostOrOffline()) { RaiseSimpleEvent(130, data, (ReceiverGroup)0); } } private void ApplyRound6PersonalResultNoticeLocal(object[] data) { int localActorNumberSafe = GetLocalActorNumberSafe(); bool flag = false; try { int[] array = ((data != null && data.Length >= 1) ? (data[0] as int[]) : null); if (array != null && localActorNumberSafe > 0) { for (int i = 0; i < array.Length; i++) { if (array[i] == localActorNumberSafe) { flag = true; break; } } } } catch { flag = false; } if (flag) { ShowRound6SmallResultNoticeLocal("성공\n+5P"); } else { ShowRound6SmallResultNoticeLocal("실패\n+0P"); } } private void ShowRound6SmallResultNoticeLocal(string text) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) float num = 0.85f; centerNoticeText = text ?? ""; centerNoticeStartTime = Time.time; centerNoticeDuration = num; centerNoticeUntil = Time.time + num; centerNoticeColor = Color.white; centerNoticeThickRounded = false; centerNoticeRoundEndStyle = true; } private int GetLocalActorNumberSafe() { try { if ((Object)(object)Character.localCharacter != (Object)null) { int actorNumber = GetActorNumber(Character.localCharacter); if (actorNumber > 0) { return actorNumber; } } if (PhotonNetwork.LocalPlayer != null) { return PhotonNetwork.LocalPlayer.ActorNumber; } } catch { } return -1; } private ArenaTile FindNearestRound6TileByXZ(Character character) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null || activeTiles == null || activeTiles.Count == 0) { return null; } Vector3 val; try { val = character.Center; } catch { val = ((Component)character).transform.position; } ArenaTile arenaTile = null; float num = float.MaxValue; for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile2 = activeTiles[i]; if (arenaTile2 != null && !((Object)(object)arenaTile2.obj == (Object)null)) { Vector3 position = arenaTile2.position; try { position = arenaTile2.obj.transform.position; } catch { } float num2 = val.x - position.x; float num3 = val.z - position.z; float num4 = num2 * num2 + num3 * num3; if (arenaTile == null || num4 < num) { arenaTile = arenaTile2; num = num4; } } } return arenaTile; } private void AwardRound6PlayersNearestTargetColorAtFinalMoment(Round6CloudColor targetColor, HashSet awardedActorsThisCycle) { if (awardedActorsThisCycle == null) { return; } List list = ((alivePlayers.Count > 0) ? alivePlayers : roundPlayers); for (int i = 0; i < list.Count; i++) { Character val = list[i]; if ((Object)(object)val == (Object)null || (Object)(object)val.data == (Object)null || val.data.dead || val.data.passedOut || val.data.fullyPassedOut) { continue; } int actorNumber = GetActorNumber(val); if (actorNumber > 0 && !awardedActorsThisCycle.Contains(actorNumber)) { ArenaTile arenaTile = FindNearestRound6TileByXZ(val); if (arenaTile != null && round6TileColors.TryGetValue(arenaTile, out var value) && value == targetColor) { AwardRound6Actor(actorNumber); awardedActorsThisCycle.Add(actorNumber); } } } } private void AwardRound6PlayersStandingOnTargetColor(Round6CloudColor targetColor, HashSet awardedActorsThisCycle) { if (awardedActorsThisCycle == null) { return; } List list = ((alivePlayers.Count > 0) ? alivePlayers : roundPlayers); for (int i = 0; i < list.Count; i++) { Character val = list[i]; if ((Object)(object)val == (Object)null || (Object)(object)val.data == (Object)null || val.data.dead || val.data.passedOut || val.data.fullyPassedOut) { continue; } int actorNumber = GetActorNumber(val); if (actorNumber > 0 && !awardedActorsThisCycle.Contains(actorNumber)) { ArenaTile arenaTile = FindStandingTile(val); if (arenaTile != null && round6TileColors.TryGetValue(arenaTile, out var value) && value == targetColor) { AwardRound6Actor(actorNumber); awardedActorsThisCycle.Add(actorNumber); } } } } private void AwardRound6Actor(int actor) { if (actor > 0) { string name = (actorNames.ContainsKey(actor) ? actorNames[actor] : ("Player " + actor)); EnsureActorScoreEntries(actor, name); int value = 0; currentRoundScores.TryGetValue(actor, out value); currentRoundScores[actor] = Mathf.Clamp(value + 5, 0, maxRoundScore.Value); } } private void LockRound6ScoresAtEnd() { RefreshActorNamesFromCharacters(); for (int i = 0; i < roundPlayers.Count; i++) { Character val = roundPlayers[i]; if (!((Object)(object)val == (Object)null)) { int actorNumber = GetActorNumber(val); if (actorNumber > 0) { EnsureActorScoreEntries(actorNumber, GetCharacterDisplayName(val)); int value = 0; currentRoundScores.TryGetValue(actorNumber, out value); currentRoundScores[actorNumber] = Mathf.Clamp(value, 0, maxRoundScore.Value); currentRoundScoreLocked.Add(actorNumber); } } } SyncScoresToAll(); } private Character FindFirstPlayerStandingOnRound6TargetColor(Round6CloudColor targetColor) { for (int i = 0; i < alivePlayers.Count; i++) { Character val = alivePlayers[i]; if (!((Object)(object)val == (Object)null) && !((Object)(object)val.data == (Object)null) && !val.data.dead && !val.data.passedOut && !val.data.fullyPassedOut) { ArenaTile arenaTile = FindStandingTile(val); if (arenaTile != null && round6TileColors.TryGetValue(arenaTile, out var value) && value == targetColor) { return val; } } } return null; } private void AssignRound6RandomCloudColorsAndSync(Round6CloudColor targetColor) { //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) round6TileColors.Clear(); ClearDeadTiles(); CaptureRound6OriginalStateForAllTiles(); List list = new List(); for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && arenaTile.layerIndex == 0) { list.Add(arenaTile); } } Dictionary> dictionary = BuildRound6TwoByTwoTileGroups(list); bool flag = false; List list2 = new List(dictionary.Keys); for (int j = 0; j < list2.Count; j++) { string key = list2[j]; Round6CloudColor round6CloudColor = (Round6CloudColor)Random.Range(0, 5); if (round6CloudColor == targetColor) { flag = true; } List list3 = dictionary[key]; for (int k = 0; k < list3.Count; k++) { round6TileColors[list3[k]] = round6CloudColor; } } if (!flag && list2.Count > 0) { string key2 = list2[Random.Range(0, list2.Count)]; List list4 = dictionary[key2]; for (int l = 0; l < list4.Count; l++) { round6TileColors[list4[l]] = targetColor; } } for (int m = 0; m < list.Count; m++) { ArenaTile arenaTile2 = list[m]; if (arenaTile2 != null && !((Object)(object)arenaTile2.obj == (Object)null) && round6TileColors.ContainsKey(arenaTile2)) { Round6CloudColor round6CloudColor2 = round6TileColors[arenaTile2]; ApplyRound6ColorToTileLocal(arenaTile2, round6CloudColor2); if (PhotonNetwork.InRoom && IsHostOrOffline()) { Vector3 position = arenaTile2.position; RaiseSimpleEvent(115, new object[4] { position.x, position.y, position.z, (int)round6CloudColor2 }, (ReceiverGroup)0); } } } } private Dictionary> BuildRound6TwoByTwoTileGroups(List validTiles) { Dictionary> dictionary = new Dictionary>(); List values = new List(); List values2 = new List(); for (int i = 0; i < validTiles.Count; i++) { ArenaTile arenaTile = validTiles[i]; if (arenaTile != null) { AddUniqueSortedCoordinate(values, arenaTile.position.x); AddUniqueSortedCoordinate(values2, arenaTile.position.z); } } for (int j = 0; j < validTiles.Count; j++) { ArenaTile arenaTile2 = validTiles[j]; if (arenaTile2 != null) { int num = FindNearestCoordinateIndex(values, arenaTile2.position.x); int num2 = FindNearestCoordinateIndex(values2, arenaTile2.position.z); string key = num / 2 + ":" + num2 / 2; if (!dictionary.TryGetValue(key, out var value)) { value = (dictionary[key] = new List()); } value.Add(arenaTile2); } } return dictionary; } private void AddUniqueSortedCoordinate(List values, float value) { for (int i = 0; i < values.Count; i++) { if (Mathf.Abs(values[i] - value) <= 0.08f) { return; } } values.Add(value); values.Sort(); } private int FindNearestCoordinateIndex(List values, float value) { if (values == null || values.Count == 0) { return 0; } int result = 0; float num = Mathf.Abs(values[0] - value); for (int i = 1; i < values.Count; i++) { float num2 = Mathf.Abs(values[i] - value); if (num2 < num) { num = num2; result = i; } } return result; } private void CaptureRound6OriginalStateForAllTiles() { ClearDeadTiles(); for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && arenaTile.layerIndex == 0) { CaptureRound6OriginalState(arenaTile.obj); } } } private void CaptureRound6OriginalState(GameObject obj) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } if (!round6OriginalPositions.ContainsKey(obj)) { round6OriginalPositions[obj] = obj.transform.position; } try { Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); if (componentsInChildren == null) { return; } foreach (Renderer val in componentsInChildren) { if (!((Object)(object)val == (Object)null) && !(((object)val).GetType().Name == "ParticleSystemRenderer") && !round6OriginalRendererMaterials.ContainsKey(val)) { Material[] sharedMaterials = val.sharedMaterials; if (sharedMaterials != null) { Material[] array = (Material[])(object)new Material[sharedMaterials.Length]; Array.Copy(sharedMaterials, array, sharedMaterials.Length); round6OriginalRendererMaterials[val] = array; } } } } catch { } } private void RestoreRound6AllTilesAndSync() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && arenaTile.layerIndex == 0) { if (!round6OriginalPositions.TryGetValue(arenaTile.obj, out var value)) { value = arenaTile.position; } RestoreRound6TileObjectLocal(arenaTile.obj, value.y); if (PhotonNetwork.InRoom && IsHostOrOffline()) { Vector3 position = arenaTile.position; RaiseSimpleEvent(117, new object[4] { position.x, position.y, position.z, value.y }, (ReceiverGroup)0); } } } round6TileColors.Clear(); } private void RestoreRound6TileAtPositionLocal(Vector3 position, float restoreY) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject found = FindBestCloudWarningTintTarget(position); GameObject val = ResolveRound6MovableTileRoot(found, position); if (!((Object)(object)val == (Object)null)) { RestoreRound6TileObjectLocal(val, restoreY); } } private void RestoreRound6TileObjectLocal(GameObject obj, float restoreY) { if (!((Object)(object)obj == (Object)null)) { CaptureRound6OriginalState(obj); RestoreRound6OriginalMaterialsLocal(obj); StartLowerTileObjectLocal(obj, restoreY, 1f); } } private void RestoreRound6OriginalMaterialsLocal(GameObject obj) { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Expected O, but got Unknown if ((Object)(object)obj == (Object)null) { return; } try { Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); if (componentsInChildren == null) { return; } foreach (Renderer val in componentsInChildren) { if (!((Object)(object)val == (Object)null) && !(((object)val).GetType().Name == "ParticleSystemRenderer")) { if (round6OriginalRendererMaterials.TryGetValue(val, out var value) && value != null) { Material[] array = (Material[])(object)new Material[value.Length]; Array.Copy(value, array, value.Length); val.sharedMaterials = array; } try { val.SetPropertyBlock(new MaterialPropertyBlock()); } catch { } } } } catch { } } private string GetRound6ColorName(Round6CloudColor color) { return color switch { Round6CloudColor.Green => "초록", Round6CloudColor.Yellow => "노랑", Round6CloudColor.Orange => "주황", Round6CloudColor.Purple => "보라", _ => "빨강", }; } private Color GetRound6ColorValue(Round6CloudColor color) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) return (Color)(color switch { Round6CloudColor.Green => new Color(0.05f, 0.95f, 0.18f, 1f), Round6CloudColor.Yellow => new Color(1f, 0.92f, 0.02f, 1f), Round6CloudColor.Orange => new Color(1f, 0.48f, 0.02f, 1f), Round6CloudColor.Purple => new Color(0.62f, 0.16f, 1f, 1f), _ => new Color(1f, 0.03f, 0.01f, 1f), }); } private float GetRound6Emission(Round6CloudColor color) { return color switch { Round6CloudColor.Green => 2f, Round6CloudColor.Yellow => 1.8f, Round6CloudColor.Orange => 2.4f, Round6CloudColor.Purple => 2.6f, _ => 3f, }; } private void LowerRound6NonTargetTilesAndSync(Round6CloudColor targetColor) { //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); int num = 0; float[] array = new float[5] { 49f, 48f, 47f, 46f, 45f }; for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && arenaTile.layerIndex == 0 && round6TileColors.TryGetValue(arenaTile, out var value) && value != targetColor) { CaptureRound6OriginalState(arenaTile.obj); float num2 = array[num % array.Length]; num++; StartLowerTileObjectLocal(arenaTile.obj, num2, 1f); if (PhotonNetwork.InRoom && IsHostOrOffline()) { Vector3 position = arenaTile.position; RaiseSimpleEvent(116, new object[5] { position.x, position.y, position.z, num2, 1f }, (ReceiverGroup)0); } } } } private GameObject FindRound6TileRootAtPositionLocal(Vector3 position) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); ArenaTile arenaTile = null; float num = float.MaxValue; for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile2 = activeTiles[i]; if (arenaTile2 != null && !((Object)(object)arenaTile2.obj == (Object)null) && arenaTile2.layerIndex == 0) { Vector3 position2 = arenaTile2.position; float num2 = position2.x - position.x; float num3 = position2.z - position.z; float num4 = position2.y - position.y; float num5 = num2 * num2 + num3 * num3 + num4 * num4 * 0.05f; if (num5 < num) { num = num5; arenaTile = arenaTile2; } } } float num6 = Mathf.Max(2.5f, cloudRoundSpacing.Value * 0.65f); if (arenaTile != null && Mathf.Sqrt(num) <= num6) { return arenaTile.obj; } return null; } private GameObject ResolveRound6MovableTileRoot(GameObject found, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) GameObject val = FindRound6TileRootAtPositionLocal(position); if ((Object)(object)val != (Object)null) { return val; } if ((Object)(object)found == (Object)null) { return null; } try { PhotonView componentInParent = found.GetComponentInParent(); if ((Object)(object)componentInParent != (Object)null && (Object)(object)((Component)componentInParent).gameObject != (Object)null) { return ((Component)componentInParent).gameObject; } } catch { } return found; } private void ApplyRound6ColorToTileLocal(ArenaTile tile, Round6CloudColor color) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (tile != null && !((Object)(object)tile.obj == (Object)null)) { CaptureRound6OriginalState(tile.obj); ApplyCloudWarningSolidMaterialToObjectLocal(tile.obj, GetRound6ColorValue(color), GetRound6Emission(color)); } } private void ApplyRound6ColorAtPositionLocal(Vector3 position, Round6CloudColor color) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) GameObject found = FindBestCloudWarningTintTarget(position); GameObject val = ResolveRound6MovableTileRoot(found, position); if (!((Object)(object)val == (Object)null)) { CaptureRound6OriginalState(val); ApplyCloudWarningSolidMaterialToObjectLocal(val, GetRound6ColorValue(color), GetRound6Emission(color)); } } private void StartLowerTileAtPositionLocal(Vector3 position, float targetY, float duration) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) GameObject found = FindBestCloudWarningTintTarget(position); GameObject val = ResolveRound6MovableTileRoot(found, position); if (!((Object)(object)val == (Object)null)) { StartLowerTileObjectLocal(val, targetY, duration); } } private void StartLowerTileObjectLocal(GameObject obj, float targetY, float duration) { if ((Object)(object)obj == (Object)null) { return; } if (activeTileLowerRoutines.TryGetValue(obj, out var value) && value != null) { try { ((MonoBehaviour)this).StopCoroutine(value); } catch { } } activeTileLowerRoutines[obj] = ((MonoBehaviour)this).StartCoroutine(LowerTileObjectRoutine(obj, targetY, Mathf.Max(0.05f, duration))); } [IteratorStateMachine(typeof(d__1231))] private IEnumerator LowerTileObjectRoutine(GameObject obj, float targetY, float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1231(0) { <>4__this = this, obj = obj, targetY = targetY, duration = duration }; } private void SetTileObjectWorldPosition(GameObject obj, Vector3 position) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } try { Rigidbody component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.position = position; component.MovePosition(position); } } catch { } obj.transform.position = position; } private void ClearActiveTileLowerRoutines() { foreach (Coroutine value in activeTileLowerRoutines.Values) { if (value != null) { try { ((MonoBehaviour)this).StopCoroutine(value); } catch { } } } activeTileLowerRoutines.Clear(); } [IteratorStateMachine(typeof(d__1234))] private IEnumerator Round1OuterCloudCollapseRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1234(0) { <>4__this = this }; } private float GetRound1EdgeCollapseIntervalSeconds() { return 10f; } private float GetRound1EdgeCollapseWarningSeconds() { return 10f; } [IteratorStateMachine(typeof(d__1237))] private IEnumerator DeleteRound1MarkedTileAfterWarningRoutine(ArenaTile tile, float warningSeconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1237(0) { <>4__this = this, tile = tile, warningSeconds = warningSeconds }; } private void DeleteRound1MarkedTileNow(ArenaTile tile) { pendingStandingTileDeletes.Remove(tile); if (gameState == GameState.Running && currentRoundType == RoundGameType.CloudDynamite && tile != null && !((Object)(object)tile.obj == (Object)null) && activeTiles.Contains(tile)) { RemoveTile(tile); } } private List PickCurrentOuterCloudTileRowForCollapse() { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); float num = Mathf.Min(arenaStartX.Value, arenaEndX.Value); float num2 = Mathf.Max(arenaStartX.Value, arenaEndX.Value); float num3 = ForcedArenaMinZ(); float num4 = ForcedArenaMaxZ(); float num5 = Mathf.Max(0.5f, cloudRoundSpacing.Value); int num6 = int.MaxValue; List list = new List(); for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && arenaTile.layerIndex == 0 && !pendingStandingTileDeletes.Contains(arenaTile)) { Vector3 position = arenaTile.position; float num7 = Mathf.Min(new float[4] { Mathf.Abs(position.x - num), Mathf.Abs(num2 - position.x), Mathf.Abs(position.z - num3), Mathf.Abs(num4 - position.z) }); int num8 = Mathf.Max(0, Mathf.RoundToInt(num7 / num5)); if (num8 < num6) { num6 = num8; list.Clear(); list.Add(arenaTile); } else if (num8 == num6) { list.Add(arenaTile); } } } if (list.Count > 0) { return list; } List list2 = new List(); for (int j = 0; j < activeTiles.Count; j++) { ArenaTile arenaTile2 = activeTiles[j]; if (arenaTile2 != null && (Object)(object)arenaTile2.obj != (Object)null && !pendingStandingTileDeletes.Contains(arenaTile2)) { list2.Add(arenaTile2); } } return list2; } private ArenaTile PickNextOuterCloudTileForCollapse() { List list = PickCurrentOuterCloudTileRowForCollapse(); if (list != null && list.Count > 0) { return list[Random.Range(0, list.Count)]; } return null; } [IteratorStateMachine(typeof(d__1241))] private IEnumerator StandingTileDeleteRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1241(0) { <>4__this = this }; } private float GetStandingTileStartDelayForCurrentRound() { if (currentRoundType == RoundGameType.DoubleCloudCoconut) { return Mathf.Max(0f, round4StandingTileStartDelay.Value); } return Mathf.Max(0f, round1EdgeCollapseStartDelay.Value); } private void MarkStandingTilesToAlivePlayers() { ClearDeadTiles(); if (activeTiles.Count == 0) { return; } for (int i = 0; i < alivePlayers.Count; i++) { Character val = alivePlayers[i]; if (!((Object)(object)val == (Object)null) && !((Object)(object)val.data == (Object)null) && !val.data.dead && !val.data.passedOut && !val.data.fullyPassedOut) { ArenaTile arenaTile = FindStandingTile(val); if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && !pendingStandingTileDeletes.Contains(arenaTile)) { pendingStandingTileDeletes.Add(arenaTile); ((MonoBehaviour)this).StartCoroutine(DeleteMarkedTileAfterDelayRoutine(arenaTile, cloudStandingTileDeleteDelay.Value)); } } } } private ArenaTile FindStandingTile(Character character) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return null; } Vector3 val; try { val = character.Center; } catch { val = ((Component)character).transform.position; } Vector3[] array = (Vector3[])(object)new Vector3[5] { Vector3.zero, Vector3.forward * 0.55f, Vector3.back * 0.55f, Vector3.left * 0.55f, Vector3.right * 0.55f }; RaycastHit val3 = default(RaycastHit); for (int i = 0; i < array.Length; i++) { Vector3 val2 = val + Vector3.up * 1f + array[i]; if (Physics.Raycast(val2, Vector3.down, ref val3, Mathf.Max(1f, standingTileRayDistance.Value), -1, (QueryTriggerInteraction)1)) { ArenaTile arenaTile = FindTileByHitObject(((Object)(object)((RaycastHit)(ref val3)).collider != (Object)null) ? ((Component)((RaycastHit)(ref val3)).collider).gameObject : null); if (arenaTile != null) { return arenaTile; } } } return null; } private ArenaTile FindTileByHitObject(GameObject hitObject) { if ((Object)(object)hitObject == (Object)null) { return null; } Transform val = hitObject.transform; while ((Object)(object)val != (Object)null) { for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && (Object)(object)((Component)val).gameObject == (Object)(object)arenaTile.obj) { return arenaTile; } } val = val.parent; } return null; } [IteratorStateMachine(typeof(d__1246))] private IEnumerator DeleteMarkedTileAfterDelayRoutine(ArenaTile tile, float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1246(0) { <>4__this = this, tile = tile, delay = delay }; } private void StartCloudWarningTintAtPositionLocal(Vector3 position, float warningSeconds) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) GameObject val = FindBestCloudWarningTintTarget(position); if ((Object)(object)val != (Object)null) { StartCloudWarningTintToObjectLocal(val, warningSeconds); } } private GameObject FindBestCloudWarningTintTarget(Vector3 position) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) ArenaTile arenaTile = null; float num = 999999f; Vector3 val; for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile2 = activeTiles[i]; if (arenaTile2 != null && !((Object)(object)arenaTile2.obj == (Object)null)) { val = arenaTile2.position - position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; arenaTile = arenaTile2; } } } if (arenaTile != null && num <= 16f) { return arenaTile.obj; } GameObject val2 = null; num = 999999f; Collider[] array = Physics.OverlapSphere(position, 4.5f, -1, (QueryTriggerInteraction)2); foreach (Collider val3 in array) { if ((Object)(object)val3 == (Object)null) { continue; } Transform val4 = ((Component)val3).transform; int num2 = 0; while ((Object)(object)val4 != (Object)null && num2 < 6) { Renderer[] componentsInChildren = ((Component)val4).GetComponentsInChildren(true); if (componentsInChildren != null && componentsInChildren.Length != 0 && LooksLikeCloudTileCandidate(((Component)val4).gameObject, componentsInChildren, position)) { val = GetRendererGroupCenter(componentsInChildren, val4.position) - position; float sqrMagnitude2 = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude2 < num) { num = sqrMagnitude2; val2 = ((Component)val4).gameObject; } } num2++; val4 = val4.parent; } } if ((Object)(object)val2 != (Object)null && num <= 25f) { return val2; } Renderer[] array2 = Object.FindObjectsOfType(true); foreach (Renderer val5 in array2) { if ((Object)(object)val5 == (Object)null || ((object)val5).GetType().Name == "ParticleSystemRenderer" || ((Object)(object)((Component)val5).gameObject != (Object)null && ((Object)((Component)val5).gameObject).name == "100sec_OrangeWarningOverlay") || !val5.enabled) { continue; } Bounds bounds = val5.bounds; Vector3 center = ((Bounds)(ref bounds)).center; val = center - position; float sqrMagnitude3 = ((Vector3)(ref val)).sqrMagnitude; if (!(sqrMagnitude3 > 25f)) { GameObject gameObject = ((Component)val5).gameObject; Renderer[] componentsInChildren2 = gameObject.GetComponentsInChildren(true); if (LooksLikeCloudTileCandidate(gameObject, (Renderer[])((componentsInChildren2 != null && componentsInChildren2.Length != 0) ? ((Array)componentsInChildren2) : ((Array)new Renderer[1] { val5 })), position) && sqrMagnitude3 < num) { num = sqrMagnitude3; val2 = gameObject; } } } return val2; } private Vector3 GetRendererGroupCenter(Renderer[] renderers, Vector3 fallback) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (renderers == null || renderers.Length == 0) { return fallback; } Bounds val = default(Bounds); bool flag = false; foreach (Renderer val2 in renderers) { if (!((Object)(object)val2 == (Object)null) && !(((object)val2).GetType().Name == "ParticleSystemRenderer")) { if (!flag) { val = val2.bounds; flag = true; } else { ((Bounds)(ref val)).Encapsulate(val2.bounds); } } } return flag ? ((Bounds)(ref val)).center : fallback; } private bool LooksLikeCloudTileCandidate(GameObject obj, Renderer[] renderers, Vector3 position) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null || renderers == null || renderers.Length == 0) { return false; } string text = ((Object)obj).name.ToLowerInvariant(); bool flag = text.Contains("cloud") || text.Contains("fung") || text.Contains("mush") || text.Contains("tile") || text.Contains("shroom") || text.Contains("spore") || text.Contains("100sec"); Vector3 val = GetRendererGroupCenter(renderers, obj.transform.position) - position; if (!(((Vector3)(ref val)).sqrMagnitude <= 25f)) { return false; } if (flag) { return true; } if (TryGetRendererBounds(obj, out var bounds)) { float num = Mathf.Max(((Bounds)(ref bounds)).size.x, ((Bounds)(ref bounds)).size.z); return num >= 0.5f && num <= 8f && ((Bounds)(ref bounds)).size.y <= 8f; } return true; } private void StartCloudWarningTintToTileLocal(ArenaTile tile, float warningSeconds) { if (tile != null && !((Object)(object)tile.obj == (Object)null)) { StartCloudWarningTintToObjectLocal(tile.obj, warningSeconds); } } private void StartCloudWarningTintToObjectLocal(GameObject obj, float warningSeconds) { if ((Object)(object)obj == (Object)null) { return; } if (activeCloudWarningTintRoutines.TryGetValue(obj, out var value) && value != null) { try { ((MonoBehaviour)this).StopCoroutine(value); } catch { } } activeCloudWarningTintRoutines[obj] = ((MonoBehaviour)this).StartCoroutine(CloudWarningTintRoutine(obj, Mathf.Max(0.5f, warningSeconds))); } private void ApplyWarningColorToMaterial(Material mat, Color color, Color emission) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mat == (Object)null) { return; } try { if (mat.HasProperty("_Color")) { mat.color = color; } for (int i = 0; i < WarningColorProperties.Length; i++) { string text = WarningColorProperties[i]; if (mat.HasProperty(text)) { mat.SetColor(text, (text == "_EmissionColor" || text == "_EmissiveColor") ? emission : color); } } if (mat.HasProperty("_EmissionColor") || mat.HasProperty("_EmissiveColor")) { mat.EnableKeyword("_EMISSION"); } if (mat.HasProperty("_UseEmission")) { mat.SetFloat("_UseEmission", 1f); } if (mat.HasProperty("_EmissionEnabled")) { mat.SetFloat("_EmissionEnabled", 1f); } if (mat.HasProperty("_Smoothness")) { mat.SetFloat("_Smoothness", 0.15f); } if (mat.HasProperty("_Metallic")) { mat.SetFloat("_Metallic", 0f); } } catch { } } private Material CreateSolidWarningMaterial(Color color, float emissionStrength) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) Shader val = Shader.Find("Unlit/Color"); if ((Object)(object)val == (Object)null) { val = Shader.Find("Sprites/Default"); } if ((Object)(object)val == (Object)null) { val = Shader.Find("Standard"); } Material val2 = (((Object)(object)val != (Object)null) ? new Material(val) : new Material(Shader.Find("Standard"))); Color val3 = color * Mathf.Max(1f, emissionStrength); ApplyWarningColorToMaterial(val2, color, val3); if (val2.HasProperty("_Color")) { val2.color = color; } if (val2.HasProperty("_BaseColor")) { val2.SetColor("_BaseColor", color); } if (val2.HasProperty("_EmissionColor")) { val2.EnableKeyword("_EMISSION"); val2.SetColor("_EmissionColor", val3); } return val2; } private void ApplyCloudWarningSolidMaterialToObjectLocal(GameObject obj, Color color, float emissionStrength) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); if (componentsInChildren == null) { return; } Color emission = color * Mathf.Max(1f, emissionStrength); MaterialPropertyBlock val = new MaterialPropertyBlock(); foreach (Renderer val2 in componentsInChildren) { if ((Object)(object)val2 == (Object)null || ((object)val2).GetType().Name == "ParticleSystemRenderer" || ((Object)(object)((Component)val2).gameObject != (Object)null && ((Object)((Component)val2).gameObject).name == "100sec_OrangeWarningOverlay")) { continue; } try { int num = Mathf.Max(1, (val2.sharedMaterials == null) ? 1 : val2.sharedMaterials.Length); Material[] array = (Material[])(object)new Material[num]; for (int j = 0; j < num; j++) { array[j] = CreateSolidWarningMaterial(color, emissionStrength); } val2.materials = array; } catch { try { Material material = val2.material; if ((Object)(object)material != (Object)null) { ApplyWarningColorToMaterial(material, color, emission); } } catch { } } try { val2.GetPropertyBlock(val); ApplyWarningColorToPropertyBlock(val, color, emission); val2.SetPropertyBlock(val); } catch { } } } private void ApplyRound4StyleCloudTintToObjectLocal(GameObject obj, Color color, float emissionStrength) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) ApplyCloudWarningSolidMaterialToObjectLocal(obj, color, emissionStrength); } private void ApplyWarningColorToPropertyBlock(MaterialPropertyBlock block, Color color, Color emission) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (block == null) { return; } try { for (int i = 0; i < WarningColorProperties.Length; i++) { string text = WarningColorProperties[i]; block.SetColor(text, (text == "_EmissionColor" || text == "_EmissiveColor") ? emission : color); } block.SetFloat("_UseEmission", 1f); block.SetFloat("_EmissionEnabled", 1f); } catch { } } [IteratorStateMachine(typeof(d__1259))] private IEnumerator CloudWarningTintRoutine(GameObject obj, float warningSeconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1259(0) { <>4__this = this, obj = obj, warningSeconds = warningSeconds }; } private void ApplyOrangeWarningTintToTileLocal(ArenaTile tile) { if (tile != null && !((Object)(object)tile.obj == (Object)null)) { ApplyOrangeWarningTintToObjectLocal(tile.obj); } } private void ApplyOrangeWarningTintToObjectLocal(GameObject obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)obj == (Object)null)) { ApplyCloudWarningSolidMaterialToObjectLocal(obj, new Color(1f, 0.48f, 0.02f, 1f), 2.6f); } } private void CreateVisibleOrangeWarningOverlay(GameObject obj) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Transform val = obj.transform.Find("100sec_OrangeWarningOverlay"); if ((Object)(object)val != (Object)null) { return; } if (!TryGetRendererBounds(obj, out var bounds)) { ((Bounds)(ref bounds))..ctor(obj.transform.position, new Vector3(2.3f, 0.2f, 2.3f)); } GameObject val2 = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)val2).name = "100sec_OrangeWarningOverlay"; val2.transform.SetParent(obj.transform, true); val2.transform.position = new Vector3(((Bounds)(ref bounds)).center.x, ((Bounds)(ref bounds)).max.y + 0.035f, ((Bounds)(ref bounds)).center.z); val2.transform.rotation = Quaternion.identity; val2.transform.localScale = new Vector3(Mathf.Max(1.2f, ((Bounds)(ref bounds)).size.x * 0.92f), 0.045f, Mathf.Max(1.2f, ((Bounds)(ref bounds)).size.z * 0.92f)); Collider component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } Renderer component2 = val2.GetComponent(); if ((Object)(object)component2 != (Object)null) { Shader val3 = Shader.Find("Unlit/Color"); if ((Object)(object)val3 == (Object)null) { val3 = Shader.Find("Sprites/Default"); } if ((Object)(object)val3 == (Object)null) { val3 = Shader.Find("Standard"); } Material val4 = new Material(val3); Color val5 = default(Color); ((Color)(ref val5))..ctor(1f, 0.42f, 0.02f, 0.92f); if (val4.HasProperty("_Color")) { val4.color = val5; } if (val4.HasProperty("_BaseColor")) { val4.SetColor("_BaseColor", val5); } if (val4.HasProperty("_EmissionColor")) { val4.EnableKeyword("_EMISSION"); val4.SetColor("_EmissionColor", new Color(1f, 0.25f, 0f, 1f) * 2.2f); } component2.material = val4; component2.shadowCastingMode = (ShadowCastingMode)0; component2.receiveShadows = false; } ((MonoBehaviour)this).StartCoroutine(DestroyObjectAfterSecondsRoutine(val2, Mathf.Max(0.35f, cloudStandingTileDeleteDelay.Value + 0.2f))); } private bool TryGetRendererBounds(GameObject obj, out Bounds bounds) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) bounds = default(Bounds); if ((Object)(object)obj == (Object)null) { return false; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); bool flag = false; foreach (Renderer val in componentsInChildren) { if (!((Object)(object)val == (Object)null) && !(((Object)((Component)val).gameObject).name == "100sec_OrangeWarningOverlay")) { if (!flag) { bounds = val.bounds; flag = true; } else { ((Bounds)(ref bounds)).Encapsulate(val.bounds); } } } return flag; } [IteratorStateMachine(typeof(d__1264))] private IEnumerator DestroyObjectAfterSecondsRoutine(GameObject obj, float seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1264(0) { <>4__this = this, obj = obj, seconds = seconds }; } private void HandlePodiumTeleportComparisonTestInput() { } [IteratorStateMachine(typeof(d__1266))] private IEnumerator PodiumTeleportComparisonTestRoutine(bool useAssisted) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1266(0) { <>4__this = this, useAssisted = useAssisted }; } [IteratorStateMachine(typeof(d__1267))] private IEnumerator DestroyPodiumTeleportTestObjectAfterSecondsRoutine(GameObject obj, float seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1267(0) { <>4__this = this, obj = obj, seconds = seconds }; } internal bool ShouldSuppressTeleportAssistForPureOriginalPodiumTest(Character character, Vector3 position) { return false; } internal bool ShouldUseAssistedPodiumTeleportTest(Character character, Vector3 position) { return false; } [IteratorStateMachine(typeof(d__1272))] private IEnumerator SpawnRoundResultPodiumsForGameRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1272(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__1273))] private IEnumerator EnsureRoundResultPodiumsExistRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1273(0) { <>4__this = this }; } private bool TryGetObjectBounds(GameObject obj, out Bounds bounds) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) bounds = default(Bounds); if ((Object)(object)obj == (Object)null) { return false; } bool flag = false; Collider[] componentsInChildren = obj.GetComponentsInChildren(true); foreach (Collider val in componentsInChildren) { if (!((Object)(object)val == (Object)null) && val.enabled) { if (!flag) { bounds = val.bounds; flag = true; } else { ((Bounds)(ref bounds)).Encapsulate(val.bounds); } } } Renderer[] componentsInChildren2 = obj.GetComponentsInChildren(true); foreach (Renderer val2 in componentsInChildren2) { if (!((Object)(object)val2 == (Object)null)) { if (!flag) { bounds = val2.bounds; flag = true; } else { ((Bounds)(ref bounds)).Encapsulate(val2.bounds); } } } return flag; } private Vector3 GetRoundResultPodiumTeleportPositionForRank(int rank) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.Clamp(rank, 0, RoundResultPodiumTeleportPositionsByRank.Length - 1); return RoundResultPodiumTeleportPositionsByRank[num]; } private void ClearRoundResultPodiums() { for (int num = roundResultPodiumObjects.Count - 1; num >= 0; num--) { GameObject val = roundResultPodiumObjects[num]; if ((Object)(object)val == (Object)null) { roundResultPodiumObjects.RemoveAt(num); } else { try { PhotonView component = val.GetComponent(); if ((Object)(object)component != (Object)null && PhotonNetwork.InRoom && IsHostOrOffline()) { PhotonNetwork.Destroy(val); } else if (!PhotonNetwork.InRoom) { Object.Destroy((Object)(object)val); } } catch { try { Object.Destroy((Object)(object)val); } catch { } } roundResultPodiumObjects.RemoveAt(num); } } } private List GetRoundPlayersRankedByCurrentRoundScore() { RefreshActorNamesFromCharacters(); List list = new List(); foreach (Character roundPlayer in roundPlayers) { if ((Object)(object)roundPlayer != (Object)null && !list.Contains(roundPlayer)) { list.Add(roundPlayer); } } foreach (Character allCharacter in Character.AllCharacters) { if ((Object)(object)allCharacter != (Object)null && !list.Contains(allCharacter)) { list.Add(allCharacter); } } list.Sort(delegate(Character a, Character b) { int actorNumber = GetActorNumber(a); int actorNumber2 = GetActorNumber(b); int value = 0; int value2 = 0; currentRoundScores.TryGetValue(actorNumber, out value); currentRoundScores.TryGetValue(actorNumber2, out value2); int num = value2.CompareTo(value); return (num != 0) ? num : actorNumber.CompareTo(actorNumber2); }); return list; } private void TeleportRoundPlayersToRoundResultPodiums(bool allowReviveDeadPlayers) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) roundEndTeleportWindow = true; try { List roundPlayersRankedByCurrentRoundScore = GetRoundPlayersRankedByCurrentRoundScore(); int num = Mathf.Min(4, roundPlayersRankedByCurrentRoundScore.Count); for (int i = 0; i < num; i++) { Character val = roundPlayersRankedByCurrentRoundScore[i]; if (!((Object)(object)val == (Object)null)) { Vector3 roundResultPodiumTeleportPositionForRank = GetRoundResultPodiumTeleportPositionForRank(i); MoveCharacterToResultPodiumNetworked(val, roundResultPodiumTeleportPositionForRank, allowReviveDeadPlayers); } } } finally { roundEndTeleportWindow = false; } } private void MoveCharacterToResultPodiumNetworked(Character character, Vector3 pos, bool allowReviveDeadPlayers) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return; } int actorNumber = GetActorNumber(character); bool flag = actorNumber > 0 && actorsNeedingReviveAtRoundEnd.Contains(actorNumber); if ((NeedsRevive(character) || flag) && allowReviveDeadPlayers) { PrepareCharacterForNewRound(character); TeleportCharacter(character, pos); return; } if (!NeedsRevive(character)) { PrepareLivingCharacterForNewPhase(character); } else { PrepareCharacterForNewRound(character); } TeleportCharacter(character, pos); } private bool ShouldReviveDeadPlayersAtRoundEnd(RoundGameType roundType) { return roundType == RoundGameType.CloudDynamite || roundType == RoundGameType.DoubleCloudCoconut; } private void CaptureBeachStartPositionsIfNeeded() { savedBeachStartPositions.Clear(); } private void ReviveAndTeleportRoundPlayersToBeachStart(bool allowReviveDeadPlayers) { savedBeachStartPositions.Clear(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"[TeleportGuard] Legacy beach return revive teleport removed completely. Round-end teleport is podium-only."); } private void TeleportAllRoundPlayersToBeachStartNoRevive() { savedBeachStartPositions.Clear(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"[TeleportGuard] Legacy beach return teleport removed completely. No fallback beach warp will be used."); } private void TeleportRoundPlayersToSafeArenaTiles(RoundGameType roundType) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); if (activeTiles.Count == 0) { ((BaseUnityPlugin)this).Logger.LogWarning((object)"TeleportRoundPlayersToSafeArenaTiles skipped: activeTiles is empty. This prevents occasional wrong-position warps."); return; } roundStartTeleportWindow = true; try { List list = PickSafeSpawnTilesForPlayers(roundPlayers.Count, roundType); for (int i = 0; i < roundPlayers.Count; i++) { Character val = roundPlayers[i]; if (!((Object)(object)val == (Object)null)) { ArenaTile arenaTile = list[Mathf.Clamp(i, 0, list.Count - 1)]; Vector3 pos = arenaTile.position + Vector3.up * Mathf.Max(1f, playerTeleportYOffset.Value); MoveCharacterForNextPhaseNetworked(val, pos); } } } finally { roundStartTeleportWindow = false; } } private float GetSpawnYForRound(RoundGameType roundType) { if (roundType == RoundGameType.DoubleCloudCoconut) { return round4UpperArenaY.Value; } return arenaY.Value; } private Vector3 GetArenaCenterPosition(float y) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) return new Vector3((arenaStartX.Value + arenaEndX.Value) * 0.5f, y, -310f); } private List PickSafeSpawnTilesForPlayers(int playerCount, RoundGameType roundType) { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); List list = new List(); int num = ((roundType == RoundGameType.DoubleCloudCoconut) ? 1 : 0); for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && (roundType != RoundGameType.DoubleCloudCoconut || arenaTile.layerIndex == num)) { list.Add(arenaTile); } } if (list.Count == 0) { list.AddRange(activeTiles); } List list2 = new List(); if (list.Count == 0) { return list2; } Vector3[] desiredSpawnReferencePositions = GetDesiredSpawnReferencePositions(GetSpawnYForRound(roundType)); for (int j = 0; j < playerCount; j++) { Vector3 desired = desiredSpawnReferencePositions[Mathf.Clamp(j, 0, desiredSpawnReferencePositions.Length - 1)]; ArenaTile arenaTile2 = FindNearestUnusedTileInList(desired, list2, list); if (arenaTile2 != null) { list2.Add(arenaTile2); } } if (list2.Count == 0) { list2.Add(list[0]); } while (list2.Count < playerCount) { ArenaTile arenaTile3 = FindFarthestUnusedTileFromSelectedInList(list2, list); if (arenaTile3 != null) { list2.Add(arenaTile3); } else { list2.Add(list2[0]); } } return list2; } private Vector3[] GetDesiredSpawnReferencePositions(float y) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Min(arenaStartX.Value, arenaEndX.Value); float num2 = Mathf.Max(arenaStartX.Value, arenaEndX.Value); float num3 = ForcedArenaMinZ(); float num4 = ForcedArenaMaxZ(); return (Vector3[])(object)new Vector3[4] { new Vector3(num, y, num3), new Vector3(num2, y, num3), new Vector3(num, y, num4), new Vector3(num2, y, num4) }; } private ArenaTile FindNearestUnusedTileInList(Vector3 desired, List used, List candidates) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) ArenaTile result = null; float num = float.MaxValue; for (int i = 0; i < candidates.Count; i++) { ArenaTile arenaTile = candidates[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null) && !used.Contains(arenaTile)) { Vector3 val = arenaTile.position - desired; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; result = arenaTile; } } } return result; } private ArenaTile FindFarthestUnusedTileFromSelectedInList(List selected, List candidates) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) ArenaTile result = null; float num = -1f; for (int i = 0; i < candidates.Count; i++) { ArenaTile arenaTile = candidates[i]; if (arenaTile == null || (Object)(object)arenaTile.obj == (Object)null || selected.Contains(arenaTile)) { continue; } float num2 = float.MaxValue; for (int j = 0; j < selected.Count; j++) { if (selected[j] != null) { Vector3 val = arenaTile.position - selected[j].position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; } } } if (num2 > num) { num = num2; result = arenaTile; } } return result; } private void ReviveCharacterNetworked(Character character) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)character == (Object)null)) { Vector3 pos; try { pos = character.Center + Vector3.up * 2f; } catch { pos = ((Component)character).transform.position + Vector3.up * 2f; } ReviveAndTeleportCharacterNetworked(character, pos); } } private bool NeedsRevive(Character character) { if ((Object)(object)character == (Object)null) { return false; } try { if ((Object)(object)character.data == (Object)null) { return false; } return character.data.dead || character.data.passedOut || character.data.fullyPassedOut; } catch { return false; } } private void MoveCharacterForNextPhaseNetworked(Character character, Vector3 pos, bool allowReviveDeadPlayers = false) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return; } if (NeedsRevive(character)) { if (allowReviveDeadPlayers) { ReviveAndTeleportCharacterNetworked(character, pos); } else { TeleportCharacter(character, pos); } } else { PrepareLivingCharacterForNewPhase(character); TeleportCharacter(character, pos); } } private void ReviveAndTeleportCharacterNetworked(Character character, Vector3 pos) { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)character == (Object)null)) { if (!IsAllowedTeleportWindow()) { LogBlockedUnexpectedTeleport("ReviveAndTeleportCharacterNetworked", pos); return; } PrepareCharacterForNewRound(character); TeleportCharacter(character, pos); } } [IteratorStateMachine(typeof(d__1295))] private IEnumerator ScoutDollReviveRetryRoutine(Character character, Vector3 pos, int reviveSegment) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1295(0) { <>4__this = this, character = character, pos = pos, reviveSegment = reviveSegment }; } private int GetCurrentReviveSegmentNumber() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) try { return Convert.ToInt32(MapHandler.CurrentSegmentNumber); } catch { } try { return Convert.ToInt32((object)(Segment)0); } catch { } return 0; } private void HandleRound6FallRescueTeleportIfNeeded() { //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) if (gameState != GameState.Running || currentRoundType != RoundGameType.ColorCloudSurvival || !IsHostOrOffline() || roundPlayers == null || roundPlayers.Count == 0) { return; } Vector3 round6CenterRescuePosition = GetRound6CenterRescuePosition(); for (int i = 0; i < roundPlayers.Count; i++) { Character val = roundPlayers[i]; if ((Object)(object)val == (Object)null || (Object)(object)val.data == (Object)null || val.inAirport || val.data.dead || val.data.fullyPassedOut) { continue; } Vector3 val2; try { val2 = val.Center; } catch { try { val2 = ((Component)val).transform.position; goto end_IL_00ed; } catch { } continue; end_IL_00ed:; } if (val2.y > 48f) { continue; } int actorNumber = GetActorNumber(val); if (!round6FallRescueCooldownUntilByActor.TryGetValue(actorNumber, out var value) || !(Time.time < value)) { round6FallRescueCooldownUntilByActor[actorNumber] = Time.time + 1f; round6FallRescueTeleportWindow = true; try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[Round6] Fall rescue teleport actor=" + actorNumber + " from " + ((Vector3)(ref val2)).ToString("F2") + " to " + ((Vector3)(ref round6CenterRescuePosition)).ToString("F2"))); MoveCharacterForNextPhaseNetworked(val, round6CenterRescuePosition); } finally { round6FallRescueTeleportWindow = false; } } } } private Vector3 GetRound6CenterRescuePosition() { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) if (activeTiles != null && activeTiles.Count > 0) { Vector3 val = Vector3.zero; int num = 0; for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && !((Object)(object)arenaTile.obj == (Object)null)) { Vector3 position = arenaTile.position; try { position = arenaTile.obj.transform.position; } catch { } val += position; num++; } } if (num > 0) { Vector3 val2 = val / (float)num; ArenaTile arenaTile2 = null; Vector3 val3 = val2; float num2 = float.MaxValue; for (int j = 0; j < activeTiles.Count; j++) { ArenaTile arenaTile3 = activeTiles[j]; if (arenaTile3 != null && !((Object)(object)arenaTile3.obj == (Object)null)) { Vector3 position2 = arenaTile3.position; try { position2 = arenaTile3.obj.transform.position; } catch { } float num3 = position2.x - val2.x; float num4 = position2.z - val2.z; float num5 = num3 * num3 + num4 * num4; if (arenaTile2 == null || num5 < num2) { arenaTile2 = arenaTile3; val3 = position2; num2 = num5; } } } if (arenaTile2 != null) { return val3 + Vector3.up * Mathf.Max(3.2f, playerTeleportYOffset.Value + 0.8f); } } } return GetArenaCenterPosition(GetSpawnYForRound(RoundGameType.ColorCloudSurvival)) + Vector3.up * Mathf.Max(4f, playerTeleportYOffset.Value + 1f); } private string GetCharacterDebugName(Character character) { try { int actorNumber = GetActorNumber(character); string text = ((actorNames != null && actorNames.ContainsKey(actorNumber)) ? actorNames[actorNumber] : ""); if (string.IsNullOrWhiteSpace(text) && (Object)(object)character != (Object)null) { text = ((Object)character).name; } return "actor=" + actorNumber + " name=" + text; } catch { return "actor=? name=?"; } } private string GetCharacterPositionDebugString(Character character) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return "character=null"; } Vector3 val = Vector3.zero; Vector3 val2 = Vector3.zero; Vector3 val3 = Vector3.zero; bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; bool flag6 = false; try { val = ((Component)character).transform.position; flag = true; } catch { } try { val2 = character.Center; flag2 = true; } catch { } try { if ((Object)(object)character.data != (Object)null) { flag3 = character.data.dead; flag4 = character.data.passedOut; flag5 = character.data.fullyPassedOut; } } catch { } try { flag6 = character.inAirport; } catch { } try { Rigidbody val4 = ((Component)character).GetComponent(); if ((Object)(object)val4 == (Object)null) { val4 = ((Component)character).GetComponentInChildren(true); } if ((Object)(object)val4 != (Object)null) { val3 = val4.velocity; } } catch { } return GetCharacterDebugName(character) + " tf=" + (flag ? ((Vector3)(ref val)).ToString("F2") : "ERR") + " center=" + (flag2 ? ((Vector3)(ref val2)).ToString("F2") : "ERR") + " vel=" + ((Vector3)(ref val3)).ToString("F2") + " dead=" + flag3 + " passedOut=" + flag4 + " fullyPassedOut=" + flag5 + " airport=" + flag6 + " state=" + gameState.ToString() + " round=" + currentRoundType.ToString() + " roundIndex=" + currentRoundIndex; } internal void LogTeleportPositionNow(Character character, string source, Vector3 target) { try { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[TeleportTrace] " + source + " target=" + ((Vector3)(ref target)).ToString("F2") + " " + GetCharacterPositionDebugString(character))); } catch { } } internal void LogTeleportPositionDelayed(Character character, string source, Vector3 target, float delay) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) try { if (!((Object)(object)character == (Object)null)) { ((MonoBehaviour)this).StartCoroutine(LogTeleportPositionDelayedRoutine(character, source, target, delay)); } } catch { } } [IteratorStateMachine(typeof(d__1303))] private IEnumerator LogTeleportPositionDelayedRoutine(Character character, string source, Vector3 target, float delay) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1303(0) { <>4__this = this, character = character, source = source, target = target, delay = delay }; } internal void StartPodiumTeleportStabilize(Character character, Vector3 target) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)character != (Object)null && IsNearRoundResultPodiumTeleportPosition(target)) { LogTeleportPositionNow(character, "PODIUM_STABILIZE_DISABLED", target); } } catch { } } [IteratorStateMachine(typeof(d__1305))] private IEnumerator PodiumTeleportStabilizeRoutine(Character character, Vector3 target) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1305(0) { <>4__this = this, character = character, target = target }; } internal void ZeroCharacterVelocityForTeleport(Character character) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)character == (Object)null) { return; } Rigidbody[] componentsInChildren = ((Component)character).GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if (!((Object)(object)componentsInChildren[i] == (Object)null)) { componentsInChildren[i].velocity = Vector3.zero; componentsInChildren[i].angularVelocity = Vector3.zero; } } } catch { } } private bool IsAllowedTeleportWindow() { if (round6FallRescueTeleportWindow && gameState == GameState.Running && currentRoundType == RoundGameType.ColorCloudSurvival) { return true; } if (roundStartTeleportWindow && gameState == GameState.RoundStarting) { return true; } if (roundEndTeleportWindow && (gameState == GameState.RoundEnding || roundFinishInProgress || roundResultPanelActive)) { return true; } return false; } private void LogBlockedUnexpectedTeleport(string source, Vector3 pos) { if (Time.time < lastBlockedUnexpectedTeleportLogTime + 1f) { return; } lastBlockedUnexpectedTeleportLogTime = Time.time; try { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[TeleportGuard] Blocked unexpected teleport from " + source + " to " + ((Vector3)(ref pos)).ToString("F2") + ". Only round-start arena spawn, round-end podium teleport, and Round6 fall rescue are allowed.")); } catch { } } private bool IsSafeTeleportPosition(Vector3 pos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) if (float.IsNaN(pos.x) || float.IsNaN(pos.y) || float.IsNaN(pos.z)) { return false; } if (float.IsInfinity(pos.x) || float.IsInfinity(pos.y) || float.IsInfinity(pos.z)) { return false; } if (roundEndTeleportWindow) { return IsNearRoundResultPodiumTeleportPosition(pos); } if (Mathf.Abs(pos.x) > 2000f || Mathf.Abs(pos.z) > 2500f || pos.y < -200f || pos.y > 2500f) { return false; } return true; } private void TeleportCharacter(Character character, Vector3 pos) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return; } if (!IsAllowedTeleportWindow()) { LogBlockedUnexpectedTeleport("TeleportCharacter", pos); return; } if (!IsSafeTeleportPosition(pos)) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[TeleportGuard] Blocked unsafe teleport from TeleportCharacter to " + ((Vector3)(ref pos)).ToString("F2") + ". No fallback beach/current-position warp will be used.")); return; } try { LogTeleportPositionNow(character, "WARP_RPC_SEND_BEFORE", pos); if ((Object)(object)((MonoBehaviourPun)character).photonView != (Object)null) { ((MonoBehaviourPun)character).photonView.RPC("WarpPlayerRPC", (RpcTarget)0, new object[2] { pos, false }); LogTeleportPositionNow(character, "WARP_RPC_SEND_AFTER", pos); LogTeleportPositionDelayed(character, "WARP_RPC_DELAY", pos, 0.2f); LogTeleportPositionDelayed(character, "WARP_RPC_DELAY", pos, 1f); } else { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[TeleportGuard] TeleportCharacter skipped because photonView is null. pos=" + ((Vector3)(ref pos)).ToString("F2"))); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[TeleportGuard] TeleportCharacter WarpPlayerRPC failed: " + ex.GetType().Name + ": " + ex.Message)); } } private void GiveRoundStartItems(RoundGameType roundType) { switch (roundType) { } } [IteratorStateMachine(typeof(d__1312))] private IEnumerator DynamiteGiveRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1312(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__1313))] private IEnumerator GiveDynamiteAfterMissingDelayRoutine(Character character) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1313(0) { <>4__this = this, character = character }; } private void CancelPendingDynamiteGive(Character character) { if (!((Object)(object)character == (Object)null) && dynamiteDelayRoutines.ContainsKey(character)) { Coroutine val = dynamiteDelayRoutines[character]; if (val != null) { ((MonoBehaviour)this).StopCoroutine(val); } dynamiteDelayRoutines.Remove(character); } } private void ClearPendingDynamiteRoutines() { foreach (KeyValuePair dynamiteDelayRoutine in dynamiteDelayRoutines) { if (dynamiteDelayRoutine.Value != null) { ((MonoBehaviour)this).StopCoroutine(dynamiteDelayRoutine.Value); } } dynamiteDelayRoutines.Clear(); showDynamiteChargeBar = false; localDynamiteChargeActive = false; } private bool IsLocalCharacter(Character character) { return (Object)(object)character != (Object)null && (Object)(object)Character.localCharacter != (Object)null && (Object)(object)character == (Object)(object)Character.localCharacter; } private void UpdateLocalDynamiteChargeBarState() { if (gameState != GameState.Running || currentRoundType != 0 || !ShouldShowGameUI()) { showDynamiteChargeBar = false; localDynamiteChargeActive = false; return; } Character localCharacter = Character.localCharacter; if ((Object)(object)localCharacter == (Object)null || (Object)(object)localCharacter.data == (Object)null || localCharacter.data.dead || localCharacter.data.passedOut || localCharacter.data.fullyPassedOut) { showDynamiteChargeBar = false; localDynamiteChargeActive = false; return; } if (Time.time >= lastLocalDynamiteUiCheckTime + 0.15f) { lastLocalDynamiteUiCheckTime = Time.time; cachedLocalHasDynamite = HasDynamiteInInventory(localCharacter); } if (cachedLocalHasDynamite) { showDynamiteChargeBar = false; localDynamiteChargeActive = false; return; } if (!localDynamiteChargeActive) { localDynamiteChargeActive = true; dynamiteChargeStartTime = Time.time; dynamiteChargeDuration = Mathf.Max(0.1f, dynamiteMissingDelay.Value); } showDynamiteChargeBar = true; } private bool HasDynamiteInInventory(Character character) { if ((Object)(object)cachedDynamitePrefabItem == (Object)null) { GameObject val = Resources.Load(dynamiteItemPath.Value); if ((Object)(object)val != (Object)null) { cachedDynamitePrefabItem = val.GetComponent(); } } return HasItemInInventory(character, cachedDynamitePrefabItem); } private void GiveLitDynamite(Character character) { GameObject val = GiveItemToCharacter(character, dynamiteItemPath.Value); if ((Object)(object)val != (Object)null) { TryIgniteDynamite(val); } } private void OnItemThrownForCleanup(Item item) { if ((Object)(object)item == (Object)null) { return; } try { Frisbee val = ((Component)item).GetComponent(); if ((Object)(object)val == (Object)null) { val = ((Component)item).GetComponentInChildren(true); } if ((Object)(object)val != (Object)null) { ((MonoBehaviour)this).StartCoroutine(DeleteThrownFrisbeeAfterDelayRoutine(item)); } } catch { } } [IteratorStateMachine(typeof(d__1321))] private IEnumerator DeleteThrownFrisbeeAfterDelayRoutine(Item item) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1321(0) { <>4__this = this, item = item }; } [IteratorStateMachine(typeof(d__1322))] private IEnumerator Round4CoconutSpawnRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1322(0) { <>4__this = this }; } private void SpawnCoconutOnRandomExistingCloudTile() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) ClearDeadTiles(); if (activeTiles.Count == 0) { return; } List list = new List(); for (int i = 0; i < activeTiles.Count; i++) { ArenaTile arenaTile = activeTiles[i]; if (arenaTile != null && (Object)(object)arenaTile.obj != (Object)null) { list.Add(arenaTile); } } if (list.Count != 0) { ArenaTile arenaTile2 = list[Random.Range(0, list.Count)]; Vector3 position = arenaTile2.position + Vector3.up * Mathf.Max(0.1f, coconutSpawnYOffset.Value); SpawnWorldItem(coconutItemPath.Value, position, Quaternion.identity, trackAsArenaObject: true); } } private void StartRound5RhythmGame() { } private void SetRound5CursedCharacter(Character character) { } [IteratorStateMachine(typeof(d__1326))] private IEnumerator Round5ScoreRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1326(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__1327))] private IEnumerator Round5FallResetRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1327(0) { <>4__this = this }; } private void ApplyRound5FallPenaltyAndTeleport(Character character) { if ((Object)(object)character == (Object)null) { return; } int actorNumber = GetActorNumber(character); if (lastRound5FallPenaltyTime.TryGetValue(actorNumber, out var value) && Time.time < value + Mathf.Max(0.1f, round5FallResetCooldown.Value)) { return; } lastRound5FallPenaltyTime[actorNumber] = Time.time; if (!currentRoundScores.ContainsKey(actorNumber)) { currentRoundScores[actorNumber] = 0; } currentRoundScores[actorNumber] = Mathf.Max(0, currentRoundScores[actorNumber] - Mathf.Max(0, round5FallPenaltyPoints.Value)); try { character.data.dead = false; character.data.passedOut = false; character.data.fullyPassedOut = false; } catch { } try { character.ClampStamina(); } catch { } } [IteratorStateMachine(typeof(d__1329))] private IEnumerator Round5PoppyTransferMonitorRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1329(0) { <>4__this = this }; } private void LimitDrowsyToFive(Character target, float previous) { if ((Object)(object)target == (Object)null || target.refs == null || (Object)(object)target.refs.afflictions == (Object)null) { return; } try { float currentStatus = target.refs.afflictions.GetCurrentStatus((STATUSTYPE)6); float num = Mathf.Clamp(previous + Mathf.Max(0f, poppyDrowsyAmount.Value), 0f, 1f); if (currentStatus > num) { target.refs.afflictions.SubtractStatus((STATUSTYPE)6, currentStatus - num, false, false); } } catch { } } private void TransferRound5Curse(Character newHolder) { } private void RemoveAllRound5CurseBalloons() { } private void RemoveAllBalloonsFromCharacter(Character character) { } private void ForcePoppycornToPlayer(Character character) { } private Item ResolvePoppycornItemPrefab() { if ((Object)(object)cachedPoppycornPrefabItem != (Object)null) { return cachedPoppycornPrefabItem; } string resolvedPoppycornPath = GetResolvedPoppycornPath(); if (string.IsNullOrWhiteSpace(resolvedPoppycornPath)) { return null; } GameObject val = Resources.Load(resolvedPoppycornPath); if ((Object)(object)val == (Object)null) { return null; } cachedPoppycornPrefabItem = val.GetComponent(); return cachedPoppycornPrefabItem; } private string GetResolvedPoppycornPath() { string value = poppycornItemPaths.Value; if (string.IsNullOrWhiteSpace(value)) { return ""; } string[] array = value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (!string.IsNullOrWhiteSpace(text)) { GameObject val = Resources.Load(text); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.GetComponent() == (Object)null)) { return text; } } } return (array.Length != 0) ? array[0].Trim() : ""; } private void ClearPoppycornFromAllPlayers() { } private void ClearPoppycornFromCharacter(Character character) { } private GameObject GiveItemToCharacter(Character character, string itemPath) { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null || string.IsNullOrWhiteSpace(itemPath)) { return null; } GameObject val = Resources.Load(itemPath); if ((Object)(object)val == (Object)null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("아이템 Resources.Load 실패: " + itemPath)); return null; } Item component = val.GetComponent(); if ((Object)(object)component == (Object)null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("아이템 프리팹에 Item 컴포넌트가 없습니다: " + itemPath)); return null; } try { ItemSlot val2 = default(ItemSlot); if ((Object)(object)character.player != (Object)null && character.player.AddItem(component.itemID, (ItemInstanceData)null, ref val2)) { return null; } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); } try { return PhotonNetwork.Instantiate(itemPath, character.Center + Vector3.up * 1.5f, Quaternion.identity, (byte)0, (object[])null); } catch (Exception ex2) { ((BaseUnityPlugin)this).Logger.LogError((object)ex2); return null; } } private GameObject SpawnWorldItem(string itemPath, Vector3 position, Quaternion rotation, bool trackAsArenaObject) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrWhiteSpace(itemPath)) { return null; } try { GameObject val = PhotonNetwork.Instantiate(itemPath, position, rotation, (byte)0, (object[])null); if ((Object)(object)val != (Object)null && trackAsArenaObject) { spawnedArenaObjects.Add(val); } return val; } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("아이템 소환 실패: " + itemPath)); ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); return null; } } private void PatchActiveDynamitesForConfiguredExplosionRadius() { if (dynamiteExplosionRadius == null || Time.time < nextDynamiteExplosionPatchTime) { return; } nextDynamiteExplosionPatchTime = Time.time + 0.35f; try { Dynamite[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { ConfigureDynamiteExplosionRadius(array[i]); } } catch { } } private void ConfigureDynamiteExplosionRadius(Dynamite dynamite) { if ((Object)(object)dynamite == (Object)null) { return; } try { GameObject explosionPrefab = dynamite.explosionPrefab; if (!((Object)(object)explosionPrefab == (Object)null)) { ApplyAoeRangeToExplosionObject(explosionPrefab, GetConfiguredDynamiteExplosionRadius()); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("다이너마이트 폭발 범위 적용 실패: " + ex.Message)); } } private void ApplyAoeRangeToExplosionObject(GameObject explosionObject, float radius) { if ((Object)(object)explosionObject == (Object)null) { return; } AOE[] componentsInChildren = explosionObject.GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { if (!((Object)(object)componentsInChildren[i] == (Object)null)) { componentsInChildren[i].range = radius; } } } private float GetConfiguredDynamiteExplosionRadius() { return Mathf.Clamp((dynamiteExplosionRadius != null) ? dynamiteExplosionRadius.Value : 5f, 1f, 20f); } private void TryIgniteDynamite(GameObject obj) { if ((Object)(object)obj == (Object)null) { return; } try { Dynamite val = obj.GetComponent(); if ((Object)(object)val == (Object)null) { val = obj.GetComponentInChildren(true); } if (!((Object)(object)val == (Object)null)) { ConfigureDynamiteExplosionRadius(val); Item val2 = obj.GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = obj.GetComponentInChildren(true); } if ((Object)(object)val2 != (Object)null) { BoolItemData data = val2.GetData((DataEntryKey)3); data.Value = true; } } } catch { } } [IteratorStateMachine(typeof(d__1346))] private IEnumerator RescueHookMaintainRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1346(0) { <>4__this = this }; } private Item ResolveRescueHookItemPrefab() { if ((Object)(object)cachedRescueHookPrefabItem != (Object)null) { return cachedRescueHookPrefabItem; } string value = rescueHookItemPaths.Value; if (string.IsNullOrWhiteSpace(value)) { return null; } string[] array = value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (string.IsNullOrWhiteSpace(text)) { continue; } GameObject val = Resources.Load(text); if (!((Object)(object)val == (Object)null)) { Item component = val.GetComponent(); if (!((Object)(object)component == (Object)null)) { cachedRescueHookPrefabItem = component; ConfigureRescueHookPrefab(val); ((BaseUnityPlugin)this).Logger.LogInfo((object)$"Resolved RescueHook item path: {text}, itemID: {component.itemID}"); return cachedRescueHookPrefabItem; } } } ((BaseUnityPlugin)this).Logger.LogWarning((object)"구조갈고리 프리팹을 찾지 못했습니다. Rescue Hook Item Paths를 실제 경로로 수정해야 합니다."); return null; } private void ForceRescueHookToPlayer(Character character) { //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown if ((Object)(object)character == (Object)null || (Object)(object)character.player == (Object)null) { return; } Item val = ResolveRescueHookItemPrefab(); if ((Object)(object)val == (Object)null || HasItemInInventory(character, val)) { return; } bool flag = false; try { ItemSlot itemSlot = character.player.GetItemSlot((byte)0); if (itemSlot != null) { itemSlot.SetItem(val, new ItemInstanceData(Guid.NewGuid())); try { if (character.player.itemsChangedAction != null) { character.player.itemsChangedAction(character.player.itemSlots); } } catch { } flag = HasItemInInventory(character, val); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); } if (!flag) { try { ItemSlot val2 = default(ItemSlot); flag = character.player.AddItem(val.itemID, (ItemInstanceData)null, ref val2); } catch (Exception ex2) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex2); } } if (!flag) { SpawnRescueHookNearCharacter(character); } ConfigureAllRescueHooksForArenaMode(); } private void SpawnRescueHookNearCharacter(Character character) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null) { return; } string resolvedRescueHookPath = GetResolvedRescueHookPath(); if (string.IsNullOrWhiteSpace(resolvedRescueHookPath)) { return; } try { GameObject val = PhotonNetwork.Instantiate(resolvedRescueHookPath, character.Center + Vector3.up * 1.5f, Quaternion.identity, (byte)0, (object[])null); if ((Object)(object)val != (Object)null) { ConfigureRescueHookPrefab(val); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)ex); } } private string GetResolvedRescueHookPath() { string value = rescueHookItemPaths.Value; if (string.IsNullOrWhiteSpace(value)) { return ""; } string[] array = value.Split(new char[1] { ',' }); for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (!string.IsNullOrWhiteSpace(text)) { GameObject val = Resources.Load(text); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.GetComponent() == (Object)null)) { return text; } } } return ""; } private bool HasItemInInventory(Character character, Item targetPrefab) { if ((Object)(object)character == (Object)null || (Object)(object)character.player == (Object)null || (Object)(object)targetPrefab == (Object)null) { return false; } try { ItemSlot[] itemSlots = character.player.itemSlots; if (itemSlots == null) { return false; } foreach (ItemSlot val in itemSlots) { if (val != null && !val.IsEmpty() && (Object)(object)val.prefab != (Object)null && val.prefab.itemID == targetPrefab.itemID) { return true; } } } catch { } return false; } private void ConfigureAllRescueHooksForArenaMode() { RescueHook[] array = Object.FindObjectsOfType(true); for (int i = 0; i < array.Length; i++) { ConfigureRescueHook(array[i]); } } private void ConfigureRescueHookPrefab(GameObject prefabObj) { if (!((Object)(object)prefabObj == (Object)null)) { RescueHook val = prefabObj.GetComponent(); if ((Object)(object)val == (Object)null) { val = prefabObj.GetComponentInChildren(true); } ConfigureRescueHook(val); } } private void ConfigureRescueHook(RescueHook hook) { if ((Object)(object)hook == (Object)null) { return; } try { hook.launchForce = 0f; hook.liftForce = 0f; hook.selfFallSeconds = 0f; hook.extraDragSelf = 0f; hook.maxWallHookTime = 0.01f; if (hook.dragForce <= 0f) { hook.dragForce = 140f; } if (hook.liftDragForce <= 0f) { hook.liftDragForce = 80f; } if (hook.extraDragOther <= 0f) { hook.extraDragOther = 0.95f; } if (hook.maxScoutHookTime <= 0f) { hook.maxScoutHookTime = 2f; } } catch { } } [IteratorStateMachine(typeof(d__1355))] private IEnumerator FrisbeeMaintainRoutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1355(0) { <>4__this = this }; } private void ForceFrisbeeSlotOne(Character character) { //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown if ((Object)(object)character == (Object)null) { return; } GameObject val = Resources.Load(frisbeeItemPath.Value); if ((Object)(object)val == (Object)null) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Frisbee Resources.Load 실패: " + frisbeeItemPath.Value)); return; } Item component = val.GetComponent(); if ((Object)(object)component == (Object)null) { return; } cachedFrisbeePrefabItem = component; try { if ((Object)(object)character.player == (Object)null) { return; } ItemSlot itemSlot = character.player.GetItemSlot((byte)0); if (itemSlot == null || (!itemSlot.IsEmpty() && (Object)(object)itemSlot.prefab != (Object)null && itemSlot.prefab.itemID == component.itemID)) { return; } itemSlot.SetItem(component, new ItemInstanceData(Guid.NewGuid())); try { if (character.player.itemsChangedAction != null) { character.player.itemsChangedAction(character.player.itemSlots); } } catch { } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)ex); GiveItemToCharacter(character, frisbeeItemPath.Value); } } private void DestroyItemObject(GameObject obj) { if ((Object)(object)obj == (Object)null) { return; } try { PhotonView component = obj.GetComponent(); if ((Object)(object)component != (Object)null && PhotonNetwork.InRoom) { if (PhotonNetwork.IsMasterClient || component.IsMine) { PhotonNetwork.Destroy(obj); } } else { Object.Destroy((Object)(object)obj); } } catch { try { Object.Destroy((Object)(object)obj); } catch { } } } private void ClearDeadTiles() { for (int num = activeTiles.Count - 1; num >= 0; num--) { if (activeTiles[num] == null || (Object)(object)activeTiles[num].obj == (Object)null) { activeTiles.RemoveAt(num); } } } private void RemoveTile(ArenaTile tile) { if (tile == null) { return; } if ((Object)(object)tile.obj != (Object)null) { try { PhotonView component = tile.obj.GetComponent(); if ((Object)(object)component != (Object)null && PhotonNetwork.InRoom) { PhotonNetwork.Destroy(tile.obj); } else { Object.Destroy((Object)(object)tile.obj); } } catch { try { Object.Destroy((Object)(object)tile.obj); } catch { } } } activeTiles.Remove(tile); } private void PrepareCharacterForNewRound(Character character) { if ((Object)(object)character == (Object)null || (Object)(object)character.data == (Object)null) { return; } try { character.data.dead = false; } catch { } try { character.data.passedOut = false; } catch { } try { character.data.fullyPassedOut = false; } catch { } try { character.data.SetSkeleton(false); } catch { } try { character.data.deathTimer = 0f; } catch { } try { character.data.sinceDied = 0f; } catch { } try { character.data.sinceDead = 1f; } catch { } try { RestoreCharacterStaminaLocal(character); } catch { } try { ClearCharacterDebuffs(character); } catch { } } private void PrepareLivingCharacterForNewPhase(Character character) { if ((Object)(object)character == (Object)null || (Object)(object)character.data == (Object)null) { return; } try { character.data.SetSkeleton(false); } catch { } try { RestoreCharacterStaminaLocal(character); } catch { } try { ClearCharacterDebuffs(character); } catch { } } private void CleanupRoundEndStateForAllPlayers(bool allowReviveDeadPlayers) { RemoveAllRound5CurseBalloons(); ClearPoppycornFromAllPlayers(); if (clearItemsOnRoundEnd.Value) { ClearWorldItems(); } foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { int actorNumber = GetActorNumber(roundPlayer); bool flag = NeedsRevive(roundPlayer) || (actorNumber > 0 && actorsNeedingReviveAtRoundEnd.Contains(actorNumber)); if (!(flag && allowReviveDeadPlayers) && !flag) { PrepareLivingCharacterForNewPhase(roundPlayer); } if (clearInventoryOnRoundEnd.Value) { ClearCharacterInventory(roundPlayer); } if (clearDebuffsOnRoundEnd.Value) { ClearCharacterDebuffs(roundPlayer); } if (!flag) { RestoreCharacterStaminaLocal(roundPlayer); } } } } private void FullGameEndCleanup(bool startProtection) { if (IsRound11DinoProtectedRunning()) { LogRound11Debug("FullGameEndCleanup blocked during active Round 11. " + GetRound11StateString()); return; } RemoveAllRound5CurseBalloons(); ClearPoppycornFromAllPlayers(); if (clearItemsOnRoundEnd.Value) { ClearWorldItems(); } foreach (Character roundPlayer in roundPlayers) { if (!((Object)(object)roundPlayer == (Object)null)) { if (clearInventoryOnRoundEnd.Value) { ClearCharacterInventory(roundPlayer); } if (clearDebuffsOnRoundEnd.Value) { ClearCharacterDebuffs(roundPlayer); } RestoreCharacterStaminaLocal(roundPlayer); } } } private void MaintainLocalRound6MoveSpeedBoost() { if (enableMod == null || !enableMod.Value || !IsProbablyInIslandMap() || gameState != GameState.Running || currentRoundType != RoundGameType.ColorCloudSurvival || !((Object)(object)Character.localCharacter != (Object)null) || Character.localCharacter.refs == null || !((Object)(object)Character.localCharacter.refs.movement != (Object)null) || !((Object)(object)Character.localCharacter.data != (Object)null) || Character.localCharacter.data.dead) { RemoveLocalRound6MoveSpeedBoost(); return; } Character localCharacter = Character.localCharacter; if (round6LocalSpeedBoostApplied && (Object)(object)round6LocalSpeedBoostCharacter == (Object)(object)localCharacter) { return; } RemoveLocalRound6MoveSpeedBoost(); try { CharacterMovement movement = localCharacter.refs.movement; movement.movementModifier += 0.3f; round6LocalSpeedBoostApplied = true; round6LocalSpeedBoostCharacter = localCharacter; } catch { round6LocalSpeedBoostApplied = false; round6LocalSpeedBoostCharacter = null; } } private void RemoveLocalRound6MoveSpeedBoost() { if (!round6LocalSpeedBoostApplied) { return; } try { Character val = round6LocalSpeedBoostCharacter; if ((Object)(object)val != (Object)null && val.refs != null && (Object)(object)val.refs.movement != (Object)null) { CharacterMovement movement = val.refs.movement; movement.movementModifier -= 0.3f; } } catch { } round6LocalSpeedBoostApplied = false; round6LocalSpeedBoostCharacter = null; } private void HandleIslandEntryGlobalSafety(bool inIslandMapNow) { try { if (!inIslandMapNow) { wasInIslandMapForEntryCleanup = false; islandEntryCleanupActive = false; islandEntryCleanupUntil = -1f; return; } if (!wasInIslandMapForEntryCleanup) { wasInIslandMapForEntryCleanup = true; islandEntryCleanupActive = true; islandEntryCleanupUntil = Time.time + 8f; nextIslandEntryCleanupTime = -1f; ((BaseUnityPlugin)this).Logger.LogInfo((object)"[IslandEntrySafety] Island detected. Applying silent invincibility, removing non-flare items, and disabling all chests for a short load window."); ApplySilentIslandInvincibilityToAllCharacters(); } if (islandEntryCleanupActive) { if (Time.time > islandEntryCleanupUntil) { islandEntryCleanupActive = false; } else if (gameState != 0 && gameState != GameState.SpawningArena) { islandEntryCleanupActive = false; } else if (!(Time.time < nextIslandEntryCleanupTime)) { nextIslandEntryCleanupTime = Time.time + 0.5f; ApplySilentIslandInvincibilityToAllCharacters(); RemoveAllNonFlareWorldItems(); RemoveAllNonFlareItemsFromAllCharacters(); DisableAllIslandChests(); } } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[IslandEntrySafety] cleanup failed: " + ex.GetType().Name + ": " + ex.Message)); } } private void ApplySilentIslandInvincibilityToAllCharacters() { try { if (Character.AllCharacters == null) { return; } foreach (Character allCharacter in Character.AllCharacters) { ApplySilentIslandInvincibility(allCharacter); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[IslandEntrySafety] ApplySilentIslandInvincibilityToAllCharacters failed: " + ex.Message)); } } private void ApplySilentIslandInvincibility(Character character) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown try { if ((Object)(object)character == (Object)null || (Object)(object)character.data == (Object)null || character.refs == null || (Object)(object)character.refs.afflictions == (Object)null) { return; } try { if (character.inAirport) { return; } } catch { } Affliction_Invincibility val = new Affliction_Invincibility { totalTime = 999999f, isFromMilk = false }; character.refs.afflictions.AddAffliction((Affliction)(object)val, false); try { character.data.RecalculateInvincibility(); } catch { } } catch { } } internal bool ShouldSuppressIslandInvincibilityGlow() { try { if (!enableMod.Value) { return false; } return IsProbablyInIslandMap(); } catch { return false; } } internal bool ShouldBlockIslandStatus(CharacterAfflictions afflictions, STATUSTYPE statusType, float amount) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) try { if (amount <= 0f) { return false; } if (!enableMod.Value) { return false; } if (!IsProbablyInIslandMap()) { return false; } Character val = null; try { if ((Object)(object)afflictions != (Object)null) { val = ((Component)afflictions).GetComponent(); } } catch { } if ((Object)(object)val != (Object)null) { try { if (val.inAirport) { return false; } } catch { } } return IsIslandBlockedStatus(statusType); } catch { return false; } } private bool IsIslandBlockedStatus(STATUSTYPE statusType) { try { string text = ((object)(STATUSTYPE)(ref statusType)).ToString(); int result; switch (text) { default: result = ((text == "Spores") ? 1 : 0); break; case "Injury": case "Hunger": case "Cold": case "Poison": case "Curse": case "Drowsy": case "Weight": case "Hot": case "Crab": result = 1; break; } return (byte)result != 0; } catch { return true; } } private void RemoveAllNonFlareWorldItems() { try { Item[] array = Object.FindObjectsOfType(false); int num = 0; foreach (Item val in array) { if ((Object)(object)val == (Object)null || IsFlareItem(val)) { continue; } try { if ((Object)(object)val.holderCharacter != (Object)null) { continue; } } catch { } GameObject gameObject = ((Component)val).gameObject; if (!((Object)(object)gameObject == (Object)null) && !IsArenaObject(gameObject)) { DestroyItemObject(gameObject); num++; } } if (num > 0) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[IslandEntrySafety] Removed non-flare world items: " + num)); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[IslandEntrySafety] RemoveAllNonFlareWorldItems failed: " + ex.Message)); } } private void RemoveAllNonFlareItemsFromAllCharacters() { try { if (Character.AllCharacters == null) { return; } foreach (Character allCharacter in Character.AllCharacters) { ClearCharacterInventoryExceptFlare(allCharacter); } } catch { } } private void ClearCharacterInventoryExceptFlare(Character character) { if ((Object)(object)character == (Object)null || (Object)(object)character.player == (Object)null) { return; } bool flag = false; try { Item val = (((Object)(object)character.data != (Object)null) ? character.data.currentItem : null); if ((Object)(object)val != (Object)null && !IsFlareItem(val)) { try { if ((Object)(object)((MonoBehaviourPun)character).photonView != (Object)null) { ((MonoBehaviourPun)character).photonView.RPC("DestroyHeldItemRpc", (RpcTarget)0, Array.Empty()); } } catch { } flag = true; } } catch { } try { ItemSlot[] itemSlots = character.player.itemSlots; if (itemSlots != null) { foreach (ItemSlot val2 in itemSlots) { if (val2 != null && !val2.IsEmpty() && !IsFlareItem(val2.prefab)) { val2.EmptyOut(); flag = true; } } } } catch { } try { if (character.player.tempFullSlot != null && !character.player.tempFullSlot.IsEmpty() && !IsFlareItem(character.player.tempFullSlot.prefab)) { character.player.tempFullSlot.EmptyOut(); flag = true; } } catch { } try { if (character.player.backpackSlot != null) { BackpackData val3 = default(BackpackData); if (!((ItemSlot)character.player.backpackSlot).IsEmpty() && ((ItemSlot)character.player.backpackSlot).data != null && ((ItemSlot)character.player.backpackSlot).data.TryGetDataEntry((DataEntryKey)7, ref val3) && val3.itemSlots != null) { for (int j = 0; j < val3.itemSlots.Length; j++) { ItemSlot val4 = val3.itemSlots[j]; if (val4 != null && !val4.IsEmpty() && !IsFlareItem(val4.prefab)) { val4.EmptyOut(); flag = true; } } } if (!((ItemSlot)character.player.backpackSlot).IsEmpty() && !IsFlareItem(((ItemSlot)character.player.backpackSlot).prefab)) { ((ItemSlot)character.player.backpackSlot).EmptyOut(); flag = true; } } } catch { } if (!flag) { return; } try { if (character.player.itemsChangedAction != null) { character.player.itemsChangedAction(character.player.itemSlots); } } catch { } } private bool IsFlareItem(Item item) { if ((Object)(object)item == (Object)null) { return false; } try { if ((Object)(object)((Component)item).GetComponent() != (Object)null) { return true; } if ((Object)(object)((Component)item).GetComponentInChildren(true) != (Object)null) { return true; } if ((Object)(object)((Component)item).GetComponentInParent() != (Object)null) { return true; } } catch { } try { string text = (((Object)(object)((Component)item).gameObject != (Object)null) ? ((Object)((Component)item).gameObject).name : ((Object)item).name); if (!string.IsNullOrEmpty(text) && text.ToLowerInvariant().Contains("flare")) { return true; } } catch { } return false; } private void DisableAllIslandChests() { try { int num = 0; HashSet disabledObjects = new HashSet(); Luggage[] array = Object.FindObjectsOfType(false); foreach (Luggage val in array) { if (!((Object)(object)val == (Object)null) && DisableChestObject(((Component)val).gameObject, disabledObjects)) { num++; } } RespawnChest[] array2 = Object.FindObjectsOfType(false); foreach (RespawnChest val2 in array2) { if (!((Object)(object)val2 == (Object)null) && DisableChestObject(((Component)val2).gameObject, disabledObjects)) { num++; } } Transform[] array3 = Object.FindObjectsOfType(false); foreach (Transform val3 in array3) { if (!((Object)(object)val3 == (Object)null)) { GameObject gameObject = ((Component)val3).gameObject; if (!((Object)(object)gameObject == (Object)null) && gameObject.activeSelf && LooksLikeIslandChestObject(gameObject) && DisableChestObject(gameObject, disabledObjects)) { num++; } } } if (num > 0) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[IslandEntrySafety] Disabled all island chests: " + num)); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("[IslandEntrySafety] DisableAllIslandChests failed: " + ex.Message)); } } private bool DisableChestObject(GameObject obj, HashSet disabledObjects) { try { if ((Object)(object)obj == (Object)null || !obj.activeSelf) { return false; } if (disabledObjects != null && disabledObjects.Contains(obj)) { return false; } if (IsArenaObject(obj)) { return false; } obj.SetActive(false); disabledObjects?.Add(obj); return true; } catch { return false; } } private bool LooksLikeIslandChestObject(GameObject obj) { try { if ((Object)(object)obj == (Object)null) { return false; } string name = ((Object)obj).name; if (string.IsNullOrEmpty(name)) { return false; } string text = name.ToLowerInvariant(); return text.Contains("chest") || text.Contains("luggage") || text.Contains("suitcase") || text.Contains("crate") || text.Contains("storage"); } catch { return false; } } private bool IsProbablyInIslandMap() { if (Time.time < lastIslandMapCacheTime + 0.35f) { return cachedIsInIslandMap; } lastIslandMapCacheTime = Time.time; bool flag = true; try { if ((Object)(object)Character.localCharacter == (Object)null) { flag = false; } else if (Character.localCharacter.inAirport) { flag = false; } } catch { flag = false; } if (flag) { try { if ((Object)(object)GameObject.Find("Airport") != (Object)null) { flag = false; } } catch { } } cachedIsInIslandMap = flag; return cachedIsInIslandMap; } private void ClearWorldItems() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) Item[] array = Object.FindObjectsOfType(false); foreach (Item val in array) { if ((Object)(object)val == (Object)null) { continue; } GameObject gameObject = ((Component)val).gameObject; if ((Object)(object)gameObject == (Object)null || IsArenaObject(gameObject) || !IsWithinArenaCleanupBounds(gameObject.transform.position)) { continue; } try { if ((Object)(object)val.holderCharacter != (Object)null) { continue; } } catch { } DestroyItemObject(gameObject); } } private bool IsWithinArenaCleanupBounds(Vector3 pos) { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Min(arenaStartX.Value, arenaEndX.Value) - 20f; float num2 = Mathf.Max(arenaStartX.Value, arenaEndX.Value) + 20f; float num3 = ForcedArenaMinZ() - 20f; float num4 = ForcedArenaMaxZ() + 20f; float num5 = Mathf.Min(arenaY.Value, round4UpperArenaY.Value) - 30f; float num6 = Mathf.Max(arenaY.Value, round4UpperArenaY.Value) + 40f; return pos.x >= num && pos.x <= num2 && pos.z >= num3 && pos.z <= num4 && pos.y >= num5 && pos.y <= num6; } private bool IsArenaObject(GameObject obj) { if ((Object)(object)obj == (Object)null) { return false; } if (spawnedArenaObjects.Contains(obj)) { return true; } Transform val = obj.transform; while ((Object)(object)val != (Object)null) { if (spawnedArenaObjects.Contains(((Component)val).gameObject)) { return true; } string name = ((Object)((Component)val).gameObject).name; if (!string.IsNullOrEmpty(name) && name.Contains("100sec_ArenaTile")) { return true; } val = val.parent; } return false; } private void ClearCharacterInventory(Character character) { if ((Object)(object)character == (Object)null || (Object)(object)character.player == (Object)null) { return; } try { if ((Object)(object)((MonoBehaviourPun)character).photonView != (Object)null) { ((MonoBehaviourPun)character).photonView.RPC("DestroyHeldItemRpc", (RpcTarget)0, Array.Empty()); } } catch { } try { ItemSlot[] itemSlots = character.player.itemSlots; if (itemSlots != null) { for (int i = 0; i < itemSlots.Length; i++) { if (itemSlots[i] != null) { itemSlots[i].EmptyOut(); } } } } catch { } try { if (character.player.tempFullSlot != null) { character.player.tempFullSlot.EmptyOut(); } } catch { } try { if (character.player.backpackSlot != null) { BackpackData val = default(BackpackData); if (!((ItemSlot)character.player.backpackSlot).IsEmpty() && ((ItemSlot)character.player.backpackSlot).data != null && ((ItemSlot)character.player.backpackSlot).data.TryGetDataEntry((DataEntryKey)7, ref val) && val.itemSlots != null) { for (int j = 0; j < val.itemSlots.Length; j++) { if (val.itemSlots[j] != null) { val.itemSlots[j].EmptyOut(); } } } ((ItemSlot)character.player.backpackSlot).EmptyOut(); } } catch { } try { if (character.player.itemsChangedAction != null) { character.player.itemsChangedAction(character.player.itemSlots); } } catch { } } private void ClearCharacterDebuffs(Character character) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null || character.refs == null || (Object)(object)character.refs.afflictions == (Object)null) { return; } try { int num = Enum.GetNames(typeof(STATUSTYPE)).Length; for (int i = 0; i < num; i++) { STATUSTYPE val = (STATUSTYPE)i; try { character.refs.afflictions.SubtractStatus(val, 10f, false, false); } catch { } } } catch { } try { character.refs.afflictions.ClearPoisonAfflictions(); } catch { } try { character.ClampStamina(); } catch { } try { if ((Object)(object)GUIManager.instance != (Object)null && (Object)(object)GUIManager.instance.bar != (Object)null) { GUIManager.instance.bar.ChangeBar(); } } catch { } } private void RestoreCharacterStaminaLocal(Character character) { if ((Object)(object)character == (Object)null || (Object)(object)character.data == (Object)null) { return; } try { float maxStamina = character.GetMaxStamina(); character.data.currentStamina = maxStamina; character.ClampStamina(); } catch { try { character.AddStamina(999f); } catch { } } if (!clearExtraStaminaOnRoundEnd.Value) { return; } try { character.SetExtraStamina(0f); } catch { } } private void ClearActiveCloudWarningTintRoutines() { foreach (Coroutine value in activeCloudWarningTintRoutines.Values) { if (value != null) { try { ((MonoBehaviour)this).StopCoroutine(value); } catch { } } } activeCloudWarningTintRoutines.Clear(); } private void StopRoundRoutines() { StopTimingRoundSoundsLocal(); timingRoundActive = false; arrowRoundActive = false; rhythmRoundActive = false; round6AnswerGaugeActive = false; showDynamiteChargeBar = false; if (dynamiteRoutine != null) { ((MonoBehaviour)this).StopCoroutine(dynamiteRoutine); dynamiteRoutine = null; } if (hookMaintainRoutine != null) { ((MonoBehaviour)this).StopCoroutine(hookMaintainRoutine); hookMaintainRoutine = null; } if (frisbeeRoutine != null) { ((MonoBehaviour)this).StopCoroutine(frisbeeRoutine); frisbeeRoutine = null; } if (standingTileDeleteRoutine != null) { ((MonoBehaviour)this).StopCoroutine(standingTileDeleteRoutine); standingTileDeleteRoutine = null; } if (coconutSpawnRoutine != null) { ((MonoBehaviour)this).StopCoroutine(coconutSpawnRoutine); coconutSpawnRoutine = null; } if (round5ScoreRoutine != null) { ((MonoBehaviour)this).StopCoroutine(round5ScoreRoutine); round5ScoreRoutine = null; } if (round5FallResetRoutine != null) { ((MonoBehaviour)this).StopCoroutine(round5FallResetRoutine); round5FallResetRoutine = null; } if (round5PoppyTransferRoutine != null) { ((MonoBehaviour)this).StopCoroutine(round5PoppyTransferRoutine); round5PoppyTransferRoutine = null; } pendingStandingTileDeletes.Clear(); ClearActiveCloudWarningTintRoutines(); ClearActiveTileLowerRoutines(); standingTileDeleteStarted = false; ClearPendingDynamiteRoutines(); EndRound7ButtonMashLocal(); EndRound8StarGridLocal(); EndRound9MemoryLocal(); EndRound10HalliGalliLocal(); EndRound11DinoLocal(); } private void StopAllGameRoutines() { StopRoundRoutines(); if (mainGameRoutine != null) { ((MonoBehaviour)this).StopCoroutine(mainGameRoutine); mainGameRoutine = null; } } private void StopAndResetGame() { if (round11DinoActive || currentRoundType == RoundGameType.DinoRun) { LogRound11Debug("StopAndResetGame FORCE reset while R11 context. " + GetRound11StateString()); } round11DinoManualResetInProgress = true; try { singleRoundTestRunning = false; activeSingleRoundTestType = RoundGameType.CloudDynamite; RemoveLocalRound6MoveSpeedBoost(); round11DinoAllowLocalEnd = true; StopAllGameRoutines(); FullGameEndCleanup(startProtection: false); ResetGame(); TurnOffAllStartTriggers(); } finally { round11DinoManualResetInProgress = false; round11DinoAllowLocalEnd = false; } } private void TurnOffOnlyRoundStartTriggers() { suppressRoundStartToggleEvents = true; try { round1Start.Value = false; round2Start.Value = false; round3Start.Value = false; round4Start.Value = false; round5Start.Value = false; round6Start.Value = false; round7Start.Value = false; round8Start.Value = false; round9Start.Value = false; round10Start.Value = false; round11Start.Value = false; } finally { suppressRoundStartToggleEvents = false; } lastRound1StartValue = false; lastRound2StartValue = false; lastRound3StartValue = false; lastRound4StartValue = false; lastRound5StartValue = false; lastRound6StartValue = false; lastRound7StartValue = false; lastRound8StartValue = false; lastRound9StartValue = false; lastRound10StartValue = false; lastRound11StartValue = false; } private void TurnOffAllStartTriggers() { suppressRoundStartToggleEvents = true; suppressGameStartToggleEvents = true; try { gameStart.Value = false; round1Start.Value = false; round2Start.Value = false; round3Start.Value = false; round4Start.Value = false; round5Start.Value = false; round6Start.Value = false; round7Start.Value = false; round8Start.Value = false; round9Start.Value = false; round10Start.Value = false; round11Start.Value = false; } finally { suppressRoundStartToggleEvents = false; suppressGameStartToggleEvents = false; } lastGameStartValue = false; lastRound1StartValue = false; lastRound2StartValue = false; lastRound3StartValue = false; lastRound4StartValue = false; lastRound5StartValue = false; lastRound6StartValue = false; lastRound7StartValue = false; lastRound8StartValue = false; lastRound9StartValue = false; lastRound10StartValue = false; lastRound11StartValue = false; } private void ResetGame() { round11DinoAllowLocalEnd = true; EndRound11DinoLocal(); gameState = GameState.Idle; roundFinishInProgress = false; roundStartFinishGuardActive = false; roundStartFinishGuardUntil = -999f; roundEndPresentationComplete = true; finishRoundRoutineHandle = null; flareReadyActive = false; flareReadyLocalConfirmed = false; flareReadyThirdPersonLockUntil = -999f; flareReadyByActor.Clear(); flareReadyActorOrder.Clear(); flareReadyActorNames.Clear(); if (flareReadyRoutine != null) { try { ((MonoBehaviour)this).StopCoroutine(flareReadyRoutine); } catch { } flareReadyRoutine = null; } currentRoundHardTimeoutAt = -1f; roundEndStartedAt = -1f; firstRoundStartedAfterMapLoad = false; currentRoundIndex = 0; mainRoundPlayedCount = 0; currentRoundOrder.Clear(); roundPlayers.Clear(); alivePlayers.Clear(); eliminatedPlayers.Clear(); savedBeachStartPositions.Clear(); ClearRoundResultPodiums(); showDynamiteChargeBar = false; standingTileDeleteStarted = false; currentRoundRunningStartTime = 0f; finalEndingTriggered = false; lastRoundProgressCheckTime = -999f; lastLocalDynamiteUiCheckTime = -999f; cachedLocalHasDynamite = false; round5CursedCharacter = null; ResetScoresForNewMatch(); round5CurseActive = false; ClearArena(); } private void ClearArena() { if (IsRound11DinoProtectedRunning()) { LogRound11Debug("ClearArena blocked during active Round 11. " + GetRound11StateString()); return; } for (int num = spawnedArenaObjects.Count - 1; num >= 0; num--) { GameObject val = spawnedArenaObjects[num]; if ((Object)(object)val == (Object)null) { spawnedArenaObjects.RemoveAt(num); } else { try { PhotonView component = val.GetComponent(); if ((Object)(object)component != (Object)null && PhotonNetwork.InRoom) { PhotonNetwork.Destroy(val); } else { Object.Destroy((Object)(object)val); } } catch { try { Object.Destroy((Object)(object)val); } catch { } } spawnedArenaObjects.RemoveAt(num); } } activeTiles.Clear(); pendingStandingTileDeletes.Clear(); round6TileColors.Clear(); round6OriginalPositions.Clear(); round6OriginalRendererMaterials.Clear(); ClearActiveTileLowerRoutines(); } private void DisableItemPickupIfExists(GameObject obj) { if ((Object)(object)obj == (Object)null) { return; } Item val = obj.GetComponent(); if ((Object)(object)val == (Object)null) { val = obj.GetComponentInChildren(true); } if ((Object)(object)val == (Object)null) { return; } try { val.blockInteraction = true; } catch { } } private void FreezeObject(GameObject obj) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)obj == (Object)null) { return; } Rigidbody[] componentsInChildren = obj.GetComponentsInChildren(true); Rigidbody[] array = componentsInChildren; foreach (Rigidbody val in array) { if ((Object)(object)val == (Object)null) { continue; } try { val.velocity = Vector3.zero; val.angularVelocity = Vector3.zero; val.useGravity = false; val.isKinematic = true; val.constraints = (RigidbodyConstraints)126; try { val.linearVelocity = Vector3.zero; } catch { } } catch { } } } [IteratorStateMachine(typeof(d__1396))] private IEnumerator RemoveEffectObjectsRoutine(GameObject root) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1396(0) { <>4__this = this, root = root }; } private void RemoveEffectObjectsNow(GameObject root) { if ((Object)(object)root == (Object)null) { return; } Transform[] componentsInChildren = root.GetComponentsInChildren(true); Transform[] array = componentsInChildren; foreach (Transform val in array) { if ((Object)(object)val == (Object)null || (Object)(object)val == (Object)(object)root.transform) { continue; } GameObject gameObject = ((Component)val).gameObject; if ((Object)(object)gameObject == (Object)null) { continue; } Component[] components = gameObject.GetComponents(); Component[] array2 = components; foreach (Component val2 in array2) { if ((Object)(object)val2 == (Object)null) { continue; } string name = ((object)val2).GetType().Name; switch (name) { default: if (!(name == "LineRenderer")) { continue; } break; case "ParticleSystem": case "ParticleSystemRenderer": case "TrailRenderer": break; } gameObject.SetActive(false); break; } } } private bool IsEffectObjectName(string objectName) { if (string.IsNullOrEmpty(objectName)) { return false; } string text = objectName.ToLowerInvariant(); return text.Contains("vfx") || text.Contains("fx") || text.Contains("dust") || text.Contains("smoke") || text.Contains("puff") || text.Contains("poof") || text.Contains("burst") || text.Contains("particle") || text.Contains("impact"); } private void DisableFungusSpawnEffectsAndIdleMotion(GameObject root) { if ((Object)(object)root == (Object)null) { return; } RemoveEffectObjectsNow(root); try { Component[] componentsInChildren = root.GetComponentsInChildren(true); Component[] array = componentsInChildren; foreach (Component val in array) { if ((Object)(object)val == (Object)null) { continue; } Type type = ((object)val).GetType(); if (type.Name != "ParticleSystem") { continue; } try { MethodInfo method = type.GetMethod("Stop", new Type[1] { typeof(bool) }); if (method != null) { method.Invoke(val, new object[1] { true }); } } catch { } try { MethodInfo method2 = type.GetMethod("Clear", new Type[1] { typeof(bool) }); if (method2 != null) { method2.Invoke(val, new object[1] { true }); } } catch { } try { val.gameObject.SetActive(false); } catch { } } } catch { } try { Renderer[] componentsInChildren2 = root.GetComponentsInChildren(true); Renderer[] array2 = componentsInChildren2; foreach (Renderer val2 in array2) { if ((Object)(object)val2 == (Object)null) { continue; } string name = ((object)val2).GetType().Name; string text = (((Object)(object)((Component)val2).gameObject != (Object)null) ? ((Object)((Component)val2).gameObject).name : string.Empty); if (name == "ParticleSystemRenderer" || name == "TrailRenderer" || name == "LineRenderer") { try { val2.enabled = false; } catch { } try { ((Component)val2).gameObject.SetActive(false); } catch { } } } } catch { } try { Animator[] componentsInChildren3 = root.GetComponentsInChildren(true); Animator[] array3 = componentsInChildren3; foreach (Animator val3 in array3) { if (!((Object)(object)val3 == (Object)null)) { try { val3.Rebind(); } catch { } try { val3.Update(0f); } catch { } try { val3.speed = 0f; } catch { } try { val3.cullingMode = (AnimatorCullingMode)0; } catch { } try { ((Behaviour)val3).enabled = false; } catch { } } } } catch { } try { Animation[] componentsInChildren4 = root.GetComponentsInChildren(true); Animation[] array4 = componentsInChildren4; foreach (Animation val4 in array4) { if (!((Object)(object)val4 == (Object)null)) { try { val4.Stop(); } catch { } try { ((Behaviour)val4).enabled = false; } catch { } } } } catch { } try { MonoBehaviour[] componentsInChildren5 = root.GetComponentsInChildren(true); MonoBehaviour[] array5 = componentsInChildren5; foreach (MonoBehaviour val5 in array5) { if ((Object)(object)val5 == (Object)null) { continue; } string text2 = ((object)val5).GetType().Name.ToLowerInvariant(); if (text2.Contains("vfx") || text2.Contains("effect") || text2.Contains("particle") || text2.Contains("sway") || text2.Contains("wobble") || text2.Contains("jiggle") || text2.Contains("bob") || text2.Contains("idle") || text2.Contains("wind") || text2.Contains("float") || text2.Contains("squash")) { try { ((Behaviour)val5).enabled = false; } catch { } } } } catch { } } private void AttachFungusFrameLock(GameObject root) { if ((Object)(object)root == (Object)null) { return; } try { FungusFrameLocker fungusFrameLocker = root.GetComponent(); if ((Object)(object)fungusFrameLocker == (Object)null) { fungusFrameLocker = root.AddComponent(); } fungusFrameLocker.Capture(root.transform); } catch { } } private void HandleBeachObjectsToggle() { if (beachTreesEnabled.Value != lastBeachTreesEnabledValue) { lastBeachTreesEnabledValue = beachTreesEnabled.Value; if (beachTreesEnabled.Value) { RestoreBeachObjects(); } else { DisableBeachObjects(); } } } private void DisableBeachObjects() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) if (disabledBeachObjects.Count > 0 || !IsProbablyInIslandMap()) { return; } GameObject[] array = Object.FindObjectsOfType(true); string[] keywords = beachObjectNameKeywords.Value.ToLowerInvariant().Split(new char[1] { ',' }); GameObject[] array2 = array; foreach (GameObject val in array2) { if ((Object)(object)val == (Object)null || !val.activeInHierarchy || !IsInBeachObjectZRange(val.transform.position) || !NameMatchesBeachObjectKeyword(((Object)val).name, keywords) || IsImportantObject(val)) { continue; } GameObject val2 = FindBestBeachObjectRoot(val); if ((Object)(object)val2 == (Object)null || IsImportantObject(val2)) { continue; } if (hardDeleteBeachObjects.Value) { Object.Destroy((Object)(object)val2); continue; } if (!disabledBeachObjects.Contains(val2)) { disabledBeachObjects.Add(val2); } val2.SetActive(false); } } private void RestoreBeachObjects() { for (int num = disabledBeachObjects.Count - 1; num >= 0; num--) { GameObject val = disabledBeachObjects[num]; if ((Object)(object)val == (Object)null) { disabledBeachObjects.RemoveAt(num); } else { val.SetActive(true); disabledBeachObjects.RemoveAt(num); } } } private bool IsInBeachObjectZRange(Vector3 pos) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Min(beachObjectMinZ.Value, beachObjectMaxZ.Value); float num2 = Mathf.Max(beachObjectMinZ.Value, beachObjectMaxZ.Value); return pos.z >= num && pos.z <= num2; } private bool NameMatchesBeachObjectKeyword(string objectName, string[] keywords) { if (string.IsNullOrEmpty(objectName)) { return false; } string text = objectName.ToLowerInvariant(); foreach (string text2 in keywords) { string value = text2.Trim(); if (!string.IsNullOrEmpty(value) && text.Contains(value)) { return true; } } return false; } private GameObject FindBestBeachObjectRoot(GameObject obj) { if ((Object)(object)obj == (Object)null) { return null; } Transform val = obj.transform; Transform val2 = val; while ((Object)(object)val.parent != (Object)null) { Transform parent = val.parent; if ((Object)(object)parent == (Object)null || IsImportantObject(((Component)parent).gameObject)) { break; } string text = ((Object)((Component)parent).gameObject).name.ToLowerInvariant(); if (text.Contains("tree") || text.Contains("palm") || text.Contains("coconut") || text.Contains("wood") || text.Contains("log") || text.Contains("trunk")) { val2 = parent; val = parent; continue; } break; } return ((Component)val2).gameObject; } private bool IsImportantObject(GameObject obj) { if ((Object)(object)obj == (Object)null) { return true; } if ((Object)(object)obj.GetComponent() != (Object)null) { return true; } if ((Object)(object)obj.GetComponentInParent() != (Object)null) { return true; } if ((Object)(object)obj.GetComponent() != (Object)null) { return true; } if ((Object)(object)obj.GetComponentInParent() != (Object)null) { return true; } if ((Object)(object)obj.GetComponent() != (Object)null) { return true; } if ((Object)(object)obj.GetComponentInParent() != (Object)null) { return true; } string text = ((Object)obj).name.ToLowerInvariant(); if (text.Contains("player")) { return true; } if (text.Contains("character")) { return true; } if (text.Contains("camera")) { return true; } if (text.Contains("manager")) { return true; } if (text.Contains("ui")) { return true; } if (text.Contains("canvas")) { return true; } if (text.Contains("network")) { return true; } if (text.Contains("spawnpoint")) { return true; } return false; } private bool IsNearRoundResultPodiumTeleportPosition(Vector3 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) try { for (int i = 0; i < RoundResultPodiumTeleportPositionsByRank.Length; i++) { if (Vector3.Distance(pos, RoundResultPodiumTeleportPositionsByRank[i]) <= 0.35f) { return true; } Vector3 roundResultPodiumTeleportPositionForRank = GetRoundResultPodiumTeleportPositionForRank(i); if (Vector3.Distance(pos, roundResultPodiumTeleportPositionForRank) <= 0.35f) { return true; } } } catch { } return false; } private bool IsWithinRoundArenaTeleportArea(Vector3 pos) { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) try { float num = Mathf.Min(arenaStartX.Value, arenaEndX.Value) - 8f; float num2 = Mathf.Max(arenaStartX.Value, arenaEndX.Value) + 8f; float num3 = ForcedArenaMinZ() - 8f; float num4 = ForcedArenaMaxZ() + 8f; float num5 = Mathf.Min(arenaY.Value, round4UpperArenaY.Value) - 6f; float num6 = Mathf.Max(arenaY.Value, round4UpperArenaY.Value) + 18f; return pos.x >= num && pos.x <= num2 && pos.z >= num3 && pos.z <= num4 && pos.y >= num5 && pos.y <= num6; } catch { return false; } } private bool IsNearRound6RescueTeleportPosition(Vector3 pos) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) try { if (currentRoundType != RoundGameType.ColorCloudSurvival) { return false; } Vector3 round6CenterRescuePosition = GetRound6CenterRescuePosition(); return Vector3.Distance(pos, round6CenterRescuePosition) <= 7.5f || IsWithinRoundArenaTeleportArea(pos); } catch { return false; } } internal bool ShouldAllowIncomingCharacterTeleport(Character character, Vector3 pos, string source) { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) try { if ((Object)(object)character == (Object)null) { return true; } if (!enableMod.Value) { return true; } if (!IsProbablyInIslandMap()) { return true; } if (gameState == GameState.Idle && !roundFinishInProgress && !roundVoteActive && !flareReadyActive && !(roundEndStartedAt > 0f) && !(Time.time < roundBetweenMovementLockUntil)) { return true; } if (!IsSafeTeleportPosition(pos)) { LogBlockedUnexpectedTeleport(source + ":unsafe", pos); return false; } if (gameState == GameState.RoundStarting || roundStartTeleportWindow) { bool flag = IsWithinRoundArenaTeleportArea(pos); if (!flag) { LogBlockedUnexpectedTeleport(source + ":round-start-non-arena", pos); } return flag; } if (gameState == GameState.RoundEnding || roundFinishInProgress || roundEndStartedAt > 0f || roundResultPanelActive || roundEndEmoteRoutine != null || Time.time < roundBetweenMovementLockUntil) { bool flag2 = IsNearRoundResultPodiumTeleportPosition(pos); if (!flag2) { LogBlockedUnexpectedTeleport(source + ":round-end-non-podium", pos); } return flag2; } if (gameState == GameState.Running) { bool flag3 = currentRoundType == RoundGameType.ColorCloudSurvival && IsNearRound6RescueTeleportPosition(pos); if (!flag3) { LogBlockedUnexpectedTeleport(source + ":running-blocked", pos); } return flag3; } } catch { } return true; } internal bool InterceptRoundEndCharacterCam(MainCameraMovement movement) { try { if (!ShouldInterceptPartyGamesCharacterCamera()) { return true; } bool flag = IsPodiumTestCameraOnlyModeActive(); if (flag) { podiumTestCameraDebugCharacterCamPrefixCalls++; podiumTestCameraDebugLastCharacterCamPrefixTime = Time.unscaledTime; LogPodiumTestCameraDebugThrottled("CharacterCamPrefix_Enter"); } if (!IsPartyGamesMainCameraTarget(movement)) { if (flag) { LogPodiumTestCameraDebugThrottled("CharacterCamPrefix_NotMainTarget"); } return true; } roundEndCameraPerfCharacterCamBlocks++; if (flag) { podiumTestCameraDebugCharacterCamBlockedCalls++; } Stopwatch stopwatch = Stopwatch.StartNew(); ApplyRoundEndFrontCameraPose(instant: false); stopwatch.Stop(); roundEndCameraPerfPoseMsTotal += stopwatch.Elapsed.TotalMilliseconds; roundEndCameraPerfPoseCalls++; if (flag) { LogPodiumTestCameraDebugThrottled("CharacterCamPrefix_BlockedAndApplied"); } return false; } catch { return true; } } internal bool ShouldPreventKickStaminaCost(Character character) { try { if (!enableMod.Value) { return false; } if ((Object)(object)character == (Object)null || (Object)(object)character.input == (Object)null || (Object)(object)character.data == (Object)null) { return false; } if ((Object)(object)Character.localCharacter != (Object)null && (Object)(object)character != (Object)(object)Character.localCharacter) { return false; } if (!character.IsLocal) { return false; } if ((Object)(object)character.data.currentItem != (Object)null) { return false; } if (!character.input.useSecondaryIsPressed && !character.input.useSecondaryWasPressed) { return false; } if (character.data.isClimbing || character.data.isRopeClimbing || character.data.isVineClimbing) { return false; } return true; } catch { return false; } } public Plugin() { //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) KeyCode[] array = new KeyCode[4]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); rhythmKeys = (KeyCode[])(object)array; rhythmSequence = ""; rhythmNoteTargetOffsets = new float[0]; rhythmRoundSubmissions = new Dictionary(); rhythmRoundProgressByActor = new Dictionary(); rhythmCenterResultPanelUntil = -1f; rhythmSlotPopUntil = new float[4]; rhythmNoteJudged = new bool[64]; rhythmNoteHit = new bool[64]; round6TileColors = new Dictionary(); activeTileLowerRoutines = new Dictionary(); round6OriginalPositions = new Dictionary(); round6OriginalRendererMaterials = new Dictionary(); round7CurrentKey = (KeyCode)0; round7LocalRandomKeySequence = (KeyCode[])(object)new KeyCode[0]; round7ProgressByActor = new Dictionary(); round7FinishTimes = new Dictionary(); round7RankByActor = new Dictionary(); round8StarCell = new Vector2Int(3, 3); round8ElectricCells = (Vector2Int[])(object)new Vector2Int[5] { new Vector2Int(-1, -1), new Vector2Int(-1, -1), new Vector2Int(-1, -1), new Vector2Int(-1, -1), new Vector2Int(-1, -1) }; round8PositionsByActor = new Dictionary(); round8StarsByActor = new Dictionary(); round8ParalyzedUntilByActor = new Dictionary(); round9WrongRevealUntil = -1f; round9FirstPickIndex = -1; round9TempRevealIndex = -1; round9BoardNumbers = new int[16]; round9Revealed = new bool[16]; round9TurnOrder = new List(); round9PairScores = new Dictionary(); round9FinishTimes = new Dictionary(); round10CardFruit = new int[4]; round10CardCount = new int[4]; round10Deck = new List(); round10ScoresByActor = new Dictionary(); round10BellPenaltyUntilByActor = new Dictionary(); round11DinoExternalResetGuardUntil = -999f; round11DinoJumpStartTime = -999f; round11DinoLastSpaceHeldJumpTime = -999f; round11DinoObstacleTimes = new float[0]; round11DinoObstacleTypes = new int[0]; round11DinoFailFreezeEndTime = -999f; round11DinoClearFreezeEndTime = -999f; round11DinoGlobalEndAllowedTime = -999f; round11DebugNextLogTime = -1f; round11DebugNextGuiLogTime = -1f; round11DinoPassedByActor = new Dictionary(); round11DinoFailedByActor = new Dictionary(); round11DinoPenaltyByActor = new Dictionary(); languageSwitchNoticeText = ""; languageSwitchNoticeUntil = -999f; tipGuideInputIgnoreUntil = -999f; round11DinoScoreByActor = new Dictionary(); round11DinoFinalSubmittedActors = new HashSet(); round11DinoPenaltyNoticeUntil = -999f; round11DinoPenaltyNoticeStartTime = -999f; ((BaseUnityPlugin)this)..ctor(); } } [HarmonyPatch(typeof(Action_Flare), "RunAction")] internal static class ActionFlareRunActionPatch { private static void Postfix(Action_Flare __instance) { try { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null || (Object)(object)__instance == (Object)null) { return; } Item val = null; try { val = ((Component)__instance).GetComponent(); } catch { } if ((Object)(object)val == (Object)null) { try { val = ((Component)__instance).GetComponentInParent(); } catch { } } if ((Object)(object)val == (Object)null) { try { val = ((Component)__instance).GetComponentInChildren(true); } catch { } } Character val2 = null; try { if ((Object)(object)val != (Object)null) { val2 = val.holderCharacter; } } catch { } if ((!((Object)(object)val2 != (Object)null) || !((Object)(object)Character.localCharacter != (Object)null) || !((Object)(object)val2 != (Object)(object)Character.localCharacter)) && (!((Object)(object)val2 != (Object)null) || val2.IsLocal)) { instance.RequestStartFromFlare(); } } catch { } } } internal static class ThirdPersonToggleRuntimeCameraBlockPatch { } [HarmonyPatch(typeof(MainCameraMovement), "CharacterCam")] internal static class MainCameraMovementCharacterCamPartyGamesPatch { [HarmonyPriority(800)] private static bool Prefix(MainCameraMovement __instance) { try { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { return true; } return instance.InterceptRoundEndCharacterCam(__instance); } catch { return true; } } } [HarmonyPatch(typeof(Input), "GetKeyDown", new Type[] { typeof(KeyCode) })] internal static class InputGetKeyDownThirdPersonVBlockPatch { private static bool Prefix(KeyCode key, ref bool __result) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Invalid comparison between Unknown and I4 try { if ((int)key != 118) { return true; } if (!Plugin.ShouldFastBlockThirdPersonVInput()) { return true; } __result = false; return false; } catch { return true; } } } [HarmonyPatch(typeof(Input), "GetKey", new Type[] { typeof(KeyCode) })] internal static class InputGetKeyThirdPersonVBlockPatch { private static bool Prefix(KeyCode key, ref bool __result) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Invalid comparison between Unknown and I4 try { if ((int)key != 118) { return true; } if (!Plugin.ShouldFastBlockThirdPersonVInput()) { return true; } __result = false; return false; } catch { return true; } } } [HarmonyPatch(typeof(Input), "GetKeyUp", new Type[] { typeof(KeyCode) })] internal static class InputGetKeyUpThirdPersonVBlockPatch { private static bool Prefix(KeyCode key, ref bool __result) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Invalid comparison between Unknown and I4 try { if ((int)key != 118) { return true; } if (!Plugin.ShouldFastBlockThirdPersonVInput()) { return true; } __result = false; return false; } catch { return true; } } } [HarmonyPatch(typeof(Character), "WarpPlayerRPC")] internal static class CharacterWarpPlayerRPCPartyGamesTeleportGuardPatch { private static bool Prefix(Character __instance, Vector3 position, ref bool poof) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) try { poof = false; Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { return true; } instance.LogTeleportPositionNow(__instance, "INCOMING_WarpPlayerRPC_PREFIX", position); if (instance.ShouldSuppressTeleportAssistForPureOriginalPodiumTest(__instance, position)) { return true; } bool flag = instance.ShouldAllowIncomingCharacterTeleport(__instance, position, "WarpPlayerRPC"); if (!flag) { instance.LogTeleportPositionNow(__instance, "INCOMING_WarpPlayerRPC_BLOCKED", position); } return flag; } catch { return true; } } private static void Postfix(Character __instance, Vector3 position, bool poof) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) try { Plugin instance = Plugin.Instance; if (!((Object)(object)instance == (Object)null)) { instance.LogTeleportPositionNow(__instance, "INCOMING_WarpPlayerRPC_POSTFIX", position); instance.LogTeleportPositionDelayed(__instance, "INCOMING_WarpPlayerRPC_POSTFIX_DELAY", position, 0.2f); instance.LogTeleportPositionDelayed(__instance, "INCOMING_WarpPlayerRPC_POSTFIX_DELAY", position, 1f); } } catch { } } } [HarmonyPatch(typeof(Character), "RPCA_ReviveAtPosition")] internal static class CharacterReviveAtPositionPartyGamesTeleportGuardPatch { private static bool Prefix(Character __instance, Vector3 position, bool applyStatus, int statueSegment) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) try { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { return true; } instance.LogTeleportPositionNow(__instance, "INCOMING_RPCA_ReviveAtPosition_PREFIX", position); bool flag = instance.ShouldAllowIncomingCharacterTeleport(__instance, position, "RPCA_ReviveAtPosition"); if (!flag) { instance.LogTeleportPositionNow(__instance, "INCOMING_RPCA_ReviveAtPosition_BLOCKED", position); } return flag; } catch { return true; } } private static void Postfix(Character __instance, Vector3 position, bool applyStatus, int statueSegment) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) try { Plugin instance = Plugin.Instance; if (!((Object)(object)instance == (Object)null)) { instance.LogTeleportPositionNow(__instance, "INCOMING_RPCA_ReviveAtPosition_POSTFIX", position); instance.LogTeleportPositionDelayed(__instance, "INCOMING_RPCA_ReviveAtPosition_POSTFIX_DELAY", position, 0.2f); instance.LogTeleportPositionDelayed(__instance, "INCOMING_RPCA_ReviveAtPosition_POSTFIX_DELAY", position, 1f); } } catch { } } } [HarmonyPatch(typeof(CharacterInput), "Sample")] internal static class CharacterInputSampleMovementLockPatch { private static void Postfix(CharacterInput __instance) { try { Plugin instance = Plugin.Instance; if (!((Object)(object)instance == (Object)null)) { if (instance.ShouldHardBlockRoundEndCameraInput(__instance)) { Plugin.ClearRoundEndCameraInput(__instance); } else if (instance.ShouldHardBlockLocalMovementInput(__instance)) { Plugin.ClearMovementOnlyInput(__instance); } } } catch { } } } [HarmonyPatch(typeof(Affliction_Invincibility), "UpdateEffectNetworked")] internal static class AfflictionInvincibilityHideIslandGlowPatch { private static bool Prefix() { try { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { return true; } if (!instance.ShouldSuppressIslandInvincibilityGlow()) { return true; } return false; } catch { return true; } } } [HarmonyPatch(typeof(CharacterAfflictions), "AddStatus")] internal static class CharacterAfflictionsAddStatusIslandDamageBlockPatch { private static bool Prefix(CharacterAfflictions __instance, STATUSTYPE statusType, float amount, bool fromRPC, bool playEffects, bool notify, ref bool __result) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) try { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { return true; } if (!instance.ShouldBlockIslandStatus(__instance, statusType, amount)) { return true; } __result = false; return false; } catch { return true; } } } [HarmonyPatch(typeof(Character), "UseStamina")] internal static class CharacterUseStaminaNoKickCostPatch { private static bool Prefix(Character __instance, float usage, bool useBonusStamina, ref bool __result) { try { Plugin instance = Plugin.Instance; if ((Object)(object)instance == (Object)null) { return true; } if (!instance.ShouldPreventKickStaminaCost(__instance)) { return true; } __result = true; return false; } catch { return true; } } }