using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("ClassLibrary2")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ClassLibrary2")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c4f1db90-43ed-4e88-9794-ff9b0f4562ad")] [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")] [BepInPlugin("com.user.goi.risingtide", "Rising Tide", "8.2.0")] public class RisingTide : BaseUnityPlugin { [CompilerGenerated] private sealed class d__15 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RisingTide <>4__this; private Rigidbody2D[] <>s__1; private int <>s__2; private Rigidbody2D 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (!<>4__this.isDifficultyChosen) { Time.timeScale = 0f; AudioListener.pause = true; if ((Object)(object)<>4__this.playerTransform != (Object)null) { <>s__1 = ((Component)<>4__this.playerTransform).GetComponentsInChildren(); for (<>s__2 = 0; <>s__2 < <>s__1.Length; <>s__2++) { 5__3 = <>s__1[<>s__2]; 5__3.simulated = false; 5__3.velocity = Vector2.zero; 5__3 = null; } <>s__1 = null; } <>2__current = (object)new WaitForEndOfFrame(); <>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__16 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RisingTide <>4__this; private GameObject 5__1; private string[] 5__2; private string[] <>s__3; private int <>s__4; private string 5__5; private GameObject 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>s__3 = null; 5__5 = null; 5__6 = null; <>1__state = -2; } private bool MoveNext() { //IL_00c6: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = null; break; case 1: <>1__state = -1; break; } if ((Object)(object)5__1 == (Object)null) { 5__1 = GameObject.Find("Player") ?? GameObject.FindGameObjectWithTag("Player"); <>2__current = null; <>1__state = 1; return true; } <>4__this.playerTransform = 5__1.transform; <>4__this.waterObject = GameObject.Find("Water"); if ((Object)(object)<>4__this.waterObject != (Object)null) { <>4__this.waterStartPos = <>4__this.waterObject.transform.position; } 5__2 = new string[5] { "Sensor", "Splashes", "WaterSplashes", "waterSplashes", "FallTrigger" }; <>s__3 = 5__2; for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { 5__5 = <>s__3[<>s__4]; 5__6 = GameObject.Find(5__5); if ((Object)(object)5__6 != (Object)null) { <>4__this.deathTriggers.Add(5__6); } 5__6 = null; 5__5 = null; } <>s__3 = null; <>4__this.initialized = true; if (Time.unscaledTime - <>4__this.lastWaterHitTime <= 5f) { <>4__this.isDifficultyChosen = true; <>4__this.isWaitingToStart = false; } else { <>4__this.isDifficultyChosen = false; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ForceFreezeLoop()); <>4__this.CreateDifficultyMenu(); } 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__22 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public RisingTide <>4__this; private List.Enumerator <>s__1; private GameObject
5__2; private Rigidbody2D[] <>s__3; private int <>s__4; private Rigidbody2D 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = default(List.Enumerator);
5__2 = null; <>s__3 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_0148: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isRestarting = true; if ((Object)(object)<>4__this.waterObject != (Object)null) { <>4__this.waterObject.transform.position = <>4__this.waterStartPos; } <>s__1 = <>4__this.deathTriggers.GetEnumerator(); try { while (<>s__1.MoveNext()) {
5__2 = <>s__1.Current; if ((Object)(object)
5__2 != (Object)null) {
5__2.transform.position = <>4__this.waterStartPos; }
5__2 = null; } } finally { ((IDisposable)<>s__1).Dispose(); } <>s__1 = default(List.Enumerator); <>4__this.playerTransform.position = <>4__this.resetPos; <>s__3 = ((Component)<>4__this.playerTransform).GetComponentsInChildren(); for (<>s__4 = 0; <>s__4 < <>s__3.Length; <>s__4++) { 5__5 = <>s__3[<>s__4]; 5__5.velocity = Vector2.zero; ((Component)5__5).transform.position = <>4__this.resetPos; 5__5 = null; } <>s__3 = null; ((Component)<>4__this.playerTransform).gameObject.SendMessage("Save", (SendMessageOptions)1); <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.isRestarting = false; if (Time.unscaledTime - <>4__this.lastWaterHitTime > 5f) { <>4__this.isDifficultyChosen = false; ((MonoBehaviour)<>4__this).StartCoroutine(<>4__this.ForceFreezeLoop()); <>4__this.CreateDifficultyMenu(); } else { <>4__this.isDifficultyChosen = true; <>4__this.isWaitingToStart = 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__20 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float delay; public RisingTide <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__20(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isWaitingToStart = true; if (delay > 0f) { <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } <>4__this.isWaitingToStart = 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(); } } private float currentBaseSpeed = 0.1f; private float savedDelay = 3.5f; private float lastWaterHitTime = -100f; private GameObject waterObject; private List deathTriggers = new List(); private Transform playerTransform; private Vector3 waterStartPos; private Vector3 resetPos = new Vector3(-43.7f, -1.6f, 0f); private bool initialized = false; private bool isRestarting = false; private bool menuOpen = false; private bool isWaitingToStart = false; private bool isDifficultyChosen = false; private void Awake() { SceneManager.sceneLoaded += OnSceneLoaded; } private void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if (((Scene)(ref scene)).name == "Mian") { initialized = false; isRestarting = false; isWaitingToStart = false; isDifficultyChosen = false; menuOpen = false; deathTriggers.Clear(); ((MonoBehaviour)this).StartCoroutine(InitializeTideSystem()); } } [IteratorStateMachine(typeof(d__15))] private IEnumerator ForceFreezeLoop() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { <>4__this = this }; } [IteratorStateMachine(typeof(d__16))] private IEnumerator InitializeTideSystem() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__16(0) { <>4__this = this }; } private void CreateDifficultyMenu() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_008a: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_0117: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Expected O, but got Unknown //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown if (!menuOpen) { menuOpen = true; GameObject val = GameObject.Find("Canvas"); if (!((Object)(object)val == (Object)null)) { GameObject val2 = new GameObject("MenuBlocker", new Type[2] { typeof(RectTransform), typeof(Image) }); val2.transform.SetParent(val.transform, false); val2.GetComponent().sizeDelta = new Vector2((float)(Screen.width * 3), (float)(Screen.height * 3)); ((Graphic)val2.GetComponent()).color = new Color(0f, 0f, 0f, 0.85f); GameObject val3 = new GameObject("DifficultyPanel", new Type[3] { typeof(RectTransform), typeof(Image), typeof(VerticalLayoutGroup) }); val3.transform.SetParent(val2.transform, false); RectTransform component = val3.GetComponent(); component.sizeDelta = new Vector2(400f, 500f); ((Graphic)val3.GetComponent()).color = new Color(0.1f, 0.1f, 0.1f, 1f); VerticalLayoutGroup component2 = val3.GetComponent(); ((LayoutGroup)component2).childAlignment = (TextAnchor)1; ((HorizontalOrVerticalLayoutGroup)component2).spacing = 15f; ((LayoutGroup)component2).padding = new RectOffset(20, 20, 40, 20); GameObject val4 = new GameObject("Title", new Type[2] { typeof(RectTransform), typeof(TextMeshProUGUI) }); val4.transform.SetParent(val3.transform, false); TextMeshProUGUI component3 = val4.GetComponent(); ((TMP_Text)component3).text = "SELECT DIFFICULTY"; ((TMP_Text)component3).fontSize = 28f; ((TMP_Text)component3).alignment = (TextAlignmentOptions)514; CreateMenuButton(val3.transform, "Beginner", 0.025f, 3.5f, val2); CreateMenuButton(val3.transform, "Intermediate", 0.13f, 3.5f, val2); CreateMenuButton(val3.transform, "Fast", 0.24f, 3.5f, val2); CreateMenuButton(val3.transform, "SpeedRunner", 0.38f, 3.5f, val2); CreateMenuButton(val3.transform, "WR Guys", 0.65f, 4f, val2); Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } } } private void CreateMenuButton(Transform parent, string label, float speed, float delay, GameObject blocker) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0077: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_0117: 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) GameObject val = new GameObject(label, new Type[3] { typeof(RectTransform), typeof(Button), typeof(Image) }); val.transform.SetParent(parent, false); val.GetComponent().sizeDelta = new Vector2(300f, 50f); ((Graphic)val.GetComponent()).color = new Color(0.2f, 0.2f, 0.2f, 1f); Button component = val.GetComponent