Explorar o código

狼待机轻微漂移bug

lvjincheng %!s(int64=4) %!d(string=hai) anos
pai
achega
9b2c12fd41

+ 3 - 3
Assets/BowArrow/Scenes/GameChallengeScene/Wolf.cs

@@ -220,7 +220,7 @@ public class Wolf : TargetAnimal
                     MoveSlowlyInZPath();//内含判断,状态将会转化为锁定目标
                 } else {
                     RandomWillStayTime();
-                    Stay();
+                    Stay(true);
                 }
             }
         }
@@ -422,8 +422,8 @@ public class Wolf : TargetAnimal
         }
     }
     //停留
-    void Stay() {
-        if (state.moving) {
+    void Stay(bool correct = false) {
+        if (state.moving || correct) {
             this.agent.destination = this.agent.nextPosition;
         }
         state.ResetActionState();

+ 1 - 1
Assets/BowArrow/Scripts/Manager/GameMgr.cs

@@ -8,7 +8,7 @@ using UnityEngine.SceneManagement;
 public class GameMgr : MonoBehaviour
 {
     public static bool debugInEditor = false;
-    public static int gameType = 4;
+    public static int gameType = 5;
     public GameMode gameMode;
     [System.NonSerialized] public bool gameOver = false;
     public static GameMgr ins;