[Style] 확인용 로그 삭제, ReplayCell SetRecordDate 예외처리
This commit is contained in:
parent
ae541cf6ed
commit
774917fd5e
@ -62,7 +62,6 @@ public class GameManager : Singleton<GameManager>
|
||||
UpdateMainPanelUI(OpenMainPanel);
|
||||
// ScoreData.SetScore(userInfo.score);
|
||||
OpenConfirmPanel(userInfo.nickname + "님 로그인 성공하였습니다.", () => { });
|
||||
Debug.Log(userInfo.nickname);
|
||||
}, () =>
|
||||
{
|
||||
Debug.Log("자동 로그인 실패");
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@ -45,16 +46,32 @@ public class ReplayCell : MonoBehaviour
|
||||
|
||||
public void SetRecordDate(string date)
|
||||
{
|
||||
string text = "";
|
||||
if (string.IsNullOrEmpty(date))
|
||||
{
|
||||
// 입력이 비어있거나 null인 경우 예외 처리
|
||||
recordDateText.text = "Invalid Date Format";
|
||||
return;
|
||||
}
|
||||
|
||||
string[] dateSplit = date.Split(' ');
|
||||
if (dateSplit.Length == 2)
|
||||
{
|
||||
text += dateSplit[0].Replace("-", ".");
|
||||
text += "\n";
|
||||
text += dateSplit[1].Replace("_", ":");
|
||||
}
|
||||
StringBuilder text = new StringBuilder();
|
||||
|
||||
// 첫 번째 부분 (날짜) - "-"을 "."으로 교체
|
||||
text.Append(dateSplit[0].Replace("-", "."));
|
||||
text.Append("\n");
|
||||
|
||||
// 두 번째 부분 (시간) - "_"을 ":"으로 교체
|
||||
text.Append(dateSplit[1].Replace("_", ":"));
|
||||
|
||||
recordDateText.text = text;
|
||||
recordDateText.text = text.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 잘못된 포맷 처리
|
||||
recordDateText.text = "Invalid Date Format";
|
||||
}
|
||||
}
|
||||
|
||||
public void SetReplayRecord(ReplayRecord record)
|
||||
|
Loading…
x
Reference in New Issue
Block a user