mirror of
https://github.com/Fluffy-Bean/Again.git
synced 2025-05-14 13:12:16 +00:00
21 lines
512 B
C#
21 lines
512 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class highScoreCheck : MonoBehaviour
|
|
{
|
|
TextMeshProUGUI textBox;
|
|
public float lowestTime;
|
|
void Start()
|
|
{
|
|
|
|
if (PlayerPrefs.GetFloat("lowestTime") > PlayerPrefs.GetFloat("timeScore"))
|
|
{
|
|
PlayerPrefs.SetFloat("lowestTime",PlayerPrefs.GetFloat("timeScore"));
|
|
}
|
|
|
|
textBox = GetComponent<TextMeshProUGUI>();
|
|
textBox.SetText("Shortest Time: {0}s", PlayerPrefs.GetFloat("lowestTime"));
|
|
}
|
|
}
|