using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000347 RID: 839
[Token(Token = "0x2000347")]
public class FreeCamera : MonoBehaviour
{
	// Token: 0x060020C4 RID: 8388 RVA: 0x0004E0E0 File Offset: 0x0004C2E0
	[Token(Token = "0x60020C4")]
	[Address(RVA = "0x4C6110", Offset = "0x4C4F10", VA = "0x1804C6110")]
	private void Awake()
	{
		bool flag = this.enableInputCapture;
		base.enabled = flag;
	}

	// Token: 0x060020C5 RID: 8389 RVA: 0x0004E0FC File Offset: 0x0004C2FC
	[Token(Token = "0x60020C5")]
	[Address(RVA = "0x4C61E0", Offset = "0x4C4FE0", VA = "0x1804C61E0")]
	private void OnValidate()
	{
		if (Application.isPlaying)
		{
			bool flag = this.enableInputCapture;
			base.enabled = flag;
			return;
		}
	}

	// Token: 0x060020C6 RID: 8390 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60020C6")]
	[Address(RVA = "0x4C6120", Offset = "0x4C4F20", VA = "0x1804C6120")]
	private void CaptureInput()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060020C7 RID: 8391 RVA: 0x0004E124 File Offset: 0x0004C324
	[Token(Token = "0x60020C7")]
	[Address(RVA = "0x4C6210", Offset = "0x4C5010", VA = "0x1804C6210")]
	private void ReleaseInput()
	{
		Cursor.lockState = CursorLockMode.None;
		Cursor.visible = true;
		this.m_inputCaptured = false;
	}

	// Token: 0x060020C8 RID: 8392 RVA: 0x0004E144 File Offset: 0x0004C344
	[Token(Token = "0x60020C8")]
	[Address(RVA = "0x4C61B0", Offset = "0x4C4FB0", VA = "0x1804C61B0")]
	private void OnApplicationFocus(bool focus)
	{
		if (this.m_inputCaptured && !focus)
		{
			Cursor.lockState = CursorLockMode.None;
			Cursor.visible = true;
			this.m_inputCaptured = false;
		}
	}

	// Token: 0x060020C9 RID: 8393 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60020C9")]
	[Address(RVA = "0x4C6240", Offset = "0x4C5040", VA = "0x1804C6240")]
	private void Update()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060020CA RID: 8394 RVA: 0x0004E174 File Offset: 0x0004C374
	[Token(Token = "0x60020CA")]
	[Address(RVA = "0x4C6700", Offset = "0x4C5500", VA = "0x1804C6700")]
	public FreeCamera()
	{
	}

	// Token: 0x04002A1A RID: 10778
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002A1A")]
	public bool enableInputCapture = true;

	// Token: 0x04002A1B RID: 10779
	[FieldOffset(Offset = "0x19")]
	[Token(Token = "0x4002A1B")]
	public bool holdRightMouseCapture;

	// Token: 0x04002A1C RID: 10780
	[FieldOffset(Offset = "0x1C")]
	[Token(Token = "0x4002A1C")]
	public float lookSpeed = 5f;

	// Token: 0x04002A1D RID: 10781
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002A1D")]
	public float moveSpeed = 5f;

	// Token: 0x04002A1E RID: 10782
	[FieldOffset(Offset = "0x24")]
	[Token(Token = "0x4002A1E")]
	public float sprintSpeed = 50f;

	// Token: 0x04002A1F RID: 10783
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4002A1F")]
	private bool m_inputCaptured;

	// Token: 0x04002A20 RID: 10784
	[FieldOffset(Offset = "0x2C")]
	[Token(Token = "0x4002A20")]
	private float m_yaw;

	// Token: 0x04002A21 RID: 10785
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4002A21")]
	private float m_pitch;
}
