public void UpdateDepthUI()
 {
     if (depthMeter != null)
     {
         depthText.text = depthMeter.GetMaxDepth().ToString() + depthTextStringEndFormat;
     }
     else
     {
         // Inside game over screen
         int depth = PlayerPrefs.GetInt("Depth", 0);
         depthText.text = depth.ToString() + depthTextStringEndFormat;
     }
 }
示例#2
0
    public void ShowGameOverMenu()
    {
        MoveGameOverScreen();
        IsGameOver = true;
        gameOverMenu.SetActive(true);
        gameOverIdle.enabled    = true;
        gameOverRestart.enabled = false;
        gameOverQuit.enabled    = false;

        depthTextStringEndFormat = depthText.text.Substring(depthStartZeroes, depthText.text.Length - depthStartZeroes);
        highscoreStringEndFormat = highScoreText.text.Substring(highScoreStartZeroes, highScoreText.text.Length - highScoreStartZeroes);
        scoreStringEndFormat     = scoreText.text.Substring(scoreTextStartZeroes, scoreText.text.Length - scoreTextStartZeroes);

        depthText.text     = depthMeter.GetMaxDepth().ToString() + depthTextStringEndFormat;
        highScoreText.text = scoreManager.HighScore.ToString() + highscoreStringEndFormat;
        scoreText.text     = scoreManager.Score.ToString() + scoreStringEndFormat;
    }
 public void UpdateScore()
 {
     Score = (int)((depthMeter.GetMaxDepth() * depthMultiplier + GemScore) + 0.5);
     ui_Manager.UpdateScoreUI();
 }