using System;
using Cpp2IlInjected;
using RootMotion.FinalIK;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020003DF RID: 991
	[Token(Token = "0x20003DF")]
	public class Turret : MonoBehaviour
	{
		// Token: 0x060023D8 RID: 9176 RVA: 0x00051E3C File Offset: 0x0005003C
		[Token(Token = "0x60023D8")]
		[Address(RVA = "0x75A620", Offset = "0x759420", VA = "0x18075A620")]
		private void Update()
		{
			Turret.Part[] array = this.parts;
			int num = 0;
			int length = array.Length;
			if (num < length)
			{
				Turret.Part part = array[num];
				Transform transform = this.target;
				part.AimAt(transform);
				num++;
			}
		}

		// Token: 0x060023D9 RID: 9177 RVA: 0x00051E80 File Offset: 0x00050080
		[Token(Token = "0x60023D9")]
		[Address(RVA = "0x3088F0", Offset = "0x3076F0", VA = "0x1803088F0")]
		public Turret()
		{
		}

		// Token: 0x04002D6C RID: 11628
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4002D6C")]
		public Transform target;

		// Token: 0x04002D6D RID: 11629
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4002D6D")]
		public Turret.Part[] parts;

		// Token: 0x020003E0 RID: 992
		[Token(Token = "0x20003E0")]
		[Serializable]
		public class Part
		{
			// Token: 0x060023DA RID: 9178 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x60023DA")]
			[Address(RVA = "0x69F7C0", Offset = "0x69E5C0", VA = "0x18069F7C0")]
			public void AimAt(Transform target)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x060023DB RID: 9179 RVA: 0x00051E94 File Offset: 0x00050094
			[Token(Token = "0x60023DB")]
			[Address(RVA = "0x3D8B20", Offset = "0x3D7920", VA = "0x1803D8B20")]
			public Part()
			{
			}

			// Token: 0x04002D6E RID: 11630
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4002D6E")]
			public Transform transform;

			// Token: 0x04002D6F RID: 11631
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4002D6F")]
			private RotationLimit rotationLimit;
		}
	}
}
