using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x0200039F RID: 927
[Token(Token = "0x200039F")]
public class FreeCamera : MonoBehaviour
{
	// Token: 0x0600238D RID: 9101 RVA: 0x00055360 File Offset: 0x00053560
	[Token(Token = "0x600238D")]
	[Address(RVA = "0x368940", Offset = "0x367940", VA = "0x180368940")]
	private void Awake()
	{
		bool flag = this.enableInputCapture;
		base.enabled = flag;
	}

	// Token: 0x0600238E RID: 9102 RVA: 0x0005537C File Offset: 0x0005357C
	[Token(Token = "0x600238E")]
	[Address(RVA = "0x368A10", Offset = "0x367A10", VA = "0x180368A10")]
	private void OnValidate()
	{
		if (Application.isPlaying)
		{
			bool flag = this.enableInputCapture;
			base.enabled = flag;
			return;
		}
	}

	// Token: 0x0600238F RID: 9103 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600238F")]
	[Address(RVA = "0x368950", Offset = "0x367950", VA = "0x180368950")]
	private void CaptureInput()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06002390 RID: 9104 RVA: 0x000553A4 File Offset: 0x000535A4
	[Token(Token = "0x6002390")]
	[Address(RVA = "0x368A40", Offset = "0x367A40", VA = "0x180368A40")]
	private void ReleaseInput()
	{
		Cursor.lockState = CursorLockMode.None;
		Cursor.visible = true;
		this.m_inputCaptured = false;
	}

	// Token: 0x06002391 RID: 9105 RVA: 0x000553C4 File Offset: 0x000535C4
	[Token(Token = "0x6002391")]
	[Address(RVA = "0x3689E0", Offset = "0x3679E0", VA = "0x1803689E0")]
	private void OnApplicationFocus(bool focus)
	{
		if (this.m_inputCaptured && !focus)
		{
			Cursor.lockState = CursorLockMode.None;
			Cursor.visible = true;
			this.m_inputCaptured = false;
		}
	}

	// Token: 0x06002392 RID: 9106 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6002392")]
	[Address(RVA = "0x368A70", Offset = "0x367A70", VA = "0x180368A70")]
	private void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06002393 RID: 9107 RVA: 0x000553F4 File Offset: 0x000535F4
	[Token(Token = "0x6002393")]
	[Address(RVA = "0x368F30", Offset = "0x367F30", VA = "0x180368F30")]
	public FreeCamera()
	{
	}

	// Token: 0x04002D04 RID: 11524
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002D04")]
	public bool enableInputCapture = true;

	// Token: 0x04002D05 RID: 11525
	[FieldOffset(Offset = "0x19")]
	[Token(Token = "0x4002D05")]
	public bool holdRightMouseCapture;

	// Token: 0x04002D06 RID: 11526
	[FieldOffset(Offset = "0x1C")]
	[Token(Token = "0x4002D06")]
	public float lookSpeed = 5f;

	// Token: 0x04002D07 RID: 11527
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002D07")]
	public float moveSpeed = 5f;

	// Token: 0x04002D08 RID: 11528
	[FieldOffset(Offset = "0x24")]
	[Token(Token = "0x4002D08")]
	public float sprintSpeed = 50f;

	// Token: 0x04002D09 RID: 11529
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4002D09")]
	private bool m_inputCaptured;

	// Token: 0x04002D0A RID: 11530
	[FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x4002D0A")]
	private float m_yaw;

	// Token: 0x04002D0B RID: 11531
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4002D0B")]
	private float m_pitch;
}
