From c16e71b11bd6f42464d35206ff7610a9353ea6a9 Mon Sep 17 00:00:00 2001 From: shurongsen <1799096798@qq.com> Date: Wed, 4 Dec 2024 11:38:00 +0800 Subject: [PATCH] add --- Role/Role.cs | 4 +++- Role/move/2D/SimplePathfindingDoTween.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Role/Role.cs b/Role/Role.cs index 4f0dae5..45945a8 100644 --- a/Role/Role.cs +++ b/Role/Role.cs @@ -60,7 +60,9 @@ public class Role : Fun if (Application.isPlaying) { UpdateBuff(); + Navigation.MoveToNextWaypoint(gameObject); } + updateAnimation(); } /// @@ -83,7 +85,7 @@ public class Role : Fun else if (animationHighlight < 0) { animationHighlight = 0; } - EditorUtility.SetDirty(this); + //EditorUtility.SetDirty(this); List LightSprite = AnimationTree[animationHighlight].value; if (LightSprite == null ) { diff --git a/Role/move/2D/SimplePathfindingDoTween.cs b/Role/move/2D/SimplePathfindingDoTween.cs index f3f3347..da58bf6 100644 --- a/Role/move/2D/SimplePathfindingDoTween.cs +++ b/Role/move/2D/SimplePathfindingDoTween.cs @@ -15,7 +15,7 @@ // MoveToNextWaypoint(); //} - void MoveToNextWaypoint(GameObject gameObject) + public void MoveToNextWaypoint(GameObject gameObject) { if (currentWaypointIndex < waypoints.Length) {