和一个函数有关 还没搞懂函数是做什么的
using UnityEngine;
using System.Collections;
public class CubeStatic : MonoBehaviour
{
public float minFov = 15f;
public float maxFov = 90f;
public float sensitivity = 10f;
void Update()
{
float fov = Camera.main.fieldOfView;
fov += Input.GetAxis("Mouse ScrollWheel") * sensitivity;
fov = Mathf.Clamp(fov, minFov, maxFov);
Camera.main.fieldOfView = fov;
}
}