本文收录三个常用类。照样很简单,很想快点接触新的东西。
Screen、Time、Mathf
//不同的屏幕会显示不同的数值
Screen.width
Screen.height
//游戏从开始运行到现在的时间
Time.time
//静态只读属性,时间增量,渲染上一帧所花费的时间,可以用来实现倒计时
Time.deltaTime
//时间缩放,0:游戏暂停 1:正常游戏 0.5:游戏慢放0.5倍
Time.timScale
Mathf.Abs();
Mathf.Max();
Mathf.Min();
Mathf.Round(); //四舍五入
//差值运算
Mathf.Lerp(float a,float b,float c);