using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x02000453 RID: 1107
	[Token(Token = "0x2000453")]
	[HelpURL("https://www.youtube.com/watch?v=-TDZpNjt2mk&index=15&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6")]
	[AddComponentMenu("Scripts/RootMotion.FinalIK/Interaction System/Interaction Trigger")]
	public class InteractionTrigger : MonoBehaviour
	{
		// Token: 0x06002805 RID: 10245 RVA: 0x00058AD4 File Offset: 0x00056CD4
		[Token(Token = "0x6002805")]
		[Address(RVA = "0x10DD200", Offset = "0x10DC000", VA = "0x1810DD200")]
		[ContextMenu("TUTORIAL VIDEO")]
		private void OpenTutorial4()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=-TDZpNjt2mk&index=15&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
		}

		// Token: 0x06002806 RID: 10246 RVA: 0x00058AEC File Offset: 0x00056CEC
		[Token(Token = "0x6002806")]
		[Address(RVA = "0x10DD240", Offset = "0x10DC040", VA = "0x1810DD240")]
		[ContextMenu("Support Group")]
		private void SupportGroup()
		{
			Application.OpenURL("https://groups.google.com/forum/#!forum/final-ik");
		}

		// Token: 0x06002807 RID: 10247 RVA: 0x00058B04 File Offset: 0x00056D04
		[Token(Token = "0x6002807")]
		[Address(RVA = "0x10DCFC0", Offset = "0x10DBDC0", VA = "0x1810DCFC0")]
		[ContextMenu("Asset Store Thread")]
		private void ASThread()
		{
			Application.OpenURL("http://forum.unity3d.com/threads/final-ik-full-body-ik-aim-look-at-fabrik-ccd-ik-1-0-released.222685/");
		}

		// Token: 0x06002808 RID: 10248 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002808")]
		[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002809 RID: 10249 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002809")]
		[Address(RVA = "0x10DD000", Offset = "0x10DBE00", VA = "0x1810DD000")]
		public int GetBestRangeIndex(Transform character, Transform raycastFrom, RaycastHit raycastHit)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x0600280A RID: 10250 RVA: 0x00058B1C File Offset: 0x00056D1C
		[Token(Token = "0x600280A")]
		[Address(RVA = "0x10DD280", Offset = "0x10DC080", VA = "0x1810DD280")]
		public InteractionTrigger()
		{
			InteractionTrigger.Range[] array = new InteractionTrigger.Range[0];
			this.ranges = array;
			base..ctor();
		}

		// Token: 0x04003167 RID: 12647
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003167")]
		[Tooltip("The valid ranges of the character's and/or it's camera's position for triggering interaction when the character is in contact with the collider of this trigger.")]
		public InteractionTrigger.Range[] ranges;

		// Token: 0x02000454 RID: 1108
		[Token(Token = "0x2000454")]
		[Serializable]
		public class CharacterPosition
		{
			// Token: 0x17000283 RID: 643
			// (get) Token: 0x0600280B RID: 10251 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x17000283")]
			public Vector3 offset3D
			{
				[Token(Token = "0x600280B")]
				[Address(RVA = "0x14E9DF0", Offset = "0x14E8BF0", VA = "0x1814E9DF0")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x17000284 RID: 644
			// (get) Token: 0x0600280C RID: 10252 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x17000284")]
			public Vector3 direction3D
			{
				[Token(Token = "0x600280C")]
				[Address(RVA = "0x14E9D50", Offset = "0x14E8B50", VA = "0x1814E9D50")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x0600280D RID: 10253 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600280D")]
			[Address(RVA = "0x14E9590", Offset = "0x14E8390", VA = "0x1814E9590")]
			public bool IsInRange(Transform character, Transform trigger, out float error)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x0600280E RID: 10254 RVA: 0x00058B40 File Offset: 0x00056D40
			[Token(Token = "0x600280E")]
			[Address(RVA = "0x14E9D30", Offset = "0x14E8B30", VA = "0x1814E9D30")]
			public CharacterPosition()
			{
			}

			// Token: 0x04003168 RID: 12648
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003168")]
			[Tooltip("If false, will not care where the character stands, as long as it is in contact with the trigger collider.")]
			public bool use;

			// Token: 0x04003169 RID: 12649
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x4003169")]
			[Tooltip("The offset of the character's position relative to the trigger in XZ plane. Y position of the character is unlimited as long as it is contact with the collider.")]
			public Vector2 offset;

			// Token: 0x0400316A RID: 12650
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x400316A")]
			[Tooltip("Angle offset from the default forward direction.")]
			[Range(-180f, 180f)]
			public float angleOffset;

			// Token: 0x0400316B RID: 12651
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x400316B")]
			[Range(0f, 180f)]
			[Tooltip("Max angular offset of the character's forward from the direction of this trigger.")]
			public float maxAngle = 45f;

			// Token: 0x0400316C RID: 12652
			[FieldOffset(Offset = "0x24")]
			[Token(Token = "0x400316C")]
			[Tooltip("Max offset of the character's position from this range's center.")]
			public float radius = 0.5f;

			// Token: 0x0400316D RID: 12653
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x400316D")]
			[Tooltip("If true, will rotate the trigger around it's Y axis relative to the position of the character, so the object can be interacted with from all sides.")]
			public bool orbit;

			// Token: 0x0400316E RID: 12654
			[FieldOffset(Offset = "0x29")]
			[Token(Token = "0x400316E")]
			[Tooltip("Fixes the Y axis of the trigger to Vector3.up. This makes the trigger symmetrical relative to the object. For example a gun will be able to be picked up from the same direction relative to the barrel no matter which side the gun is resting on.")]
			public bool fixYAxis;
		}

		// Token: 0x02000455 RID: 1109
		[Token(Token = "0x2000455")]
		[Serializable]
		public class CameraPosition
		{
			// Token: 0x0600280F RID: 10255 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x600280F")]
			[Address(RVA = "0x14E8FF0", Offset = "0x14E7DF0", VA = "0x1814E8FF0")]
			public Quaternion GetRotation()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002810 RID: 10256 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002810")]
			[Address(RVA = "0x14E9150", Offset = "0x14E7F50", VA = "0x1814E9150")]
			public bool IsInRange(Transform raycastFrom, RaycastHit hit, Transform trigger, out float error)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002811 RID: 10257 RVA: 0x00058B6C File Offset: 0x00056D6C
			[Token(Token = "0x6002811")]
			[Address(RVA = "0x14E9510", Offset = "0x14E8310", VA = "0x1814E9510")]
			public CameraPosition()
			{
				float z = Vector3.forward.z;
				this.direction.z = z;
				this.maxDistance = 0.5f;
				this.maxAngle = 45f;
				base..ctor();
			}

			// Token: 0x0400316F RID: 12655
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x400316F")]
			[Tooltip("What the camera should be looking at to trigger the interaction?")]
			public Collider lookAtTarget;

			// Token: 0x04003170 RID: 12656
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003170")]
			[Tooltip("The direction from the lookAtTarget towards the camera (in lookAtTarget's space).")]
			public Vector3 direction;

			// Token: 0x04003171 RID: 12657
			[FieldOffset(Offset = "0x24")]
			[Token(Token = "0x4003171")]
			[Tooltip("Max distance from the lookAtTarget to the camera.")]
			public float maxDistance;

			// Token: 0x04003172 RID: 12658
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4003172")]
			[Tooltip("Max angle between the direction and the direction towards the camera.")]
			[Range(0f, 180f)]
			public float maxAngle;

			// Token: 0x04003173 RID: 12659
			[FieldOffset(Offset = "0x2C")]
			[Token(Token = "0x4003173")]
			[Tooltip("Fixes the Y axis of the trigger to Vector3.up. This makes the trigger symmetrical relative to the object.")]
			public bool fixYAxis;
		}

		// Token: 0x02000456 RID: 1110
		[Token(Token = "0x2000456")]
		[Serializable]
		public class Range
		{
			// Token: 0x06002812 RID: 10258 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002812")]
			[Address(RVA = "0x14F2D90", Offset = "0x14F1B90", VA = "0x1814F2D90")]
			public bool IsInRange(Transform character, Transform raycastFrom, RaycastHit raycastHit, Transform trigger, out float maxError)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002813 RID: 10259 RVA: 0x00058BAC File Offset: 0x00056DAC
			[Token(Token = "0x6002813")]
			[Address(RVA = "0x14F2EA0", Offset = "0x14F1CA0", VA = "0x1814F2EA0")]
			public Range()
			{
			}

			// Token: 0x04003174 RID: 12660
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003174")]
			[SerializeField]
			[HideInInspector]
			public string name;

			// Token: 0x04003175 RID: 12661
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003175")]
			[HideInInspector]
			[SerializeField]
			public bool show = true;

			// Token: 0x04003176 RID: 12662
			[FieldOffset(Offset = "0x20")]
			[Token(Token = "0x4003176")]
			[Tooltip("The range for the character's position and rotation.")]
			public InteractionTrigger.CharacterPosition characterPosition;

			// Token: 0x04003177 RID: 12663
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4003177")]
			[Tooltip("The range for the character camera's position and rotation.")]
			public InteractionTrigger.CameraPosition cameraPosition;

			// Token: 0x04003178 RID: 12664
			[FieldOffset(Offset = "0x30")]
			[Token(Token = "0x4003178")]
			[Tooltip("Definitions of the interactions associated with this range.")]
			public InteractionTrigger.Range.Interaction[] interactions;

			// Token: 0x02000457 RID: 1111
			[Token(Token = "0x2000457")]
			[Serializable]
			public class Interaction
			{
				// Token: 0x06002814 RID: 10260 RVA: 0x0003883F File Offset: 0x00036A3F
				[Token(Token = "0x6002814")]
				[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
				public Interaction()
				{
				}

				// Token: 0x04003179 RID: 12665
				[FieldOffset(Offset = "0x10")]
				[Token(Token = "0x4003179")]
				[Tooltip("The InteractionObject to interact with.")]
				public InteractionObject interactionObject;

				// Token: 0x0400317A RID: 12666
				[FieldOffset(Offset = "0x18")]
				[Token(Token = "0x400317A")]
				[Tooltip("The effectors to interact with.")]
				public FullBodyBipedEffector[] effectors;
			}
		}
	}
}
