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

namespace RootMotion.Demos
{
	// Token: 0x02000437 RID: 1079
	[Token(Token = "0x2000437")]
	public class Turret : MonoBehaviour
	{
		// Token: 0x060026A1 RID: 9889 RVA: 0x0005907C File Offset: 0x0005727C
		[Token(Token = "0x60026A1")]
		[Address(RVA = "0xF6AD80", Offset = "0xF69D80", VA = "0x180F6AD80")]
		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: 0x060026A2 RID: 9890 RVA: 0x000590C0 File Offset: 0x000572C0
		[Token(Token = "0x60026A2")]
		[Address(RVA = "0x328C40", Offset = "0x327C40", VA = "0x180328C40")]
		public Turret()
		{
		}

		// Token: 0x04003056 RID: 12374
		[FieldOffset(Offset = "0x18")]
		[Token(Token = "0x4003056")]
		public Transform target;

		// Token: 0x04003057 RID: 12375
		[FieldOffset(Offset = "0x20")]
		[Token(Token = "0x4003057")]
		public Turret.Part[] parts;

		// Token: 0x02000438 RID: 1080
		[Token(Token = "0x2000438")]
		[Serializable]
		public class Part
		{
			// Token: 0x060026A3 RID: 9891 RVA: 0x000020D3 File Offset: 0x000002D3
			[Token(Token = "0x60026A3")]
			[Address(RVA = "0x6C8880", Offset = "0x6C7880", VA = "0x1806C8880")]
			public void AimAt(Transform target)
			{
				throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
			}

			// Token: 0x060026A4 RID: 9892 RVA: 0x000590D4 File Offset: 0x000572D4
			[Token(Token = "0x60026A4")]
			[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
			public Part()
			{
			}

			// Token: 0x04003058 RID: 12376
			[FieldOffset(Offset = "0x10")]
			[Token(Token = "0x4003058")]
			public Transform transform;

			// Token: 0x04003059 RID: 12377
			[FieldOffset(Offset = "0x18")]
			[Token(Token = "0x4003059")]
			private RotationLimit rotationLimit;
		}
	}
}
