void Start() { scoreText.text = "SCORE: " + score; coinText.text = "COIN: " + coin; PlayerPrefCtrl.SaveCoins(PlayerPrefCtrl.loadCoins() + coin); retryButton.onClick.AddListener(() => SceneManager.LoadScene("SobaShooting")); titleButton.onClick.AddListener(() => SceneManager.LoadScene("SSTitle")); }
void Start() { button.onClick.AddListener(OnClickButton); buttonText = button.transform.Find("Text").GetComponent <Text>(); descText = transform.Find("Desc").GetComponent <Text>(); coins = PlayerPrefCtrl.loadCoins(); coinLabel.text = coins.ToString(); if (HomeBG.sprite != null) { background.sprite = HomeBG.sprite; } SetClothe(clothe); }