Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C# by huy ( 7 years ago )
IEnumerator countDown(){
		timeCountDown.GetComponent<UILabel> ().enabled = true;
		while (countNbAds > 0) {
			yield return new WaitForSeconds (1.0f);
			countNbAds--;
			timeCountDown.GetComponent<UILabel> ().text = countNbAds.ToString ();
		}
		timeCountDown.GetComponent<UILabel> ().enabled = false;
		videoAdsBtn.SetActive (true);
	}
	void onVideoAdsView(){
		videoAdsBtn.SetActive (false);

		countNbAds = 29;
		StartCoroutine (countDown ());

		HDAdsController.HDshowVideoRewarded ();
#if UNITY_ANDROID||UNITY_IOS
		/*if (Chartboost.hasRewardedVideo (CBLocation.MainMenu)) { 
			Chartboost.showRewardedVideo (CBLocation.MainMenu);
			Chartboost.cacheRewardedVideo (CBLocation.MainMenu);
		} else {
			HDAdsController.HDshowInterstitial(0);
			//Chartboost.showInterstitial (CBLocation.MainMenu);
			// We don't have a cached video right now, but try to get one for next time
			Chartboost.cacheRewardedVideo (CBLocation.MainMenu);
			coinDemo += 50;
			StartCoroutine (addCoinEffect ());
			//hasAddMoney = true;
			AudioSource.PlayClipAtPoint (Coinreward, GameObject.Find ("Camera").transform.position);
			byte[] bytesToEncode = System.Text.Encoding.UTF8.GetBytes (maxDemo.ToString());
			string encodedText = System.Convert.ToBase64String(bytesToEncode);
			PlayerPrefs.SetString ("coinDemo", encodedText);

		}*/
#else
		coinDemo += 50;
		PlayerPrefs.SetInt ("coinDemo", maxDemo);
		WinPhoneAdMob.showInterstitial();
		WinPhoneAdMob.loadInterstitial( IntroClip.InterstitialAdmobWP8, true );
		addLittlePoint();
#endif
	}

 

Revise this Paste

Children: 98646
Your Name: Code Language: