From 3021fa3366f72c6b313ee6cd413d9924ee7b7035 Mon Sep 17 00:00:00 2001 From: HaeinLEE Date: Mon, 24 Mar 2025 15:26:41 +0900 Subject: [PATCH] =?UTF-8?q?[Style]=20=EA=B8=B0=EB=B3=B4=20=EC=B2=98?= =?UTF-8?q?=EC=9D=8C,=20=EB=81=9D=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=EC=B0=A8=EB=A5=BC=20=EB=91=90=EA=B3=A0=20?= =?UTF-8?q?=EB=B0=94=EB=91=91=EB=8F=8C=20=EC=83=9D=EC=84=B1,=20=EC=82=AC?= =?UTF-8?q?=EB=9D=BC=EC=A7=80=EA=B2=8C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Script/Replay/ReplayManager.cs | 14 +++++++++++++- .../PanelController/ReplayPanelItemsController.cs | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Assets/Script/Replay/ReplayManager.cs b/Assets/Script/Replay/ReplayManager.cs index 1269f06..8b7a7a0 100644 --- a/Assets/Script/Replay/ReplayManager.cs +++ b/Assets/Script/Replay/ReplayManager.cs @@ -2,6 +2,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.IO; +using Unity.VisualScripting; using UnityEngine; using UnityEngine.SceneManagement; @@ -216,21 +217,32 @@ public class ReplayManager : Singleton } public void ReplayFirst() + { + StartCoroutine(IReplayFirst()); + } + + private IEnumerator IReplayFirst() { while (_placedStoneStack.Count > 0) { ReplayUndo(_placedStoneStack.Pop()); + yield return new WaitForSeconds(0.1f); } } public void ReplayFinish() + { + StartCoroutine(IReplayFinish()); + } + + private IEnumerator IReplayFinish() { while(_placedStoneStack.Count < _selectedReplayRecord.moves.Count) { ReplayNext(GetNextMove()); + yield return new WaitForSeconds(0.1f); } } - public string GetPlayerANickname() { return _selectedReplayRecord.playerA; diff --git a/Assets/Script/UI/PanelController/ReplayPanelItemsController.cs b/Assets/Script/UI/PanelController/ReplayPanelItemsController.cs index bdce6c7..abee033 100644 --- a/Assets/Script/UI/PanelController/ReplayPanelItemsController.cs +++ b/Assets/Script/UI/PanelController/ReplayPanelItemsController.cs @@ -27,7 +27,6 @@ public class ReplayPanelItemsController : ScrollPanelController records = ReplayManager.Instance.LoadReplayDatas(); foreach (var replayRecord in records) { - Debug.Log($"{replayRecord.gameDate}의 결과는 {replayRecord.gameResult}"); var replayCellButtonObject = Instantiate(scrollItemPrefab, content.transform); ReplayCell replayCell = replayCellButtonObject.GetComponent();