private void Start() { totalCoin = 0; coinUI = new CoinUI(); source = gameObject.GetComponent <AudioSource>(); source.volume = 0.5f; }
// Start is called before the first frame update void Start() { GameObject mPlayer = GameObject.FindWithTag("Player"); GameObject mCoinUI = GameObject.FindWithTag("GameUIController"); if (mPlayer != null) { playerScript = mPlayer.GetComponent <Player>(); } if (mCoinUI != null) { coinUI = mCoinUI.GetComponent <CoinUI>(); } }
public void Start() { coinUI = this; LoadInfo(); }