fix: stabilize ping undo state and prevent negative ping steps
This commit is contained in:
@@ -221,7 +221,7 @@ public class StepManager : MonoBehaviour
|
||||
|
||||
public void DecrementPingStep()
|
||||
{
|
||||
_pingStepIndex--;
|
||||
_pingStepIndex = Mathf.Max(0, _pingStepIndex - 1);
|
||||
Debug.Log($"StepManager: Ping撤销 -> {_pingStepIndex}");
|
||||
OnStepChanged?.Invoke(_pingStepIndex);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ public static class ActionHistory
|
||||
{
|
||||
if (History.Count == 0) return false;
|
||||
var item = History.Pop();
|
||||
Debug.Log($"[ActionHistory] Undo {item.Type} handler={(item.Handler != null ? item.Handler.name : "null")}, remaining={History.Count}");
|
||||
|
||||
if (item.Type == ActionType.Shose)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user