using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AngryLoaderAPI; using RudeLevelScript; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("RudeLevelScripts")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+3560ceecf45b141c239f8eb6f8b50cb6e50e3a20")] [assembly: AssemblyProduct("RudeLevelScripts")] [assembly: AssemblyTitle("RudeLevelScripts")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace RudeLevelScript { [Serializable] public class LayerInfo { public string layerName = ""; public string[] layerLevels = new string[0]; } public class FirstRoomSpawner : MonoBehaviour, ISerializationCallbackReceiver { [HideInInspector] internal class PlayerForcedMovement : MonoBehaviour { public NewMovement player; private Rigidbody rb; public static float defaultMoveForce = 67f; public float force = defaultMoveForce; public void Awake() { if ((Object)(object)player == (Object)null) { player = MonoSingleton.Instance; } rb = ((Component)player).GetComponent(); rb.useGravity = false; } public void LateUpdate() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) rb.velocity = new Vector3(0f, force, 0f); } public void DestroyComp() { rb.useGravity = true; Object.Destroy((Object)(object)this); } } [HideInInspector] private class LocalMoveTowards : MonoBehaviour { public Vector3 targetLocalPosition; public bool active; public float speed = 10f; public void Update() { //IL_0015: 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_002c: 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_0042: Unknown result type (might be due to invalid IL or missing references) if (active) { ((Component)this).transform.localPosition = Vector3.MoveTowards(((Component)this).transform.localPosition, targetLocalPosition, Time.deltaTime * speed); if (((Component)this).transform.localPosition == targetLocalPosition) { Object.Destroy((Object)(object)this); } } } public void Activate() { active = true; } } [HideInInspector] private class CustomHellmapCursor : MonoBehaviour { public Vector2 targetPosition; public Image targetImage; public AudioSource aud; private bool white = true; private RectTransform rect; private void Start() { rect = ((Component)this).GetComponent(); ((MonoBehaviour)this).Invoke("FlashImage", 0.075f); } private void Update() { //IL_000c: 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) //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_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_0043: Unknown result type (might be due to invalid IL or missing references) rect.anchoredPosition = Vector2.MoveTowards(rect.anchoredPosition, targetPosition, Time.deltaTime * 4f * Vector3.Distance(Vector2.op_Implicit(rect.anchoredPosition), Vector2.op_Implicit(targetPosition))); } private void FlashImage() { //IL_005b: 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) if (white) { white = false; ((Graphic)targetImage).color = new Color(0f, 0f, 0f, 0f); if (!((Component)this).gameObject.activeSelf) { return; } aud.Play(); } else { white = true; ((Graphic)targetImage).color = Color.white; } if (((Component)this).gameObject.activeInHierarchy) { ((MonoBehaviour)this).Invoke("FlashImage", 0.075f); } } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__38_5; public static Func <>9__39_1; public static Func <>9__39_2; public static Func <>9__39_4; internal void b__38_5() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MonoSingleton.Instance.spawnPos = ((Component)MonoSingleton.Instance).transform.position; } internal Transform b__39_1(GameObject go) { return go.transform; } internal OnLevelStart b__39_2(GameObject go) { return go.GetComponent(); } internal bool b__39_4(GameObject o) { return ((Object)o).name == "Canvas"; } } [Tooltip("Player will be moved to this position if the room is not ascending variant. If null, default position is used")] public Transform playerSpawnPos; [HideInInspector] [Tooltip("If set to true, room will not be deleted. Else, it will be replaced in game")] public bool doNotReplace; [Header("Replace Settings")] [Tooltip("Enabling this field causes room to be spawned as the secret variant")] [HideInInspector] public bool secretRoom; [Tooltip("Enabling this field causes room to be spawned as the prime variant")] [HideInInspector] public bool primeRoom; [Tooltip("Enabling this field causes room to be spawned as the encore variant")] [HideInInspector] public bool encoreRoom; [HideInInspector] [Tooltip("Enabling this field causes the whole room to be converted into the ascending variant where the player is spawned at the bottom and ascends upwards instead of falling")] public bool convertToUpwardRoom; [HideInInspector] [Tooltip("This clip will be played when the trap door closes beneath the player for ascending rooms")] public AudioClip upwardRoomDoorCloseClip; [HideInInspector] [Tooltip("If bottom part of the ascending room collides with out of bounds triggers, this list can temporarely disable them while the player is ascending")] public List upwardRoomOutOfBoundsToDisable; [Header("Player Fields")] [Space(10f)] public CameraClearFlags cameraFillMode = (CameraClearFlags)2; public Color backgroundColor = Color.black; public float cameraNearClipPlane = 0.1f; public float cameraFarClipPlane = 4000f; [Header("Level Fields")] [Space(10f)] [Tooltip("If set to true, level title will be displayed when the door is opened")] public bool displayLevelTitle = true; [Tooltip("If set to true, music will start when the door is opened")] public bool startMusic = true; [Header("Hellmap")] [Tooltip("Enable the layer and level map when the player spawn")] [Space(10f)] public bool enableHellMap; [Tooltip("Sound clip which is played for each beep while falling")] public AudioClip hellmapBeepClip; [Tooltip("Each layer has a layer name and number of levels. For limbo the header is LIMBO and levels are [1-1, 1-2, 1-3, 1-4]")] public List layersAndLevels = new List(); [HideInInspector] public List levelSizes = new List(); [HideInInspector] public List layerNames = new List(); [HideInInspector] public List levelNames = new List(); [Tooltip("Which layer the cursor starts from. First layer is 0 and at the top")] public int layerIndexToStartFrom; [Tooltip("Which level in the layer the cursor starts from. The first level is 0 and is just below the layer title (the uppermost level)")] public int levelIndexToStartFrom; [Tooltip("Which layer the cursor ends at. First layer is 0 and at the top")] public int layerIndexToEndAt; [Tooltip("Which level in the layer the cursor ends at. The first level is 0 and is just below the layer title (the uppermost level)")] public int levelIndexToEndAt; private bool spawned; public static float upDisablePos = 60f; public static float doorClosePos = 10f; public static float doorCloseSpeed = 10f; public static float actDelay = 0.5f; public static float ascendingPlayerSpawnPos = -55f; public void OnBeforeSerialize() { levelSizes.Clear(); layerNames.Clear(); levelNames.Clear(); for (int i = 0; i < layersAndLevels.Count; i++) { layerNames.Add(layersAndLevels[i].layerName); levelSizes.Add(layersAndLevels[i].layerLevels.Length); levelNames.AddRange(layersAndLevels[i].layerLevels); } } public void Deserialize() { layersAndLevels.Clear(); int num = 0; for (int i = 0; i < levelSizes.Count; i++) { LayerInfo layerInfo = new LayerInfo(); layerInfo.layerName = layerNames[i]; int num2 = levelSizes[i]; layerInfo.layerLevels = new string[num2]; for (int j = 0; j < num2; j++) { layerInfo.layerLevels[j] = levelNames[num++]; } layersAndLevels.Add(layerInfo); } } public void OnAfterDeserialize() { } private static Text MakeText(Transform parent) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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_0017: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(); ((Transform)val.AddComponent()).SetParent(parent); val.transform.localScale = Vector3.one; return val.AddComponent(); } private static RectTransform MakeRect(Transform parent) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) RectTransform obj = new GameObject().AddComponent(); ((Transform)obj).SetParent(parent); return obj; } public static void ConvertToAscendingFirstRoom(GameObject firstRoom, AudioClip doorCloseAud, List toEnable, List toDisable, bool doNotReplace) { //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: 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_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: 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_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: 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_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Expected O, but got Unknown //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Expected O, but got Unknown //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Expected O, but got Unknown //IL_0442: 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_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0481: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_0491: 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_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: 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_04f1: Expected O, but got Unknown //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Expected O, but got Unknown //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Expected O, but got Unknown //IL_052f: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Expected O, but got Unknown //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Expected O, but got Unknown //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Expected O, but got Unknown //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Expected O, but got Unknown //IL_004c: 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_00cd: 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_0104: 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_013b: 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_0181: 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_01d9: 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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Expected O, but got Unknown Transform val = firstRoom.transform.Find("Room"); if (!doNotReplace) { Transform obj = val.Find("Pit (3)"); ((Component)obj).transform.localPosition = new Vector3(0f, 2f, 41.72f); ((Component)obj).transform.localRotation = Quaternion.Euler(0f, 0f, 180f); Object.Destroy((Object)(object)((Component)((Component)val).transform.Find("Room/Ceiling")).gameObject); Transform val2 = ((Component)val).transform.Find("Room/Floor"); GameObject gameObject = ((Component)val2.GetChild(0)).gameObject; GameObject obj2 = Object.Instantiate(gameObject, val2); obj2.transform.localPosition = new Vector3(-15f, 9.7f, 20.28f); obj2.transform.localRotation = Quaternion.identity; GameObject obj3 = Object.Instantiate(gameObject, val2); obj3.transform.localPosition = new Vector3(5f, 9.7f, 20.28f); obj3.transform.localRotation = Quaternion.identity; GameObject obj4 = Object.Instantiate(gameObject, val2); obj4.transform.localPosition = new Vector3(-5f, 9.7f, 0.2f); obj4.transform.localRotation = Quaternion.Euler(0f, -90f, 0f); GameObject obj5 = Object.Instantiate(gameObject, val2); obj5.transform.localPosition = new Vector3(5f, 9.7f, 10.28f); obj5.transform.localRotation = Quaternion.identity; ((Renderer)obj5.GetComponent()).materials = (Material[])(object)new Material[2] { Utils.metalDec20, Utils.metalDec20 }; GameObject obj6 = Object.Instantiate(gameObject, val2); obj6.transform.localPosition = new Vector3(-15f, 9.7f, 10.28f); obj6.transform.localRotation = Quaternion.identity; ((Renderer)obj6.GetComponent()).materials = (Material[])(object)new Material[2] { Utils.metalDec20, Utils.metalDec20 }; GameObject obj7 = Object.Instantiate(gameObject, val2); obj7.transform.localPosition = new Vector3(-5f, -0.3f, 20.28f); obj7.transform.localRotation = Quaternion.Euler(0f, -90f, -180f); } Transform child = val.Find("Decorations").GetChild(12); child.localPosition = new Vector3(-5f, 2f, 52f); LocalMoveTowards floorMover = ((Component)child).gameObject.AddComponent(); floorMover.targetLocalPosition = new Vector3(-5f, 2f, 42f); floorMover.speed = doorCloseSpeed; AudioSource floorTileAud = ((Component)child).gameObject.AddComponent(); floorTileAud.playOnAwake = false; floorTileAud.loop = false; floorTileAud.clip = doorCloseAud; PlayerActivator act = firstRoom.GetComponentsInChildren().First(); ((Component)act).gameObject.SetActive(false); NewMovement instance = MonoSingleton.Instance; ((Component)instance).transform.localPosition = new Vector3(((Component)instance).transform.localPosition.x, ascendingPlayerSpawnPos, ((Component)instance).transform.localPosition.z); PlayerForcedMovement focedMov = ((Component)instance).gameObject.AddComponent(); GameObject val3 = new GameObject(); val3.transform.SetParent(((Component)act).transform.parent); val3.transform.localPosition = new Vector3(0f, upDisablePos, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = new Vector3(80f, 0.2f, 80f); val3.layer = ((Component)act).gameObject.layer; ((Collider)val3.AddComponent()).isTrigger = true; ObjectActivator obj8 = val3.AddComponent(); obj8.dontActivateOnEnable = true; obj8.oneTime = true; obj8.events = new UltrakillEvent(); obj8.events.onActivate = new UnityEvent(); obj8.events.onActivate.AddListener((UnityAction)delegate { focedMov.DestroyComp(); }); GameObject val4 = new GameObject(); val4.transform.SetParent(((Component)act).transform.parent); val4.transform.localPosition = new Vector3(0f, doorClosePos, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = new Vector3(80f, 0.2f, 80f); val4.layer = ((Component)act).gameObject.layer; ((Collider)val4.AddComponent()).isTrigger = true; ObjectActivator obj9 = val4.AddComponent(); obj9.dontActivateOnEnable = true; obj9.oneTime = true; obj9.events = new UltrakillEvent(); obj9.events.onActivate = new UnityEvent(); obj9.events.onActivate.AddListener((UnityAction)delegate { floorMover.Activate(); }); obj9.events.onActivate.AddListener((UnityAction)delegate { floorTileAud.Play(); }); obj9.events.onActivate.AddListener((UnityAction)delegate { foreach (GameObject item in toEnable) { item.SetActive(true); } foreach (GameObject item2 in toDisable) { item2.SetActive(false); } }); ObjectActivator obj10 = val4.AddComponent(); obj10.dontActivateOnEnable = true; obj10.oneTime = true; obj10.events = new UltrakillEvent(); obj10.events.onActivate = new UnityEvent(); obj10.events.onActivate.AddListener((UnityAction)delegate { ((Component)act).gameObject.SetActive(true); }); UnityEvent onActivate = obj10.events.onActivate; object obj11 = <>c.<>9__38_5; if (obj11 == null) { UnityAction val5 = delegate { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) MonoSingleton.Instance.spawnPos = ((Component)MonoSingleton.Instance).transform.position; }; <>c.<>9__38_5 = val5; obj11 = (object)val5; } onActivate.AddListener((UnityAction)obj11); obj10.delay = actDelay; } public void Spawn() { //IL_00b3: 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_018c: 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_01fa: 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_00f9: 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_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: 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_0301: 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_0314: 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_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: 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_0416: 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_0473: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_050c: 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_052e: Unknown result type (might be due to invalid IL or missing references) //IL_053a: 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_0571: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: 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_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0631: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0cca: Unknown result type (might be due to invalid IL or missing references) //IL_0ccf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce5: Unknown result type (might be due to invalid IL or missing references) //IL_065e: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06ba: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_0a58: Unknown result type (might be due to invalid IL or missing references) //IL_0a5d: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_0a9b: Unknown result type (might be due to invalid IL or missing references) //IL_0aa4: Unknown result type (might be due to invalid IL or missing references) //IL_0ac9: Unknown result type (might be due to invalid IL or missing references) //IL_0ace: Unknown result type (might be due to invalid IL or missing references) //IL_0acf: Unknown result type (might be due to invalid IL or missing references) //IL_0ad6: Unknown result type (might be due to invalid IL or missing references) //IL_0ae8: Unknown result type (might be due to invalid IL or missing references) //IL_0afd: Unknown result type (might be due to invalid IL or missing references) //IL_0b17: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b2d: Unknown result type (might be due to invalid IL or missing references) //IL_0b8e: Unknown result type (might be due to invalid IL or missing references) //IL_0b90: Unknown result type (might be due to invalid IL or missing references) //IL_0bc8: Unknown result type (might be due to invalid IL or missing references) //IL_0bd2: Expected O, but got Unknown //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_0743: Unknown result type (might be due to invalid IL or missing references) //IL_074e: Unknown result type (might be due to invalid IL or missing references) //IL_0760: 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_07a0: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_07ad: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) //IL_08a0: Unknown result type (might be due to invalid IL or missing references) //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_08e4: Unknown result type (might be due to invalid IL or missing references) //IL_08e5: Unknown result type (might be due to invalid IL or missing references) //IL_08ec: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_0918: Unknown result type (might be due to invalid IL or missing references) //IL_093f: Unknown result type (might be due to invalid IL or missing references) //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_099c: Unknown result type (might be due to invalid IL or missing references) //IL_09b1: Unknown result type (might be due to invalid IL or missing references) //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09d5: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0fa2: Unknown result type (might be due to invalid IL or missing references) if (spawned) { return; } GameObject onLevelStartObj = null; bool flag = (Object)(object)MonoSingleton.Instance != (Object)null; if (!flag) { Transform val = ((Component)this).gameObject.transform.Find("OnLevelStart"); if ((Object)(object)val != (Object)null) { flag = (Object)(object)((Component)val).GetComponent() != (Object)null; onLevelStartObj = ((Component)val).gameObject; } } else { onLevelStartObj = ((Component)MonoSingleton.Instance).gameObject; } GameObject val2 = ((Component)this).gameObject; GameObject val3 = Addressables.LoadAssetAsync((object)(secretRoom ? "FirstRoom Secret" : (primeRoom ? "FirstRoom Prime" : (encoreRoom ? "Assets/Prefabs/Levels/Special Rooms/FirstRoom Encore.prefab" : "FirstRoom")))).WaitForCompletion(); Scene activeScene; if (!doNotReplace) { val2 = Object.Instantiate(val3, ((Component)this).transform.parent); if (flag) { Transform? obj = val2.transform.Find("OnLevelStart"); if (obj == null) { activeScene = SceneManager.GetActiveScene(); obj = (from go in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)go).name == "OnLevelStart" && (Object)(object)go.transform != (Object)(object)onLevelStartObj select go.transform).FirstOrDefault(); } Transform val4 = obj; if ((Object)(object)val4 != (Object)null) { Object.Destroy((Object)(object)((Component)val4).gameObject); } if ((Object)(object)onLevelStartObj != (Object)null) { onLevelStartObj.transform.SetParent(val2.transform); } } } else { GameObject val5 = Object.Instantiate(val3, ((Component)this).transform.position, ((Component)this).transform.rotation, ((Component)this).transform.parent); Object.Destroy((Object)(object)((Component)val5.transform.Find("Room")).gameObject); if (flag) { Transform val6 = val5.transform.Find("OnLevelStart"); if ((Object)(object)val6 != (Object)null) { Object.Destroy((Object)(object)((Component)val6).gameObject); } else { activeScene = SceneManager.GetActiveScene(); OnLevelStart val7 = (from go in ((Scene)(ref activeScene)).GetRootGameObjects() select go.GetComponent() into ls where (Object)(object)ls != (Object)null && (Object)(object)((Component)ls).gameObject != (Object)(object)onLevelStartObj select ls).FirstOrDefault(); if ((Object)(object)val7 != (Object)null) { Object.Destroy((Object)(object)((Component)val7).gameObject); } } } } MeshCollider[] componentsInChildren = val2.GetComponentsInChildren(); MeshFilter val9 = default(MeshFilter); foreach (MeshCollider val8 in componentsInChildren) { if (((Component)val8).gameObject.TryGetComponent(ref val9)) { val9.mesh = val8.sharedMesh; } } Transform transform = ((Component)MonoSingleton.Instance).transform; ((Component)transform).transform.parent = val2.transform; val2.transform.position = ((Component)this).transform.position; val2.transform.rotation = ((Component)this).transform.rotation; ((Component)transform).transform.parent = null; Quaternion rotation = ((Component)this).transform.rotation; Utils.SetPlayerWorldRotation(Quaternion.Euler(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f)); CameraController val10 = MonoSingleton.Instance ?? ((Component)transform).GetComponentInChildren(true); if ((Object)(object)val10 != (Object)null && (Object)(object)val10.cam != (Object)null) { val10.cam.nearClipPlane = cameraNearClipPlane; val10.cam.farClipPlane = cameraFarClipPlane; } else { Debug.LogWarning((object)"Unable to adjust camera properties"); } if ((Object)(object)playerSpawnPos != (Object)null) { ((Component)transform).transform.parent = ((Component)playerSpawnPos).transform.parent; ((Component)transform).transform.localPosition = playerSpawnPos.localPosition; Utils.SetPlayerWorldRotation(playerSpawnPos.rotation); ((Component)transform).transform.SetParent((Transform)null); } MonoSingleton.Instance.spawnPos = ((Component)transform).transform.position; try { ((Component)val2.transform.Find("Room/FinalDoor")).GetComponent(); Camera main = Camera.main; main.backgroundColor = backgroundColor; main.clearFlags = cameraFillMode; ((Component)val2.transform.Find("Room/FinalDoor/FinalDoorOpener")).GetComponent().startMusic = startMusic; ((Component)val2.transform.Find("Room/FinalDoor")).GetComponent(); Transform obj2 = ((Component)MonoSingleton.Instance).transform.Find("Canvas"); if (obj2 == null) { activeScene = SceneManager.GetActiveScene(); obj2 = (from o in ((Scene)(ref activeScene)).GetRootGameObjects() where ((Object)o).name == "Canvas" select o).First().transform; } Transform val11 = obj2; GameObject val12 = null; if (enableHellMap) { Deserialize(); RectTransform val13 = MakeRect(val11); ((Object)val13).name = "Hellmap"; val12 = ((Component)val13).gameObject; Vector2 anchorMin = (val13.anchorMax = new Vector2(0.5f, 0.5f)); val13.anchorMin = anchorMin; val13.pivot = new Vector2(0.5f, 0.5f); val13.sizeDelta = new Vector2(250f, 650f); val13.anchoredPosition = Vector2.zero; ((Transform)val13).localScale = Vector3.one * 0.82244f; ((Transform)val13).SetAsFirstSibling(); RectTransform val15 = MakeRect(((Component)val13).transform); ((Object)val15).name = "Hellmap Container"; val15.anchorMin = Vector2.zero; val15.anchorMax = Vector2.one; val15.pivot = new Vector2(0.5f, 0.5f); val15.sizeDelta = Vector2.zero; val15.anchoredPosition = Vector2.zero; ((Transform)val15).localScale = Vector3.one; float num2 = 0f; Stack stack = new Stack(); foreach (LayerInfo layersAndLevel in layersAndLevels) { RectTransform obj3 = MakeRect((Transform)(object)val15); anchorMin = (obj3.anchorMax = new Vector2(0f, 1f)); obj3.anchorMin = anchorMin; obj3.sizeDelta = new Vector2(250f, 50f); obj3.pivot = new Vector2(0f, 1f); ((Transform)obj3).localScale = Vector3.one; obj3.anchoredPosition = new Vector2(0f, (num2 == 0f) ? (-3.051758E-05f) : num2); num2 -= 50f; Text obj4 = MakeText((Transform)(object)obj3); obj4.text = layersAndLevel.layerName; obj4.fontSize = 36; obj4.font = Utils.gameFont; obj4.alignment = (TextAnchor)3; ((Graphic)obj4).color = Color.white; RectTransform component = ((Component)obj4).GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.sizeDelta = Vector2.zero; component.pivot = new Vector2(0.5f, 0.5f); ((Transform)component).localScale = Vector3.one; component.anchoredPosition = Vector2.zero; string[] layerLevels = layersAndLevel.layerLevels; foreach (string text in layerLevels) { RectTransform obj5 = MakeRect((Transform)(object)val15); anchorMin = (obj5.anchorMax = new Vector2(0f, 1f)); obj5.anchorMin = anchorMin; obj5.pivot = new Vector2(0f, 1f); ((Transform)obj5).localScale = Vector3.one; obj5.anchoredPosition = new Vector2(60f, num2); obj5.sizeDelta = new Vector2(125f, 45f); num2 -= 50f; RectTransform obj6 = MakeRect(((Component)obj5).transform); anchorMin = (obj6.anchorMax = new Vector2(0.5f, 0.5f)); obj6.anchorMin = anchorMin; obj6.sizeDelta = new Vector2(25f, 9f); obj6.anchoredPosition = Vector2.zero; ((Transform)obj6).localScale = new Vector3(5f, 5f, 5f); Image obj7 = ((Component)obj6).gameObject.AddComponent(); obj7.type = (Type)1; obj7.sprite = Utils.levelPanel; obj7.pixelsPerUnitMultiplier = 1f; Text obj8 = MakeText(((Component)obj5).transform); obj8.text = text; obj8.font = Utils.gameFont; obj8.fontSize = 32; obj8.alignment = (TextAnchor)4; ((Graphic)obj8).color = Color.black; RectTransform component2 = ((Component)obj8).gameObject.GetComponent(); component2.anchorMin = Vector2.zero; component2.anchorMax = Vector2.one; component2.pivot = new Vector2(0.5f, 0.5f); component2.sizeDelta = Vector2.zero; component2.anchoredPosition = new Vector2(0f, 0f); ((Transform)component2).localScale = Vector3.one; } if (layersAndLevel.layerLevels.Length != 0) { RectTransform val19 = MakeRect((Transform)(object)val15); anchorMin = (val19.anchorMax = new Vector2(0.5f, 1f)); val19.anchorMin = anchorMin; val19.pivot = new Vector2(0.5f, 0f); val19.anchoredPosition = new Vector2(-95f, num2 + 25f); val19.sizeDelta = new Vector2(3f, (float)layersAndLevel.layerLevels.Length * 50f - 27.5f); ((Transform)val19).localScale = Vector3.one; ((Component)val19).gameObject.AddComponent(); for (int num3 = 0; num3 < layersAndLevel.layerLevels.Length; num3++) { RectTransform obj9 = MakeRect((Transform)(object)val19); anchorMin = (obj9.anchorMax = new Vector2(0.5f, 0f)); obj9.anchorMin = anchorMin; obj9.pivot = new Vector2(0f, 0.5f); obj9.sizeDelta = new Vector2(20f, 3f); obj9.anchoredPosition = new Vector2(-1.5f, (float)num3 * 50f); ((Transform)obj9).localScale = Vector3.one; ((Component)obj9).gameObject.AddComponent(); } stack.Push(val19); } } while (stack.Count != 0) { ((Transform)stack.Pop()).SetAsLastSibling(); } Vector2 anchoredPosition = ((Component)((Transform)val15).GetChild(GetChildIndexFromLayerAndLevel(layerIndexToStartFrom, levelIndexToStartFrom))).GetComponent().anchoredPosition; ((Vector2)(ref anchoredPosition))..ctor(210f, anchoredPosition.y - 22.5f); Vector2 anchoredPosition2 = ((Component)((Transform)val15).GetChild(GetChildIndexFromLayerAndLevel(layerIndexToEndAt, levelIndexToEndAt))).GetComponent().anchoredPosition; ((Vector2)(ref anchoredPosition2))..ctor(210f, anchoredPosition2.y - 22.5f); RectTransform obj10 = MakeRect((Transform)(object)val13); anchorMin = (obj10.anchorMax = new Vector2(0f, 1f)); obj10.anchorMin = anchorMin; obj10.pivot = new Vector2(0.5f, 0.5f); obj10.sizeDelta = new Vector2(35f, 35f); ((Transform)obj10).rotation = Quaternion.Euler(0f, 0f, 90f); ((Transform)obj10).localScale = Vector3.one; obj10.anchoredPosition = anchoredPosition; AudioSource val23 = ((Component)obj10).gameObject.AddComponent(); val23.playOnAwake = false; val23.loop = false; val23.clip = hellmapBeepClip; val23.volume = 0.1f; Image val24 = ((Component)obj10).gameObject.AddComponent(); val24.sprite = Utils.hellmapArrow; CustomHellmapCursor customHellmapCursor = ((Component)obj10).gameObject.AddComponent(); customHellmapCursor.targetPosition = anchoredPosition2; customHellmapCursor.aud = val23; customHellmapCursor.targetImage = val24; ObjectActivator obj11 = ((Component)UnityUtils.GetComponentInChildrenRecursive(val2.transform)).gameObject.AddComponent(); obj11.dontActivateOnEnable = true; obj11.oneTime = true; obj11.events = new UltrakillEvent(); obj11.events.toDisActivateObjects = (GameObject[])(object)new GameObject[1] { ((Component)val13).gameObject }; } if (convertToUpwardRoom) { foreach (GameObject item in upwardRoomOutOfBoundsToDisable) { item.SetActive(false); } List list = new List(); if ((Object)(object)val12 != (Object)null) { list.Add(val12); } List list2 = new List(); list2.AddRange(upwardRoomOutOfBoundsToDisable); ConvertToAscendingFirstRoom(val2, upwardRoomDoorCloseClip, list2, list, doNotReplace); } if (!encoreRoom) { return; } FinalRank instance = MonoSingleton.Instance; if (!((Object)(object)instance != (Object)null)) { return; } Transform val25 = ((Component)instance).transform.Find("Extra Info"); RectTransform val26 = default(RectTransform); if ((Object)(object)val25 != (Object)null && ((Component)val25).gameObject.TryGetComponent(ref val26)) { val26.anchoredPosition = Vector2.op_Implicit(new Vector3(0f, 200f, 0f)); val26.sizeDelta = new Vector2(480f, 180f); } Transform val27 = ((Component)instance).transform.Find("Secrets - Title"); Transform val28 = ((Component)instance).transform.Find("Secrets - Info"); Transform val29 = (((Object)(object)val28 == (Object)null) ? null : ((Component)val28).transform.Find("Text (1)")); Transform val30 = ((Component)instance).transform.Find("Challenge - Title"); Transform val31 = ((Component)instance).transform.Find("Challenge"); List list3 = instance.toAppear.ToList(); if ((Object)(object)val27 != (Object)null && !list3.Contains(((Component)val27).gameObject)) { list3.Insert(list3.Count - 1, ((Component)val27).gameObject); } if ((Object)(object)val28 != (Object)null && !list3.Contains(((Component)val28).gameObject)) { list3.Insert(list3.Count - 1, ((Component)val28).gameObject); } if ((Object)(object)val29 != (Object)null && !list3.Contains(((Component)val29).gameObject)) { list3.Insert(list3.Count - 1, ((Component)val29).gameObject); } if ((Object)(object)val30 != (Object)null && !list3.Contains(((Component)val30).gameObject)) { ((Component)val30).gameObject.SetActive(true); list3.Insert(list3.Count - 1, ((Component)val30).gameObject); } if ((Object)(object)val31 != (Object)null && !list3.Contains(((Component)val31).gameObject)) { list3.Insert(list3.Count - 1, ((Component)val31).gameObject); } instance.toAppear = list3.ToArray(); Transform val32 = ((Component)val11).transform.Find("Level Stats Controller"); if (!((Object)(object)val32 != (Object)null)) { return; } LevelStats componentInChildren = ((Component)val32).GetComponentInChildren(true); ((Component)componentInChildren).GetComponent().sizeDelta = new Vector2(285f, 315f); Transform obj12 = ((Component)componentInChildren).transform.Find("Challenge Title/Challenge"); componentInChildren.challenge = ((obj12 != null) ? ((Component)obj12).GetComponent() : null); Transform obj13 = ((Component)componentInChildren).transform.Find("Challenge Title"); if (obj13 != null) { ((Component)obj13).gameObject.SetActive(true); } Transform obj14 = ((Component)componentInChildren).transform.Find("Secrets Title"); if (obj14 != null) { ((Component)obj14).gameObject.SetActive(true); } List list4 = new List(); for (int num4 = 5; num4 >= 1; num4--) { Transform val33 = ((Component)componentInChildren).transform.Find($"Secrets Title/Secret {num4}"); if ((Object)(object)val33 != (Object)null) { list4.Add(((Component)val33).GetComponent()); } } componentInChildren.secrets = list4.ToArray(); ((Component)((Component)componentInChildren).transform.Find("Assists Title")).GetComponent().anchoredPosition = new Vector2(10f, -275f); } catch (Exception ex) { throw ex; } finally { spawned = true; } int GetChildIndexFromLayerAndLevel(int layer, int level) { int num5 = 0; for (int i = 0; i < layer; i++) { num5 += 1 + levelSizes[i]; } return num5 + 1 + level; } } public void Awake() { Spawn(); } public void Start() { if ((Object)(object)MonoSingleton.Instance != (Object)null) { MonoSingleton.Instance.levelNameOnStart = displayLevelTitle; } else { Debug.LogWarning((object)"Could not find OnLevelStart"); } if (!doNotReplace) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public class RudeLevelChallengeChecker : MonoBehaviour { public string targetLevelId; public UltrakillEvent onSuccess; public UltrakillEvent onFailure; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public void Activate() { if (LevelInterface.GetLevelChallenge(targetLevelId)) { if (onSuccess != null) { onSuccess.Invoke(""); } } else if (onFailure != null) { onFailure.Invoke(""); } } } public enum LevelRanks { NotCompleted, Completed, CompletedWithCheats, CompletedWithoutCheats, D, AtLeastD, AtMostD, C, AtLeastC, AtMostC, B, AtLeastB, AtMostB, A, AtLeastA, AtMostA, S, AtLeastS, AtMostS, P } public class RudeLevelRankChecker : MonoBehaviour { public string targetLevelUniqueId = ""; public LevelRanks requiredFinalRank = LevelRanks.Completed; public UltrakillEvent OnSuccess; public UltrakillEvent OnFail; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public static int GetRankScore(char rank) { return rank switch { 'D' => 1, 'C' => 2, 'B' => 3, 'A' => 4, 'S' => 5, 'P' => 6, _ => -1, }; } public void Activate() { char levelRank = LevelInterface.GetLevelRank(targetLevelUniqueId); int rankScore = GetRankScore(levelRank); bool flag = false; switch (requiredFinalRank) { case LevelRanks.NotCompleted: flag = levelRank == '-'; break; case LevelRanks.Completed: flag = levelRank != '-'; break; case LevelRanks.CompletedWithCheats: flag = levelRank == ' '; break; case LevelRanks.CompletedWithoutCheats: flag = levelRank != ' ' && levelRank != '-'; break; case LevelRanks.D: flag = levelRank == 'D'; break; case LevelRanks.C: flag = levelRank == 'C'; break; case LevelRanks.B: flag = levelRank == 'B'; break; case LevelRanks.A: flag = levelRank == 'A'; break; case LevelRanks.S: flag = levelRank == 'S'; break; case LevelRanks.P: flag = levelRank == 'P'; break; case LevelRanks.AtLeastD: flag = rankScore >= GetRankScore('D'); break; case LevelRanks.AtMostD: flag = rankScore <= GetRankScore('D'); break; case LevelRanks.AtLeastC: flag = rankScore >= GetRankScore('C'); break; case LevelRanks.AtMostC: flag = rankScore <= GetRankScore('C'); break; case LevelRanks.AtLeastB: flag = rankScore >= GetRankScore('B'); break; case LevelRanks.AtMostB: flag = rankScore <= GetRankScore('B'); break; case LevelRanks.AtLeastA: flag = rankScore >= GetRankScore('A'); break; case LevelRanks.AtMostA: flag = rankScore <= GetRankScore('A'); break; case LevelRanks.AtLeastS: flag = rankScore >= GetRankScore('S'); break; case LevelRanks.AtMostS: flag = rankScore <= GetRankScore('S'); break; } if (flag) { if (OnSuccess != null) { OnSuccess.Invoke(""); } } else if (OnFail != null) { OnFail.Invoke(""); } } } public class RudeLevelSecretChecker : MonoBehaviour { public string targetLevelId = ""; public int targetSecretIndex; public UltrakillEvent onSuccess; public UltrakillEvent onFailure; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public void Activate() { if (LevelInterface.GetLevelSecret(targetLevelId, targetSecretIndex)) { if (onSuccess != null) { onSuccess.Invoke(""); } } else if (onFailure != null) { onFailure.Invoke(""); } } } public static class Utils { private static Font _gameFont; private static Sprite _levelPanel; private static Sprite _hellmapArrow; private static Material _metalDec20; public static Font gameFont { get { //IL_0012: 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) if ((Object)(object)_gameFont == (Object)null) { _gameFont = Addressables.LoadAssetAsync((object)"Assets/Fonts/VCR_OSD_MONO_1.001.ttf").WaitForCompletion(); } return _gameFont; } } public static Sprite levelPanel { get { //IL_0012: 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) if ((Object)(object)_levelPanel == (Object)null) { _levelPanel = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/meter.png").WaitForCompletion(); } return _levelPanel; } } public static Sprite hellmapArrow { get { //IL_0012: 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) if ((Object)(object)_hellmapArrow == (Object)null) { _hellmapArrow = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/arrow.png").WaitForCompletion(); } return _hellmapArrow; } } public static Material metalDec20 { get { //IL_0012: 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) if ((Object)(object)_metalDec20 == (Object)null) { _metalDec20 = Addressables.LoadAssetAsync((object)"Assets/Materials/Environment/Metal/Metal Decoration 20.mat").WaitForCompletion(); } return _metalDec20; } } public static void SetPlayerWorldRotation(Quaternion newRotation) { //IL_000a: 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_0076: 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_007e: Unknown result type (might be due to invalid IL or missing references) ((Component)MonoSingleton.Instance).transform.rotation = newRotation; float x = ((Component)MonoSingleton.Instance).transform.localEulerAngles.x; float rotationX = x; if (x <= 90f && x >= 0f) { rotationX = 0f - x; } else if (x >= 270f && x <= 360f) { rotationX = Mathf.Lerp(0f, 90f, Mathf.InverseLerp(360f, 270f, x)); } Quaternion rotation = ((Component)MonoSingleton.Instance).transform.rotation; float y = ((Quaternion)(ref rotation)).eulerAngles.y; MonoSingleton.Instance.rotationX = rotationX; MonoSingleton.Instance.rotationY = y; } } public static class UnityUtils { public static IEnumerable GetComponentsInChildrenRecursive(Transform parent) where T : Component { T val = default(T); foreach (Transform item in parent) { Transform child = item; if (((Component)child).TryGetComponent(ref val)) { yield return val; } foreach (T item2 in GetComponentsInChildrenRecursive(child)) { yield return item2; } } } public static T GetComponentInChildrenRecursive(Transform parent) where T : Component { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown T result = default(T); foreach (Transform item in parent) { Transform val = item; if (((Component)val).TryGetComponent(ref result)) { return result; } T componentInChildrenRecursive = GetComponentInChildrenRecursive(val); if ((Object)(object)componentInChildrenRecursive != (Object)null) { return componentInChildrenRecursive; } } return default(T); } } } namespace RudeLevelScripts { public class AscendingFinalRoom : MonoBehaviour { private void OnTriggerEnter(Collider other) { GameObject gameObject = ((Component)MonoSingleton.Instance).gameObject; if ((Object)(object)((Component)other).gameObject == (Object)(object)gameObject && Object.op_Implicit((Object)(object)MonoSingleton.Instance) && MonoSingleton.Instance.hp > 0) { gameObject.AddComponent().force = 100f; } } } public class EnemyInfoPageDataLoader : MonoBehaviour { public EnemyInfoPage target; public List additionalEnemies; private static SpawnableObjectsDatabase database; private bool _taskStarted; public void Awake() { LoadDataAndDestroy(); } public void LoadDataAndDestroy() { ((MonoBehaviour)this).StartCoroutine(LoadDataAndDestroyAsync()); } private IEnumerator LoadDataAndDestroyAsync() { if (!_taskStarted) { _taskStarted = true; if ((Object)(object)database == (Object)null) { AsyncOperationHandle handle = Addressables.LoadAssetAsync((object)"Assets/Data/Bestiary Database.asset"); yield return handle; database = handle.Result; } if ((Object)(object)target == (Object)null) { target = ((Component)this).GetComponent(); } target.objects = Object.Instantiate(database); if (additionalEnemies != null && additionalEnemies.Count != 0) { List list = target.objects.enemies.ToList(); list.AddRange(additionalEnemies); target.objects.enemies = list.ToArray(); } Object.Destroy((Object)(object)this); } } } internal static class GameObjectExtensions { public static bool TryGetComponentInChildren(this GameObject obj, out T result) where T : Component { result = obj.GetComponentInChildren(); return (Object)(object)result != (Object)null; } } public class FirstRoomGameControllerLoader : MonoBehaviour { public void RunAndDestroy() { //IL_0023: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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) if (((Component)this).gameObject.TryGetComponentInChildren(out PlayerTracker result) && (Object)(object)result.platformerPlayerPrefab == (Object)null) { result.platformerPlayerPrefab = Addressables.LoadAssetAsync((object)"Assets/Prefabs/Player/PlatformerController.prefab").WaitForCompletion(); } if (((Component)this).gameObject.TryGetComponentInChildren(out SandboxSaver result2) && (Object)(object)result2.objects == (Object)null) { result2.objects = Addressables.LoadAssetAsync((object)"Assets/Data/Sandbox/Spawnable Objects Database.asset").WaitForCompletion(); } if (((Component)this).gameObject.TryGetComponentInChildren(out TimeController result3) && (Object)(object)result3.parryLight == (Object)null) { result3.parryLight = Addressables.LoadAssetAsync((object)"Assets/Particles/ParryLight.prefab").WaitForCompletion(); } } } [Flags] public enum Gamemode { NoGamemode = 1, NoMonsters = 2, NoMonstersAndWeapons = 4 } public class RudeGamemodeChecker : MonoBehaviour { public Gamemode gamemode = Gamemode.NoMonsters | Gamemode.NoMonstersAndWeapons; public UltrakillEvent OnSuccess; public UltrakillEvent OnFail; public bool activateOnEnable = true; public void OnEnable() { if (activateOnEnable) { Activate(); } } public void Activate() { //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_001a: Expected I4, but got Unknown bool flag = false; Gamemode currentGamemode = GamemodeInterface.GetCurrentGamemode(); switch ((int)currentGamemode) { case 0: flag = gamemode.HasFlag(Gamemode.NoGamemode); break; case 1: flag = gamemode.HasFlag(Gamemode.NoMonsters); break; case 2: flag = gamemode.HasFlag(Gamemode.NoMonstersAndWeapons); break; } if (flag) { if (OnSuccess != null) { OnSuccess.Invoke(""); } } else if (OnFail != null) { OnFail.Invoke(""); } } } }