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: 0x02000446 RID: 1094
	public class Turret : MonoBehaviour
	{
		// Token: 0x06008253 RID: 33363 RVA: 0x00214120 File Offset: 0x00212320
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 625630, XrefRangeEnd = 625632, 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: 0x06008254 RID: 33364 RVA: 0x00214164 File Offset: 0x00212364
		[CallerCount(67)]
		[CachedScanResults(RefRangeStart = 166362, RefRangeEnd = 166429, XrefRangeStart = 166362, XrefRangeEnd = 166429, 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: 0x06008255 RID: 33365 RVA: 0x002141B0 File Offset: 0x002123B0
		// 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, 100673185);
			Turret.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Turret>.NativeClassPtr, 100673186);
		}

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

		// Token: 0x17002C45 RID: 11333
		// (get) Token: 0x06008257 RID: 33367 RVA: 0x00214230 File Offset: 0x00212430
		// (set) Token: 0x06008258 RID: 33368 RVA: 0x00214264 File Offset: 0x00212464
		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: 0x17002C46 RID: 11334
		// (get) Token: 0x06008259 RID: 33369 RVA: 0x0021428C File Offset: 0x0021248C
		// (set) Token: 0x0600825A RID: 33370 RVA: 0x002142C0 File Offset: 0x002124C0
		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: 0x0400573B RID: 22331
		private static readonly IntPtr NativeFieldInfoPtr_target;

		// Token: 0x0400573C RID: 22332
		private static readonly IntPtr NativeFieldInfoPtr_parts;

		// Token: 0x0400573D RID: 22333
		private static readonly IntPtr NativeMethodInfoPtr_Update_Private_Void_0;

		// Token: 0x0400573E RID: 22334
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;

		// Token: 0x02000447 RID: 1095
		[Serializable]
		public class Part : Il2CppSystem.Object
		{
			// Token: 0x0600825B RID: 33371 RVA: 0x002142E8 File Offset: 0x002124E8
			[CallerCount(1)]
			[CachedScanResults(RefRangeStart = 625629, RefRangeEnd = 625630, XrefRangeStart = 625615, XrefRangeEnd = 625629, 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: 0x0600825C RID: 33372 RVA: 0x00214344 File Offset: 0x00212544
			[CallerCount(1664)]
			[CachedScanResults(RefRangeStart = 7711, RefRangeEnd = 9375, XrefRangeStart = 7711, XrefRangeEnd = 9375, 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: 0x0600825D RID: 33373 RVA: 0x00214390 File Offset: 0x00212590
			// 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, 100673187);
				Turret.Part.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<Turret.Part>.NativeClassPtr, 100673188);
			}

			// Token: 0x0600825E RID: 33374 RVA: 0x0000A74C File Offset: 0x0000894C
			public Part(IntPtr pointer)
				: base(pointer)
			{
			}

			// Token: 0x17002C47 RID: 11335
			// (get) Token: 0x0600825F RID: 33375 RVA: 0x0021440C File Offset: 0x0021260C
			// (set) Token: 0x06008260 RID: 33376 RVA: 0x00214440 File Offset: 0x00212640
			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: 0x17002C48 RID: 11336
			// (get) Token: 0x06008261 RID: 33377 RVA: 0x00214468 File Offset: 0x00212668
			// (set) Token: 0x06008262 RID: 33378 RVA: 0x0021449C File Offset: 0x0021269C
			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: 0x0400573F RID: 22335
			private static readonly IntPtr NativeFieldInfoPtr_transform;

			// Token: 0x04005740 RID: 22336
			private static readonly IntPtr NativeFieldInfoPtr_rotationLimit;

			// Token: 0x04005741 RID: 22337
			private static readonly IntPtr NativeMethodInfoPtr_AimAt_Public_Void_Transform_0;

			// Token: 0x04005742 RID: 22338
			private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
		}
	}
}
