// Use this for initialization private void Start() { sh = FindObjectOfType <ScoreHandler>(); if (sh) { score = sh.GetScore(); } textMesh = GetComponent <TextMeshProUGUI>(); Debug.Log(sh); }
async public Task <ActionResult> EditScore(int id) { Score score = await ScoreHandler.GetScore(id); if (score == null) { return(RedirectToAction("Scores")); } return(PartialView(score)); }
// Update is called once per frame void Update() { if (!endGameScript.IsDead()) { if (waitForStartScript.HasStarted()) { timeLeft -= Time.deltaTime; } if (timeLeft <= 0) { endGameScript.EndTheGame(GameObject.Find("Tank")); timeLeft = 0; } } timeTextComponent.text = string.Format("Time: {0:00.00}s", timeLeft); scoreTextComponent.text = string.Format("Score: {0:00000}", scoreHandlerScript.GetScore()); }
// Update is called once per frame void Update() { int score = _sh.GetScore(); this.GetComponent <Text> ().text = "GAME OVER\nSCORE:" + score; }
void OnEnable() { ScoreHandler score = UIManager.Instance.GetScreen <ScoreHandler>(); currentScore.text = "Score: " + score.GetScore().ToString(); }