Files
Magical-Jumping-Bean/Assets/Scripts/HighScore.cs
T

34 lines
1.3 KiB
C#
Raw Normal View History

2020-02-06 23:27:42 -05:00
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 TIME: " + "\n" + Mathf.Round(PlayerPrefs.GetFloat("RunnerHighTime"));
}
}