Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

Video Admob ads suddenly won't show on 10th gameover , yesterday worked with this script today not :(((

$
0
0
using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class BallScript : MonoBehaviour { public Vector2 startForce; static int times = 0; public Text timesText; public Vector3[] positions; public Rigidbody2D rb; void Start() { int randomNumber = Random.Range(0, positions.Length); transform.position = positions[randomNumber]; times = PlayerPrefs.GetInt("PlayedInRow:", times); rb.AddForce(startForce, ForceMode2D.Impulse); } void Update() { PlayerPrefs.SetInt("PlayedInRow", times); timesText.text = "PlayedInRow:" + times.ToString(); } void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.name == "wall_bottom") { times++; if (times == 10) { AdsManager.Instance.ShowVideo(); } SceneManager.LoadScene("wfvv"); } } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>