From a7b9b97008c0ca46c59aa565b05c43f85a335305 Mon Sep 17 00:00:00 2001 From: guyuan9527 <2533167850@qq.com> Date: Mon, 18 Sep 2023 05:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=A7=86=E8=B7=9D=E6=8B=89?= =?UTF-8?q?=E8=BF=91=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Script/Camera/CameraControl.cs | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Electrical_inspectionCompetitionSystem/Assets/Script/Camera/CameraControl.cs b/Electrical_inspectionCompetitionSystem/Assets/Script/Camera/CameraControl.cs index 82fa2603..ea1c0d0a 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Script/Camera/CameraControl.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Script/Camera/CameraControl.cs @@ -12,23 +12,27 @@ public class CameraControl : MonoBehaviour fieldView -= Input.GetAxis("Mouse ScrollWheel") * 10f; fieldView = Mathf.Clamp(fieldView, 30, 60); playerCamera.fieldOfView = fieldView; - switch (fieldView/10) + if (GameManager.ins.temp&& !GameManager.ins.temp.name.Equals("ǯÐεçÁ÷±í(Clone)")) { - case 3: - - break; - case 4: - - break; - case 5: - - break; - case 6: - - break; - default: - break; + switch (fieldView / 10) + { + case 3: + GameManager.ins.temp.transform.localPosition = new Vector3(0, 0.53f, 1.10f); + break; + case 4: + GameManager.ins.temp.transform.localPosition = new Vector3(0, 0.63f, 0.82f); + break; + case 5: + GameManager.ins.temp.transform.localPosition = new Vector3(0.04f, 0.55f, 0.81f); + break; + case 6: + GameManager.ins.temp.transform.localPosition = new Vector3(0.12f, 0.46f, 0.81f); + break; + default: + break; + } } + } }