예제 #1
0
    public void Setup(CoinSystem coinSystem)
    {
        this.coinSystem = coinSystem;
        coinText.text   = "Coins: " + coinSystem.GetCoin();

        coinSystem.OnCoinChanged += CoinSystem_OnCoinChanged;
    }
예제 #2
0
 private void CoinSystem_OnCoinChanged(object sender, System.EventArgs e)
 {
     coinText.text = "Coins: " + coinSystem.GetCoin();
     PlayerPrefs.SetInt("PlayerCoinAmount", coinSystem.GetCoin());
 }