Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int lol = 500;
- public Text yt;
- public Button ytb;
- public Text smenaText;
- public int clickCount;
- /*public Text yt2;
- public Button ytb2;
- void Start()
- {
- yt2.text = "Недоступно";
- ytb2.interactable = false;
- }
- IEnumerator Reloader()
- {
- yield return new WaitForSeconds(10);
- ytb.interactable = true;
- yt.text = "Работать";
- }
- public void RabotaButton()
- {
- clickCount++;
- if (clickCount == 10)
- {
- clickCount = 0;
- yt.text = "Недоступно";
- ytb.interactable = false;
- StartCoroutine("Reloader");
- }
- lol -= 10;
- GameManager.balance += 50;
- }
- void Update()
- {
- smenaText.text = "Отработано смен: " + lol.ToString();
- if (lol == 0)
- {
- yt.text = "Недоступно";
- ytb.interactable = false;
- smenaText.text = "Вы отработали смены, устройтесь на новую работу!";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement