Time 类中封装了常用的时间控制方法
Mathf 类中封装了常用的数学方法
Time

Mathf

代码实例
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public float angleSpeed;
void Update () {
if (Input.GetKeyDown(KeyCode.P))
{
float t = Time.time;
Debug.Log("从游戏开始当前帧,所消耗的总时长为:" + t + "秒");
float d = Time.deltaTime;
Debug.Log(d);
}
transform.Rotate(Vector3.up, Time.deltaTime * angleSpeed );
float ts = Time.timeScale;
int i = Mathf.Abs(-12);
int max = Mathf.Max(12, 16, 48, 99, 3);
int min = Mathf.Min(12, 16, 48, 99, 3);
int s = Mathf.Sqrt(4);
}
}