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

Call function only ones for show ad with if field

$
0
0
Hi i like to show unity video ad when player health is 0. So when i add show ad function in it then many ads start showing becuase this is added in update function. But i like to set ad show only ones with if field. i already tired bool way but this is not working for me because i also need health if field in my ad show function. Down -- if (health <0) in this field i like to show ad only ones in update public void Death() { if (health <= 0) { gameOverCanvas.SetActive(true); myrb.gravityScale = 1; healthText.enabled = false; ScoreManager.Instance.scoreShowText.enabled = (false); Ads = false; } if (health <= 6) { mainSprite.color = Color.yellow; spriteOutside.color = Color.yellow; leftEye.sprite = mediumHealthEyeLeft; rightEye.sprite = mediumHealthEyeRight; mouth.sprite = mediumHealthMouth; } if (health <= 3) { mainSprite.color = Color.red; healthText.color = Color.red; spriteOutside.color = Color.red; leftEye.sprite = lowHealthEyeLeft; rightEye.sprite = lowHealthEyeRight; mouth.sprite = lowHealthMouth; } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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