Advertisement
sphinx2001

ButtoonsController.cs

Mar 23rd, 2021
1,105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class ButtonsController : MonoBehaviour
  5. {
  6.     private void OnMouseDown()
  7.     {
  8.         if (gameObject.name == "button-exit")
  9.         {
  10.             Application.Quit();
  11.         }
  12.         if (gameObject.name == "button-new")
  13.         {
  14.             GameStorage.timer = 60f;
  15.             GameStorage.score = 0;
  16.             GameStorage.isPlay = true;
  17.         }
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement