private void SetKeyPrice() { if (money.GetMoney() < 5) { price = money.GetMoney(); } else { price = 5; } }
// Update is called once per frame void Update() { if (inside && Input.GetKeyDown("up") && player.GetHasDoorKey()) { PlayerPrefs.SetInt("Money", money.GetMoney()); myRenderer.sprite = openDoor; FindObjectOfType <Level>().LoadNextLevel(); } }
// Update is called once per frame void Update() { text.text = money.GetMoney().ToString(); }