Populated Highscore page with high scores
This commit is contained in:
+1548
-8
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
|||||||
|
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"));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9c8638fb990724c44a4ae96f9a43e44e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+43
-17
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user