Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using UnityEngine.SceneManagement;
  4.  
  5. public class Game : MonoBehaviour
  6. {
  7.     public Text scoreText;
  8.    private int score;
  9.    public void OnClick()
  10.     {
  11.         score = score + 1;
  12.         scoreText.text = "Счёт: " + score;
  13.         if (score == 50) { SceneManager.LoadScene("Level1"); };
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement