If you want to remove ad at the start do not call GameOver
method in RequestInterstitial
method instead call it in GameoverPanel
method. if you wish to load the ad again to show next time the game overs you may want to load it again for example it should be like this:
public void GameoverPanel()
{
if (Time.timeScale == 1f)
{
gameoverPanel.SetActive(true);
GameOver();
RequestInterstitial();
}
Time.timeScale = 0f;
}
Secondly set Adscript to the public then drag and drop it in the inspector(if ads and GameOverPanel method script are in a different class).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…