using System;
using Cpp2IlInjected;
using UnityEngine;

namespace RootMotion.FinalIK
{
	// Token: 0x020004AB RID: 1195
	[Token(Token = "0x20004AB")]
	[AddComponentMenu("Scripts/RootMotion.FinalIK/Interaction System/Interaction Trigger")]
	[HelpURL("https://www.youtube.com/watch?v=-TDZpNjt2mk&index=15&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6")]
	public class InteractionTrigger : MonoBehaviour
	{
		// Token: 0x06002ACE RID: 10958 RVA: 0x0005FE78 File Offset: 0x0005E078
		[Token(Token = "0x6002ACE")]
		[Address(RVA = "0x104C780", Offset = "0x104B780", VA = "0x18104C780")]
		[ContextMenu("TUTORIAL VIDEO")]
		private void OpenTutorial4()
		{
			Application.OpenURL("https://www.youtube.com/watch?v=-TDZpNjt2mk&index=15&list=PLVxSIA1OaTOu8Nos3CalXbJ2DrKnntMv6");
		}

		// Token: 0x06002ACF RID: 10959 RVA: 0x0005FE90 File Offset: 0x0005E090
		[Token(Token = "0x6002ACF")]
		[Address(RVA = "0x104C7C0", Offset = "0x104B7C0", VA = "0x18104C7C0")]
		[ContextMenu("Support Group")]
		private void SupportGroup()
		{
			Application.OpenURL("https://groups.google.com/forum/#!forum/final-ik");
		}

		// Token: 0x06002AD0 RID: 10960 RVA: 0x0005FEA8 File Offset: 0x0005E0A8
		[Token(Token = "0x6002AD0")]
		[Address(RVA = "0x104C540", Offset = "0x104B540", VA = "0x18104C540")]
		[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: 0x06002AD1 RID: 10961 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002AD1")]
		[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0")]
		private void Start()
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002AD2 RID: 10962 RVA: 0x000020D3 File Offset: 0x000002D3
		[Token(Token = "0x6002AD2")]
		[Address(RVA = "0x104C580", Offset = "0x104B580", VA = "0x18104C580")]
		public int GetBestRangeIndex(Transform character, Transform raycastFrom, RaycastHit raycastHit)
		{
			throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
		}

		// Token: 0x06002AD3 RID: 10963 RVA: 0x0005FEC0 File Offset: 0x0005E0C0
		[Token(Token = "0x6002AD3")]
		[Address(RVA = "0x104C800", Offset = "0x104B800", VA = "0x18104C800")]
		public InteractionTrigger()
		{
			InteractionTrigger.Range[] array = new InteractionTrigger.Range[0];
			this.ranges = array;
			base..ctor();
		}

		// Token: 0x04003451 RID: 13393
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003451")]
		[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: 0x020004AC RID: 1196
		[Token(Token = "0x20004AC")]
		[Serializable]
		public class CharacterPosition
		{
			// Token: 0x170002A8 RID: 680
			// (get) Token: 0x06002AD4 RID: 10964 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002A8")]
			public Vector3 offset3D
			{
				[Token(Token = "0x6002AD4")]
				[Address(RVA = "0x6974E0", Offset = "0x6964E0", VA = "0x1806974E0")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x170002A9 RID: 681
			// (get) Token: 0x06002AD5 RID: 10965 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x170002A9")]
			public Vector3 direction3D
			{
				[Token(Token = "0x6002AD5")]
				[Address(RVA = "0x697440", Offset = "0x696440", VA = "0x180697440")]
				get
				{
					throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
				}
			}

			// Token: 0x06002AD6 RID: 10966 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002AD6")]
			[Address(RVA = "0x696C80", Offset = "0x695C80", VA = "0x180696C80")]
			public bool IsInRange(Transform character, Transform trigger, out float error)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002AD7 RID: 10967 RVA: 0x0005FEE4 File Offset: 0x0005E0E4
			[Token(Token = "0x6002AD7")]
			[Address(RVA = "0x697420", Offset = "0x696420", VA = "0x180697420")]
			public CharacterPosition()
			{
			}

			// Token: 0x04003452 RID: 13394
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003452")]
			[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: 0x04003453 RID: 13395
			[FieldOffset(Offset = "0x14")]
			[Token(Token = "0x4003453")]
			[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: 0x04003454 RID: 13396
			[FieldOffset(Offset = "0x1C")]
			[Token(Token = "0x4003454")]
			[Tooltip("Angle offset from the default forward direction.")]
			[Range(-180f, 180f)]
			public float angleOffset;

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

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

			// Token: 0x04003457 RID: 13399
			[FieldOffset(Offset = "0x28")]
			[Token(Token = "0x4003457")]
			[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: 0x04003458 RID: 13400
			[FieldOffset(Offset = "0x29")]
			[Token(Token = "0x4003458")]
			[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: 0x020004AD RID: 1197
		[Token(Token = "0x20004AD")]
		[Serializable]
		public class CameraPosition
		{
			// Token: 0x06002AD8 RID: 10968 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002AD8")]
			[Address(RVA = "0x16A2650", Offset = "0x16A1650", VA = "0x1816A2650")]
			public Quaternion GetRotation()
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x06002AD9 RID: 10969 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002AD9")]
			[Address(RVA = "0x16A27B0", Offset = "0x16A17B0", VA = "0x1816A27B0")]
			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: 0x06002ADA RID: 10970 RVA: 0x0005FF10 File Offset: 0x0005E110
			[Token(Token = "0x6002ADA")]
			[Address(RVA = "0x16A2B70", Offset = "0x16A1B70", VA = "0x1816A2B70")]
			public CameraPosition()
			{
				float z = Vector3.forward.z;
				this.direction.z = z;
				this.maxDistance = 0.5f;
				this.maxAngle = 45f;
				base..ctor();
			}

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

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

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

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

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

		// Token: 0x020004AE RID: 1198
		[Token(Token = "0x20004AE")]
		[Serializable]
		public class Range
		{
			// Token: 0x06002ADB RID: 10971 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x6002ADB")]
			[Address(RVA = "0x69B0F0", Offset = "0x69A0F0", VA = "0x18069B0F0")]
			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: 0x06002ADC RID: 10972 RVA: 0x0005FF50 File Offset: 0x0005E150
			[Token(Token = "0x6002ADC")]
			[Address(RVA = "0x69B200", Offset = "0x69A200", VA = "0x18069B200")]
			public Range()
			{
			}

			// Token: 0x0400345E RID: 13406
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x400345E")]
			[SerializeField]
			[HideInInspector]
			public string name;

			// Token: 0x0400345F RID: 13407
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x400345F")]
			[HideInInspector]
			[SerializeField]
			public bool show = true;

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

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

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

			// Token: 0x020004AF RID: 1199
			[Token(Token = "0x20004AF")]
			[Serializable]
			public class Interaction
			{
				// Token: 0x06002ADD RID: 10973 RVA: 0x0003DF9B File Offset: 0x0003C19B
				[Token(Token = "0x6002ADD")]
				[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
				public Interaction()
				{
				}

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

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