Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEngine.UI;
- public class ScriptTrade : MonoBehaviour
- {
- public Text win;
- public InputField vvodTexta;
- public int balance;
- void Start()
- {
- OnClick2();
- OnClick3();
- }
- public void OnClick2()
- {
- if (int.TryParse(vvodTexta.text, out int result))
- {
- win.text = vvodTexta.text;
- GameManager.balance += result;
- GameManager.TextUpdate();
- }
- }
- public void OnClick3()
- {
- if (int.TryParse(vvodTexta.text, out int result))
- {
- win.text = vvodTexta.text;
- GameManager.balance += result;
- GameManager.TextUpdate();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement