Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. public int lol = 500;
  2. public Text yt;
  3. public Button ytb;
  4. public Text smenaText;
  5. public int clickCount;
  6.  
  7. /*public Text yt2;
  8. public Button ytb2;
  9.  
  10.  
  11. void Start()
  12. {
  13. yt2.text = "Недоступно";
  14. ytb2.interactable = false;
  15. }
  16.  
  17. IEnumerator Reloader()
  18. {
  19. yield return new WaitForSeconds(10);
  20. ytb.interactable = true;
  21. yt.text = "Работать";
  22. }
  23.  
  24.  
  25.  
  26.  
  27. public void RabotaButton()
  28. {
  29.  
  30. clickCount++;
  31. if (clickCount == 10)
  32. {
  33. clickCount = 0;
  34. yt.text = "Недоступно";
  35. ytb.interactable = false;
  36. StartCoroutine("Reloader");
  37. }
  38. lol -= 10;
  39. GameManager.balance += 50;
  40. }
  41.  
  42. void Update()
  43. {
  44. smenaText.text = "Отработано смен: " + lol.ToString();
  45.  
  46. if (lol == 0)
  47. {
  48. yt.text = "Недоступно";
  49. ytb.interactable = false;
  50. smenaText.text = "Вы отработали смены, устройтесь на новую работу!";
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement