void SetHiScore(int newHiScore) { //Change HUD hiScore = newHiScore; hiScoreText.text = HelperFs.ScoreFormat(hiScore); //Change Player prefs PlayerPrefs.SetInt("hiScore", hiScore); }
private void Start() { CanvasScaler cs = GetComponent <CanvasScaler>(); cs.referenceResolution = new Vector2(Screen.width, Screen.height); //"HI-Score : 5430" hiScoreText.text = "HI-Score : " + HelperFs.ScoreFormat(GetHighScore()); }
void InitHUD() { hiScore = PlayerPrefs.GetInt("hiScore", 0); hiScoreText.text = HelperFs.ScoreFormat(hiScore); remainingLifeText.text = remainingLife.ToString(); fastMovementTimeT = PowerUpsParent.GetChild(0); doubleBarrelTimeT = PowerUpsParent.GetChild(1); fastShootTimeT = PowerUpsParent.GetChild(2); }
internal void AddScore(int add) { score += add; if (score > hiScore) { SetHiScore(score); } //Change HUD scoreText.text = HelperFs.ScoreFormat(score); }