Esempio n. 1
0
    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);
        }
    }
Esempio n. 2
0
 private void UpdateCurrentScoreText()
 {
     _currentScoreText.text = NumberFormatter.ToKMB(_currentScore);
 }