Procházet zdrojové kódy

兔子移动范围缩小

lvjincheng před 3 roky
rodič
revize
f9723f5cf5

+ 1 - 1
Assets/BowArrow/Scripts/GameChallenge/Animals/Rabbit.cs

@@ -325,7 +325,7 @@ public class Rabbit : TargetAnimal
     void RandomMove() {
         Vector3 standardPointer = animalsBaseT.forward;
         Vector3 pointerWithLen = standardPointer.normalized * (baseDistance + Random.value * baseDistanceMoveRange);
-        pointerWithLen = Quaternion.AngleAxis(Random.Range(-22f, 22f), Vector3.up) * pointerWithLen;
+        pointerWithLen = Quaternion.AngleAxis(Random.Range(-18f, 18f), Vector3.up) * pointerWithLen;
         Vector3 newPos = animalsBaseT.position + pointerWithLen;
         // GameObject.Find("BBAA").transform.position = newPos;
         // GameObject.Find("BBBA").transform.LookAt(GameObject.Find("BBAA").transform);

+ 1 - 1
Assets/BowArrow/Scripts/GameMode/RabbitHuntGameMode.cs

@@ -70,7 +70,7 @@ public class RabbitHuntGameMode : ChallengeGameMode
             baseCreateDistance += plusCreateDistance;
             Vector3 standardPointer = animalsBaseT.forward;
             Vector3 displace = standardPointer * createDistance;
-            displace = Quaternion.AngleAxis(Random.Range(-22f, 22f), Vector3.up) * displace;
+            displace = Quaternion.AngleAxis(Random.Range(-18f, 18f), Vector3.up) * displace;
             Vector3 newPos = animalsBaseT.position + displace;
         #endregion