void AdFinished(ShowResult result) { if (result == ShowResult.Finished) { //Reward the player Data.SetCoinsCount(Data.GetCoinsCount() + coinReward); _coinsCountText.text = NumberFormatter.ToKMB(Data.GetCoinsCount()); // Spawn textObject GameObject textObject = Instantiate(_pickedUpCoinTextPrefab, _pickedCoinTextOffset, _pickedUpCoinTextPrefab.transform.rotation, _parentCanvas); textObject.GetComponentInChildren <Text>().text = coinReward.ToString(); Destroy(textObject, 2f); PlaySound(_rewardClip); } }
private void UpdateCurrentScoreText() { _currentScoreText.text = NumberFormatter.ToKMB(_currentScore); }