29 lines
483 B
C#
29 lines
483 B
C#
using UnityEngine;
|
|
|
|
public class FPPtoTPP : MonoBehaviour
|
|
{
|
|
public GameObject FPPcamera;
|
|
|
|
public GameObject TPPcamera;
|
|
|
|
private void Start()
|
|
{
|
|
FPPcamera.SetActive(value: true);
|
|
TPPcamera.SetActive(value: false);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if (Input.GetKey(KeyCode.M))
|
|
{
|
|
FPPcamera.SetActive(value: true);
|
|
TPPcamera.SetActive(value: false);
|
|
}
|
|
if (Input.GetKey(KeyCode.N))
|
|
{
|
|
FPPcamera.SetActive(value: false);
|
|
TPPcamera.SetActive(value: true);
|
|
}
|
|
}
|
|
}
|