using System;
using UnityEngine;

public class FrontCamera : MonoBehaviour
{
	public void Awake()
	{
		if (GameMain.Instance.VRMode)
		{
			base.gameObject.SetActive(false);
		}
		else
		{
			this.main_camera_ = Camera.main;
			this.camera_ = base.GetComponent<Camera>();
			this.main_camera_tr_ = this.main_camera_.transform;
			this.camera_tr_ = this.camera_.transform;
		}
	}

	public void LateUpdate()
	{
		if (!GameMain.Instance.VRMode)
		{
			this.camera_tr_.position = this.main_camera_tr_.position;
			this.camera_tr_.rotation = this.main_camera_tr_.rotation;
			this.camera_tr_.localScale = this.main_camera_tr_.localScale;
			this.camera_.fieldOfView = this.main_camera_.fieldOfView;
			this.camera_.nearClipPlane = this.main_camera_.nearClipPlane;
			this.camera_.farClipPlane = this.main_camera_.farClipPlane;
		}
	}

	private Camera main_camera_;

	private Camera camera_;

	private Transform main_camera_tr_;

	private Transform camera_tr_;
}
