面试总结3
3.代码篇
第三角色控制器 public class Player : MonoBehaviour {
public Transform _cameraTrans;
private Vector3 _cameraOffset;
void Awake() {
_cameraOffset = transform.position - _cameraTrans.position;
}
void Update() {
_cameraTrans.position = transform.position - _cameraOffset;
}
} 计时器工具,从整点开始计时,格式为:00:00:00
private float timer = 0f;
private int h = 0;
private int m = 0;
private int s = 0;
private string timeStr = string.Empty;
void Update ()
面试总结3最先出现在Python成神之路。
共有 0 条评论