Abdula_2314124

Untitled

Mar 18th, 2024
758
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using TMPro;
  4. using UnityEngine;
  5.  
  6. public class ScoreController : MonoBehaviour
  7. {
  8.     [SerializeField] private TextMeshProUGUI scoreText;
  9.     private float _score;
  10.     public void UpdateScore()
  11.     {
  12.         _score++;
  13.         scoreText.text = $"Score: {_score}";
  14.     }
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment