36 lines
1.0 KiB
C#
36 lines
1.0 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class UI_PracticeInfoItem : BaseItem
|
|
{
|
|
public TextMeshProUGUI number;
|
|
public TextMeshProUGUI point;
|
|
public TextMeshProUGUI pointInfo;
|
|
public TextMeshProUGUI score;
|
|
public void Init(int count, ScoreInfo sInfo)
|
|
{
|
|
number.text = (count + 1).ToString();
|
|
string pointData = "";
|
|
string pointInfoData = "";
|
|
string scoreData = "";
|
|
if (sInfo.isKey)
|
|
{
|
|
pointData = $"<color=#FF0000>{ sInfo.stepName}</color>";
|
|
pointInfoData = $"<color=#FF0000>{sInfo.testPoint}</color>";
|
|
scoreData = $"<color=#FF0000>{sInfo.setScore}</color>/{sInfo.defaultScore}";
|
|
|
|
}
|
|
else
|
|
{
|
|
pointData = sInfo.stepName;
|
|
pointInfoData = sInfo.testPoint;
|
|
scoreData = $"<color=#00EEE6>{sInfo.setScore}</color>/{sInfo.defaultScore}";
|
|
}
|
|
point.text = pointData;
|
|
pointInfo.text = pointInfoData;
|
|
score.text = scoreData;
|
|
}
|
|
}
|