using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraChange : MonoBehaviour
{
public Camera firstPersonCamera;
public Camera overheadCamera;
private bool Status = false;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
activatecamera();
}
public void activatecamera()
{
if (Input.GetAxis("Submit") != 0)
{
if (Status == false)
{
Status = true;
firstPersonCamera.enabled = false;
overheadCamera.enabled = true;
}
else
{
Status = false;
firstPersonCamera.enabled = true;
overheadCamera.enabled = false;
}
}
}
}