using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using RootMotion.FinalIK;
using UnityEngine;

namespace RootMotion.Demos
{
	// Token: 0x020003EE RID: 1006
	public class Turret : MonoBehaviour
	{
		// Token: 0x06007A00 RID: 31232 RVA: 0x001F13E4 File Offset: 0x001EF5E4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 593316, XrefRangeEnd = 593318, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void Update()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Turret.NativeMethodInfoPtr_Update_Private_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06007A01 RID: 31233 RVA: 0x001F1428 File Offset: 0x001EF628
		[CallerCount(63)]
		[CachedScanResults(RefRangeStart = 222154, RefRangeEnd = 222217, XrefRangeStart = 222154, XrefRangeEnd = 222217, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Turret()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<Turret>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Turret.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06007A02 RID: 31234 RVA: 0x001F1474 File Offset: 0x001EF674
		// Note: this type is marked as 'beforefieldinit'.
		static Turret()
		{
			Il2CppClassPointerStore<Turret>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "RootMotion.Demos", "Turret");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Turret>.NativeClassPtr);
			Turret.NativeFieldInfoPtr_target = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Turret>.NativeClassPtr, "target");
			Turret.NativeFieldInfoPtr_parts = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Turret>.NativeClassPtr, "parts");
			Turret.NativeMethodInfoPtr_Update_Private_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Turret>.NativeClassPtr, 100672472);
			Turret.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Turret>.NativeClassPtr, 100672473);
		}

		// Token: 0x06007A03 RID: 31235 RVA: 0x0000351C File Offset: 0x0000171C
		public Turret(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170029AA RID: 10666
		// (get) Token: 0x06007A04 RID: 31236 RVA: 0x001F14F4 File Offset: 0x001EF6F4
		// (set) Token: 0x06007A05 RID: 31237 RVA: 0x001F1528 File Offset: 0x001EF728
		public unsafe Transform target
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.NativeFieldInfoPtr_target);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Transform(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.NativeFieldInfoPtr_target), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x170029AB RID: 10667
		// (get) Token: 0x06007A06 RID: 31238 RVA: 0x001F1550 File Offset: 0x001EF750
		// (set) Token: 0x06007A07 RID: 31239 RVA: 0x001F1584 File Offset: 0x001EF784
		public unsafe Il2CppReferenceArray<Turret.Part> parts
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.NativeFieldInfoPtr_parts);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Il2CppReferenceArray<Turret.Part>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.NativeFieldInfoPtr_parts), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04005192 RID: 20882
		private static readonly IntPtr NativeFieldInfoPtr_target;

		// Token: 0x04005193 RID: 20883
		private static readonly IntPtr NativeFieldInfoPtr_parts;

		// Token: 0x04005194 RID: 20884
		private static readonly IntPtr NativeMethodInfoPtr_Update_Private_Void_0;

		// Token: 0x04005195 RID: 20885
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x020003EF RID: 1007
		[Serializable]
		public class Part : Il2CppSystem.Object
		{
			// Token: 0x06007A08 RID: 31240 RVA: 0x001F15AC File Offset: 0x001EF7AC
			[CallerCount(1)]
			[CachedScanResults(RefRangeStart = 593315, RefRangeEnd = 593316, XrefRangeStart = 593301, XrefRangeEnd = 593315, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			public unsafe void AimAt(Transform target)
			{
				IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				checked
				{
					IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
					*ptr = IL2CPP.Il2CppObjectBaseToPtr(target);
					IntPtr intPtr2;
					IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Turret.Part.NativeMethodInfoPtr_AimAt_Public_Void_Transform_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
					Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				}
			}

			// Token: 0x06007A09 RID: 31241 RVA: 0x001F1608 File Offset: 0x001EF808
			[CallerCount(1642)]
			[CachedScanResults(RefRangeStart = 7417, RefRangeEnd = 9059, XrefRangeStart = 7417, XrefRangeEnd = 9059, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
			public unsafe Part()
				: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr))
			{
				IntPtr* ptr = null;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(Turret.Part.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}

			// Token: 0x06007A0A RID: 31242 RVA: 0x001F1654 File Offset: 0x001EF854
			// Note: this type is marked as 'beforefieldinit'.
			static Part()
			{
				Il2CppClassPointerStore<Turret.Part>.NativeClassPtr = IL2CPP.GetIl2CppNestedType(Il2CppClassPointerStore<Turret>.NativeClassPtr, "Part");
				IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr);
				Turret.Part.NativeFieldInfoPtr_transform = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr, "transform");
				Turret.Part.NativeFieldInfoPtr_rotationLimit = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr, "rotationLimit");
				Turret.Part.NativeMethodInfoPtr_AimAt_Public_Void_Transform_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr, 100672474);
				Turret.Part.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr, 100672475);
			}

			// Token: 0x06007A0B RID: 31243 RVA: 0x0000A688 File Offset: 0x00008888
			public Part(IntPtr pointer)
				: base(pointer)
			{
			}

			// Token: 0x170029AC RID: 10668
			// (get) Token: 0x06007A0C RID: 31244 RVA: 0x001F16D0 File Offset: 0x001EF8D0
			// (set) Token: 0x06007A0D RID: 31245 RVA: 0x001F1704 File Offset: 0x001EF904
			public unsafe Transform transform
			{
				get
				{
					IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.Part.NativeFieldInfoPtr_transform);
					IntPtr intPtr2 = *intPtr;
					return (intPtr2 != 0) ? new Transform(intPtr2) : null;
				}
				set
				{
					IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
					IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.Part.NativeFieldInfoPtr_transform), IL2CPP.Il2CppObjectBaseToPtr(value));
				}
			}

			// Token: 0x170029AD RID: 10669
			// (get) Token: 0x06007A0E RID: 31246 RVA: 0x001F172C File Offset: 0x001EF92C
			// (set) Token: 0x06007A0F RID: 31247 RVA: 0x001F1760 File Offset: 0x001EF960
			public unsafe RotationLimit rotationLimit
			{
				get
				{
					IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.Part.NativeFieldInfoPtr_rotationLimit);
					IntPtr intPtr2 = *intPtr;
					return (intPtr2 != 0) ? new RotationLimit(intPtr2) : null;
				}
				set
				{
					IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
					IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(Turret.Part.NativeFieldInfoPtr_rotationLimit), IL2CPP.Il2CppObjectBaseToPtr(value));
				}
			}

			// Token: 0x04005196 RID: 20886
			private static readonly IntPtr NativeFieldInfoPtr_transform;

			// Token: 0x04005197 RID: 20887
			private static readonly IntPtr NativeFieldInfoPtr_rotationLimit;

			// Token: 0x04005198 RID: 20888
			private static readonly IntPtr NativeMethodInfoPtr_AimAt_Public_Void_Transform_0;

			// Token: 0x04005199 RID: 20889
			private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
		}
	}
}
