[Style] 기보 처음, 끝 클릭 시 시간차를 두고 바둑돌 생성, 사라지게 구현
This commit is contained in:
parent
b60f838ecb
commit
3021fa3366
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Unity.VisualScripting;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
@ -216,21 +217,32 @@ public class ReplayManager : Singleton<ReplayManager>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ReplayFirst()
|
public void ReplayFirst()
|
||||||
|
{
|
||||||
|
StartCoroutine(IReplayFirst());
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator IReplayFirst()
|
||||||
{
|
{
|
||||||
while (_placedStoneStack.Count > 0)
|
while (_placedStoneStack.Count > 0)
|
||||||
{
|
{
|
||||||
ReplayUndo(_placedStoneStack.Pop());
|
ReplayUndo(_placedStoneStack.Pop());
|
||||||
|
yield return new WaitForSeconds(0.1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReplayFinish()
|
public void ReplayFinish()
|
||||||
|
{
|
||||||
|
StartCoroutine(IReplayFinish());
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator IReplayFinish()
|
||||||
{
|
{
|
||||||
while(_placedStoneStack.Count < _selectedReplayRecord.moves.Count)
|
while(_placedStoneStack.Count < _selectedReplayRecord.moves.Count)
|
||||||
{
|
{
|
||||||
ReplayNext(GetNextMove());
|
ReplayNext(GetNextMove());
|
||||||
|
yield return new WaitForSeconds(0.1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetPlayerANickname()
|
public string GetPlayerANickname()
|
||||||
{
|
{
|
||||||
return _selectedReplayRecord.playerA;
|
return _selectedReplayRecord.playerA;
|
||||||
|
@ -27,7 +27,6 @@ public class ReplayPanelItemsController : ScrollPanelController
|
|||||||
records = ReplayManager.Instance.LoadReplayDatas();
|
records = ReplayManager.Instance.LoadReplayDatas();
|
||||||
foreach (var replayRecord in records)
|
foreach (var replayRecord in records)
|
||||||
{
|
{
|
||||||
Debug.Log($"{replayRecord.gameDate}의 결과는 {replayRecord.gameResult}");
|
|
||||||
var replayCellButtonObject = Instantiate(scrollItemPrefab, content.transform);
|
var replayCellButtonObject = Instantiate(scrollItemPrefab, content.transform);
|
||||||
ReplayCell replayCell = replayCellButtonObject.GetComponent<ReplayCell>();
|
ReplayCell replayCell = replayCellButtonObject.GetComponent<ReplayCell>();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user