// Start is called before the first frame update void Start() { nowLevel.text = PlayerPrefs.GetInt("nowLevel", 1).ToString(); nextLevel.text = PlayerPrefs.GetInt("nextLevel", 2).ToString(); goldText.text = PlayerPrefs.GetInt("gold", 0).ToString(); _goldUI = FindObjectOfType <GoldUI>(); playerController = FindObjectOfType <PlayerController>(); }
void Start() { goldUI = GetComponent <GoldUI>(); Amount = _amount == -1 ? 20 + Random.Range(-5, 5) : _amount; }
void Awake() { gold = GoldUI.instance; }
void Awake() { instance = this; }
void Start() { addGold = GameObject.Find("Gold UI").GetComponent <GoldUI>(); goldValue = Random.Range(goldValueMin, goldValueMax); }