Esempio n. 1
0
 private static void LateUpdate(this CameraComponent self)
 {
     // 摄像机每帧更新位置
     self.UpdatePosition();
 }
Esempio n. 2
0
        private static void UpdatePosition(this CameraComponent self)
        {
            Vector3 cameraPos = self.mainCamera.transform.position;

            self.mainCamera.transform.position = new Vector3(self.Unit.Position.x, cameraPos.y, self.Unit.Position.z - 1);
        }
Esempio n. 3
0
 private static void Awake(this CameraComponent self)
 {
     self.mainCamera = Camera.main;
 }