34 lines
1.3 KiB
C#
34 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using TMPro;
|
|
|
|
public class HighScore : MonoBehaviour
|
|
{
|
|
|
|
public TextMeshProUGUI ObstacleScoreText;
|
|
public TextMeshProUGUI ObstacleTimeText;
|
|
public TextMeshProUGUI WaypointScoreText;
|
|
public TextMeshProUGUI WaypointTimeText;
|
|
public TextMeshProUGUI InfinityScoreText;
|
|
public TextMeshProUGUI InfinityTimeText;
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
ObstacleScoreText.text = "HIGH SCORE: " + "\n" + PlayerPrefs.GetInt("ObstacleHighFloor")
|
|
+ "-" + PlayerPrefs.GetInt("ObstacleHighLevel");
|
|
ObstacleTimeText.text = "HIGH SCORE TIME: " + "\n" + Mathf.Round(PlayerPrefs.GetFloat("ObstacleHighTime"));
|
|
|
|
WaypointScoreText.text = "HIGH SCORE: " + "\n" + PlayerPrefs.GetInt("WaypointHighSize")
|
|
+ "-" + PlayerPrefs.GetInt("WaypointHighFloor");
|
|
WaypointTimeText.text = "HIGH SCORE TIME: " + "\n" + Mathf.Round(PlayerPrefs.GetFloat("WaypointHighTime"));
|
|
|
|
InfinityScoreText.text = "HIGH SCORE: " + "\n" + PlayerPrefs.GetInt("RunnerHighFloor")
|
|
+ "-" + PlayerPrefs.GetInt("RunnerHighLevel");
|
|
InfinityTimeText.text = "HIGH SCORE DISTANCE: " + "\n" + Mathf.Round(PlayerPrefs.GetFloat("RunnerHighDistance"));
|
|
|
|
}
|
|
}
|