Decompiled source of NoireWallCards v0.1.9

NoireWallCards.dll

Decompiled a month ago
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 BepInEx;
using HarmonyLib;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using ModdingUtils.Extensions;
using ModdingUtils.RoundsEffects;
using ModdingUtils.Utils;
using Photon.Pun;
using SimulationChamber;
using Sonigon;
using Sonigon.Internal;
using UnboundLib;
using UnboundLib.Cards;
using UnboundLib.GameModes;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("0.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(/*Could not decode attribute arguments.*/)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace NoireWallCards
{
	public class CardHolder : MonoBehaviour
	{
		public List<GameObject> Cards;

		public List<GameObject> HiddenCards;

		internal void RegisterCards()
		{
			//IL_0006: 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_004d: 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)
			Enumerator<GameObject> enumerator = Cards.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					GameObject current = enumerator.Current;
					CustomCard.RegisterUnityCard(current, NoireWallCards.modInitials, current.GetComponent<CardInfo>().cardName, true, (Action<CardInfo>)null);
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
			enumerator = HiddenCards.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					GameObject current2 = enumerator.Current;
					CustomCard.RegisterUnityCard(current2, NoireWallCards.modInitials, current2.GetComponent<CardInfo>().cardName, false, (Action<CardInfo>)null);
					Cards.instance.AddHiddenCard(current2.GetComponent<CardInfo>());
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
		}
	}
	[RequireComponent(/*Could not decode attribute arguments.*/)]
	public class ContinuumEffect : MonoBehaviour, IPunInstantiateMagicCallback
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass10_0 : Object
		{
			public Renderer[] renderers;

			public TrailRenderer[] trailRenderers;

			public ParticleSystem[] particleSystems;

			public ContinuumEffect <>4__this;

			internal void <RPCA_DoWrapBullet>b__0()
			{
				Renderer[] array = renderers;
				for (int i = 0; i < array.Length; i++)
				{
					array[i].enabled = true;
				}
				TrailRenderer[] array2 = trailRenderers;
				for (int i = 0; i < array2.Length; i++)
				{
					array2[i].Clear();
				}
				ParticleSystem[] array3 = particleSystems;
				for (int i = 0; i < array3.Length; i++)
				{
					array3[i].Clear(true);
				}
			}

			internal void <RPCA_DoWrapBullet>b__1()
			{
				((Behaviour)((Component)<>4__this.parent).GetComponent<RayCastTrail>()).enabled = true;
				ProjectileHitExtension.GetAdditionalData(<>4__this.projectile).inactiveDelay = 0f;
			}
		}

		private PhotonView view;

		private Transform parent;

		private ProjectileHit projectile;

		private Player player;

		private OutOfBoundsHandler outOfBoundsHandler;

		private RayHitReflect rayHitReflect;

		private int bounceCount;

		public void OnPhotonInstantiate(PhotonMessageInfo info)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Expected I4, but got Unknown
			GameObject gameObject = ((Component)PhotonView.Find((int)(Int32)info.photonView.InstantiationData[0])).gameObject;
			((Component)this).gameObject.transform.SetParent(gameObject.transform);
		}

		private void Start()
		{
			parent = ((Component)this).gameObject.transform.parent;
			if (!((Object)(object)parent == (Object)null))
			{
				rayHitReflect = ((Component)parent).GetComponent<RayHitReflect>();
				bounceCount = 0;
				projectile = ((Component)parent).GetComponent<ProjectileHit>();
				player = projectile.ownPlayer;
				view = ((Component)this).gameObject.GetComponent<PhotonView>();
				ref OutOfBoundsHandler reference = ref outOfBoundsHandler;
				object target = ((Delegate)((Component)player).GetComponent<ChildRPC>().childRPCs["OutOfBounds"]).Target;
				reference = (OutOfBoundsHandler)((target is OutOfBoundsHandler) ? target : null);
			}
		}

		private void Update()
		{
			//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)
			//IL_002f: 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_0038: 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_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: 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_00c3: 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_00cf: 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_010a: 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)
			if ((Object)(object)parent == (Object)null)
			{
				return;
			}
			Vector2 val = Vector2.op_Implicit(FixedOutOfBoundsHelpers.BoundsPointFromWorldPosition(outOfBoundsHandler, ((Component)parent).transform.position));
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(val.x, val.y, ((Component)parent).transform.position.z);
			bool flag = false;
			if (val2.x >= 1f || val2.x <= 0f)
			{
				flag = true;
				val2.x = 1f - val2.x;
			}
			if (val2.y >= 1f || val2.y <= 0f)
			{
				flag = true;
				val2.y = 1f - val2.y;
			}
			if (flag)
			{
				if (PhotonNetwork.OfflineMode)
				{
					RPCA_DoWrapBullet(val2.x, val2.y, val2.z);
				}
				else if (view.IsMine)
				{
					view.RPC("RPCA_DoWrapBullet", (RpcTarget)0, (object[])(object)new Object[3]
					{
						(object)val2.x,
						(object)val2.y,
						(object)val2.z
					});
				}
			}
		}

		[PunRPC]
		private void RPCA_DoWrapBullet(float x, float y, float z)
		{
			//IL_00e2: 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_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_0102: 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_010f: 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_012c: Expected O, but got Unknown
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Expected O, but got Unknown
			<>c__DisplayClass10_0 CS$<>8__locals0 = new <>c__DisplayClass10_0();
			CS$<>8__locals0.<>4__this = this;
			ProjectileHitExtension.GetAdditionalData(projectile).startTime = Time.time;
			ProjectileHitExtension.GetAdditionalData(projectile).inactiveDelay = 3.4028235E+38f;
			((Behaviour)((Component)parent).GetComponent<RayCastTrail>()).enabled = false;
			CS$<>8__locals0.trailRenderers = ((Component)projectile).GetComponentsInChildren<TrailRenderer>();
			CS$<>8__locals0.renderers = ((Component)projectile).GetComponentsInChildren<Renderer>();
			CS$<>8__locals0.particleSystems = ((Component)projectile).GetComponentsInChildren<ParticleSystem>();
			Renderer[] renderers = CS$<>8__locals0.renderers;
			for (int i = 0; i < renderers.Length; i++)
			{
				renderers[i].enabled = false;
			}
			TrailRenderer[] trailRenderers = CS$<>8__locals0.trailRenderers;
			for (int i = 0; i < trailRenderers.Length; i++)
			{
				trailRenderers[i].Clear();
			}
			ParticleSystem[] particleSystems = CS$<>8__locals0.particleSystems;
			for (int i = 0; i < particleSystems.Length; i++)
			{
				particleSystems[i].Clear(true);
			}
			Vector2 val = Vector2.op_Implicit(OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(outOfBoundsHandler, Vector2.op_Implicit(new Vector2(x, y))));
			((Component)parent).transform.position = new Vector3(val.x, val.y, z);
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)this, 3, (Action)delegate
			{
				Renderer[] renderers2 = CS$<>8__locals0.renderers;
				for (int j = 0; j < renderers2.Length; j++)
				{
					renderers2[j].enabled = true;
				}
				TrailRenderer[] trailRenderers2 = CS$<>8__locals0.trailRenderers;
				for (int j = 0; j < trailRenderers2.Length; j++)
				{
					trailRenderers2[j].Clear();
				}
				ParticleSystem[] particleSystems2 = CS$<>8__locals0.particleSystems;
				for (int j = 0; j < particleSystems2.Length; j++)
				{
					particleSystems2[j].Clear(true);
				}
			});
			ExtensionMethods.ExecuteAfterFrames((MonoBehaviour)(object)this, 2, (Action)delegate
			{
				((Behaviour)((Component)CS$<>8__locals0.<>4__this.parent).GetComponent<RayCastTrail>()).enabled = true;
				ProjectileHitExtension.GetAdditionalData(CS$<>8__locals0.<>4__this.projectile).inactiveDelay = 0f;
			});
		}
	}
	public class ContinuumAssets : Object
	{
		private static GameObject _ContinuumWarp;

		internal static GameObject ContinuumWarp
		{
			get
			{
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: Expected O, but got Unknown
				if ((Object)(object)_ContinuumWarp != (Object)null)
				{
					return _ContinuumWarp;
				}
				_ContinuumWarp = new GameObject("ContinuumWarp", (Type[])(object)new Type[2]
				{
					typeof(ContinuumEffect),
					typeof(PhotonView)
				});
				Object.DontDestroyOnLoad((Object)(object)_ContinuumWarp);
				return _ContinuumWarp;
			}
			set
			{
			}
		}
	}
	public class SpawnContinuumEffect : MonoBehaviour
	{
		private static bool isInit;

		private void Awake()
		{
			if (!isInit)
			{
				PhotonNetwork.PrefabPool.RegisterPrefab(((Object)ContinuumAssets.ContinuumWarp).name, ContinuumAssets.ContinuumWarp);
				FixedOutOfBoundsHelpers.SkipScreenEdgeBouncePatch = true;
			}
		}

		private void Start()
		{
			//IL_004f: 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)
			if (!isInit)
			{
				isInit = true;
			}
			if (PhotonNetwork.OfflineMode || ((Component)((Component)this).gameObject.transform.parent).GetComponent<ProjectileHit>().ownPlayer.data.view.IsMine)
			{
				PhotonNetwork.Instantiate(((Object)ContinuumAssets.ContinuumWarp).name, ((Component)this).transform.position, ((Component)this).transform.rotation, (byte)0, (object[])(object)new Object[1] { (object)((Component)((Component)this).gameObject.transform.parent).GetComponent<PhotonView>().ViewID });
			}
		}
	}
	public class ThunderstruckEffect : HitSurfaceEffect
	{
		[CompilerGenerated]
		private sealed class <>c__DisplayClass12_0 : Object
		{
			public ThunderstruckEffect <>4__this;

			public Transform thunderTransform;

			internal void <Hit>b__0()
			{
				AudioController.Play(<>4__this.thunderAudio, thunderTransform, randomPitch: true, 7f);
			}
		}

		private GameObject thunderstruckParticleEffect;

		private Player player;

		private Gun gun;

		private Gun defaultGun;

		private SimulatedGun simGun;

		private AudioClip thunderAudio;

		public static GameObject _stopRecursionObj;

		public static GameObject StopRecursionObj
		{
			get
			{
				//IL_0025: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Expected O, but got Unknown
				if ((Object)(object)_stopRecursionObj == (Object)null)
				{
					_stopRecursionObj = new GameObject("A_StopRecursion", (Type[])(object)new Type[1] { typeof(StopRecursion) });
					Object.DontDestroyOnLoad((Object)(object)_stopRecursionObj);
				}
				return _stopRecursionObj;
			}
		}

		public static ObjectsToSpawn[] StopRecursionSpawn => (ObjectsToSpawn[])(object)new ObjectsToSpawn[1]
		{
			new ObjectsToSpawn
			{
				AddToProjectile = StopRecursionObj
			}
		};

		private void Awake()
		{
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			thunderstruckParticleEffect = NoireWallCards.assets.LoadAsset<GameObject>("E_Thunderstruck");
			thunderAudio = NoireWallCards.assets.LoadAsset<AudioClip>("thunder0");
			defaultGun = ((Component)Resources.Load<GameObject>("Player").GetComponent<Holding>().holdable).GetComponent<Gun>();
			player = ((Component)this).GetComponentInParent<Player>();
			gun = player.data.weaponHandler.gun;
			simGun = new GameObject("Lightning-Gun").AddComponent<SimulatedGun>();
		}

		public override void Hit(Vector2 position, Vector2 normal, Vector2 velocity)
		{
			//IL_0132: 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_016f: 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_01a2: 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_01ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Expected O, but got Unknown
			//IL_0204: 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_0219: Unknown result type (might be due to invalid IL or missing references)
			<>c__DisplayClass12_0 CS$<>8__locals0 = new <>c__DisplayClass12_0();
			CS$<>8__locals0.<>4__this = this;
			simGun.CopyGunStatsExceptActions(defaultGun);
			simGun.CopyAttackAction(defaultGun);
			simGun.CopyShootProjectileAction(defaultGun);
			((Gun)simGun).damage = gun.damage;
			((Gun)simGun).bulletDamageMultiplier = 0.11f;
			((Gun)simGun).projectileSpeed = 9f;
			((Gun)simGun).gravity = 0f;
			((Gun)simGun).spread = 0f;
			((Gun)simGun).reflects = 0;
			((Gun)simGun).projectileSize = Math.Min(gun.damage / 30f, 6f);
			((Gun)simGun).ammo = 3;
			((Gun)simGun).bursts = 1;
			((Gun)simGun).numberOfProjectiles = 3;
			gun.timeBetweenBullets = 0.05f;
			((Gun)simGun).ignoreWalls = true;
			((Gun)simGun).attackSpeed = 0.05f;
			((Gun)simGun).projectileColor = new Color(1f, 1f, 1f, 0f);
			((Gun)simGun).soundDisableRayHitBulletSound = true;
			((Gun)simGun).objectsToSpawn = Enumerable.ToArray<ObjectsToSpawn>(Enumerable.Concat<ObjectsToSpawn>((IEnumerable<ObjectsToSpawn>)(object)((Gun)simGun).objectsToSpawn, (IEnumerable<ObjectsToSpawn>)(object)StopRecursionSpawn));
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(position.x, 46f + position.y, 0f);
			CS$<>8__locals0.thunderTransform = thunderstruckParticleEffect.transform;
			Object.Instantiate<GameObject>(thunderstruckParticleEffect, val, Quaternion.Euler(90f, 0f, 0f));
			ExtensionMethods.ExecuteAfterSeconds((MonoBehaviour)(object)this, 0.55f, (Action)delegate
			{
				AudioController.Play(CS$<>8__locals0.<>4__this.thunderAudio, CS$<>8__locals0.thunderTransform, randomPitch: true, 7f);
			});
			if (player.data.view.IsMine || PhotonNetwork.OfflineMode)
			{
				simGun.SimulatedAttack(player.playerID, Vector2.op_Implicit(position), new Vector3(0f, 1f, 0f), 1f, 1f, (Transform)null, false);
			}
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("pixelsorting.rounds.noirewallcards", "Noire Wall Cards", "0.1.9")]
	[BepInProcess("Rounds.exe")]
	public class NoireWallCards : BaseUnityPlugin
	{
		private const string ModId = "pixelsorting.rounds.noirewallcards";

		private const string ModName = "Noire Wall Cards";

		public const string Version = "0.1.9";

		internal static string modInitials = "NWC";

		internal static AssetBundle assets;

		private void Awake()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			assets = AssetUtils.LoadAssetBundleFromResources("noire_assets", typeof(NoireWallCards).Assembly);
			assets.LoadAsset<GameObject>("_ModCards").GetComponent<CardHolder>().RegisterCards();
			new Harmony("pixelsorting.rounds.noirewallcards").PatchAll();
		}

		private void Start()
		{
			GameModeManager.AddHook("GameStart", (Func<IGameModeHandler, IEnumerator>)ResetBouncePatchStatusOnGameStart);
		}

		[IteratorStateMachine(/*Could not decode attribute arguments.*/)]
		private IEnumerator ResetBouncePatchStatusOnGameStart(IGameModeHandler _)
		{
			FixedOutOfBoundsHelpers.SkipScreenEdgeBouncePatch = false;
			yield return null;
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	internal class MapManagerFinishedLoadingPatch : Object
	{
		private static void Postfix(MapManager __instance)
		{
			Transform obj = ((Component)UIHandler.instance).transform.Find("Canvas/Border");
			FixedOutOfBoundsHelpers.Border = ((obj != null) ? ((Component)obj).transform : null);
			object obj2 = FixedOutOfBoundsHelpers.Border;
			if (obj2 == null)
			{
				GameObject obj3 = GameObject.Find("/BorderCanvas");
				obj2 = ((obj3 != null) ? obj3.transform : null);
			}
			FixedOutOfBoundsHelpers.Border = (Transform)obj2;
		}
	}
	[HarmonyPatch(/*Could not decode attribute arguments.*/)]
	public class MapEmbiggenerBouncePatch : Object
	{
		[HarmonyBefore(new string[] { "pykess.rounds.plugins.mapembiggener" })]
		[HarmonyPrefix]
		public static bool Prefix(ScreenEdgeBounce __instance, PhotonView ___view, ref bool ___done, Camera ___mainCam, ref Vector2 ___lastNormal, RayHitReflect ___reflect, ref float ___sinceBounce)
		{
			if (FixedOutOfBoundsHelpers.SkipScreenEdgeBouncePatch && ___view.IsMine)
			{
				___done = true;
				return false;
			}
			return true;
		}
	}
	internal class AudioController : Object
	{
		private static readonly SoundParameterIntensity soundParameterIntensity = new SoundParameterIntensity(0f, (UpdateMode)0);

		public static void Play(AudioClip audioClip, Transform transform, bool randomPitch = false, float randomPitchRange = 2f)
		{
			soundParameterIntensity.intensity = 1f;
			SoundContainer val = ScriptableObject.CreateInstance<SoundContainer>();
			val.setting.volumeIntensityEnable = true;
			val.setting.pitchRandomEnable = randomPitch;
			val.setting.pitchRandomRangeSemitone = randomPitchRange;
			val.audioClip[0] = audioClip;
			SoundEvent val2 = ScriptableObject.CreateInstance<SoundEvent>();
			val2.soundContainerArray[0] = val;
			soundParameterIntensity.intensity = Optionshandler.vol_Sfx / 1f * Optionshandler.vol_Master;
			SoundManager.Instance.Play(val2, transform, (SoundParameterBase[])(object)new SoundParameterBase[1] { (SoundParameterBase)soundParameterIntensity });
		}
	}
	internal class FixedOutOfBoundsHelpers : Object
	{
		internal static bool SkipScreenEdgeBouncePatch;

		internal static Transform Border;

		internal static RectTransform BorderRect
		{
			get
			{
				if (Border.childCount == 0)
				{
					return ((Component)Border).GetComponent<RectTransform>();
				}
				return ((Component)Border.GetChild(0)).GetComponent<RectTransform>();
			}
		}

		internal static Vector3 GetPoint(Vector3 p)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Vector3.zero;
		}

		internal static Vector3 BoundsPointFromWorldPosition(OutOfBoundsHandler oob, Vector3 worldPosition)
		{
			//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_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_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)
			//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_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_0028: 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_002f: 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)
			//IL_0040: 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_004c: 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)
			Vector3 val = RotateFromBoundsFrame(OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(oob, Vector3.zero));
			Vector3 val2 = RotateFromBoundsFrame(OutOfBoundsHandlerExtensions.WorldPositionFromBoundsPoint(oob, Vector3.one));
			Vector3 val3 = RotateFromBoundsFrame(worldPosition);
			return new Vector3(Mathf.InverseLerp(val.x, val2.x, val3.x), Mathf.InverseLerp(val.y, val2.y, val3.y), 0f);
		}

		private static Vector3 RotateFromBoundsFrame(Vector3 point)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return point;
		}
	}
}