22 lines
480 B
C#
22 lines
480 B
C#
using UnityEngine;
|
|
using TMPro;
|
|
using System.Collections.Generic;
|
|
|
|
public class TampilanSkor : MonoBehaviour
|
|
{
|
|
public TMP_Text skorText;
|
|
|
|
void Start()
|
|
{
|
|
List<SkorData> skorList = FileHandler.ReadFromJSON<SkorData>("skor.json");
|
|
|
|
if (skorList.Count > 0)
|
|
{
|
|
skorText.text = "Skor Terakhir Kamu: " + skorList[0].skor.ToString();
|
|
}
|
|
else
|
|
{
|
|
skorText.text = "Belum ada skor tersimpan.";
|
|
}
|
|
}
|
|
} |