Exemplo n.º 1
0
    private void LoadNextState()
    {
        // Move to the new calculated index
        _state.MoveTo(Mathf.Clamp(CurrentIndex, 1, _state.Count - 1)); // use Math.max to ensure both start/end nodes are always rendered
        gridController.LoadDirtyGridState(_state.Current, _state.DirtyFlags);

        string pathCount = _path != null ? $"{_path.Count}" : "N/A";

        debugText.text = $"{_state.CurrentRuntime * 1000.0:F1}ms\n" +
                         $"{CurrentIndex:000} / {_state.Count:000}\n" +
                         $"Path: {pathCount} tiles";
    }