From 382c51f242deb681c2e152a982d971b60747dca2 Mon Sep 17 00:00:00 2001 From: wulongxiao <2545507770@qq.com> Date: Mon, 6 Jan 2025 17:38:22 +0800 Subject: [PATCH] xiubug --- .../Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs | 4 ++-- meng_yao/Assets/script/scene_jinshakuang/minerControl.cs | 2 +- meng_yao/Assets/script/scene_jinshakuang/roomcontroller.cs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs b/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs index 037e78f4..f203f86b 100644 --- a/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs +++ b/meng_yao/Assets/script/Scene_jinshadao/BaoshiRoomcontroller.cs @@ -138,8 +138,8 @@ public class BaoshiRoomcontroller : MonoBehaviour fishMan = GameObject.Instantiate(fishManPrefab, this.transform); fishManlist.Add(fishMan); - //Vector3 pos = new Vector3(Random.Range((endPos.position.x - startPos.position.x) / 2, endPos.position.x), endPos.position.y, endPos.position.z); - fishMan.transform.position = endPos.position; + Vector3 pos = new Vector3(Random.Range((endPos.position.x - startPos.position.x) / 2, endPos.position.x), endPos.position.y, endPos.position.z); + fishMan.transform.position = pos; diff --git a/meng_yao/Assets/script/scene_jinshakuang/minerControl.cs b/meng_yao/Assets/script/scene_jinshakuang/minerControl.cs index 869837c9..4a40f711 100644 --- a/meng_yao/Assets/script/scene_jinshakuang/minerControl.cs +++ b/meng_yao/Assets/script/scene_jinshakuang/minerControl.cs @@ -123,7 +123,7 @@ public class minerControl : MonoBehaviour } //¸Ä±ä³¯Ïò - ChangeShipLook(pathPoints[0], pathPoints[path.Count - 1]); + ChangeShipLook(this.transform.position, pathPoints[path.Count - 1]); diff --git a/meng_yao/Assets/script/scene_jinshakuang/roomcontroller.cs b/meng_yao/Assets/script/scene_jinshakuang/roomcontroller.cs index 7d378bca..27d6b33e 100644 --- a/meng_yao/Assets/script/scene_jinshakuang/roomcontroller.cs +++ b/meng_yao/Assets/script/scene_jinshakuang/roomcontroller.cs @@ -130,10 +130,10 @@ public class roomcontroller : MonoBehaviour fishMan = GameObject.Instantiate(fishManPrefab, this.transform); fishManlist.Add(fishMan); - /*Vector3 pos = new Vector3(Random.Range((endPos.position.x-startPos.position.x)/2, endPos.position.x), endPos.position.y, endPos.position.z); - fishMan.transform.position = pos;*/ + Vector3 pos = new Vector3(Random.Range((endPos.position.x-startPos.position.x)/2, endPos.position.x), endPos.position.y, endPos.position.z); + fishMan.transform.position = pos; - fishMan.transform.position = endPos.position; + //fishMan.transform.position = endPos.position; fishManShipContorl = fishMan.GetComponent(); fishManShipContorl.init(this.paths, this.pathsNeedTimer, this.fishingNeedTimer, this.restTimer, this.startPos, this.endPos);