void Start() { if (pthis != null) { Lib.DestroyObject(this); return; } pthis = this; Lib.DontDestroyOnLoad(this); banner = new UnityEngine.iOS.ADBannerView(UnityEngine.iOS.ADBannerView.Type.Banner, UnityEngine.iOS.ADBannerView.Layout.Bottom); UnityEngine.iOS.ADBannerView.onBannerWasClicked += OnBannerClicked; UnityEngine.iOS.ADBannerView.onBannerWasLoaded += OnBannerLoaded; fullscreenAd = new UnityEngine.iOS.ADInterstitialAd(); UnityEngine.iOS.ADInterstitialAd.onInterstitialWasLoaded += OnFullscreenLoaded; }
public void onPlayerDie() { SHARED s = SHARED.GetInstance(); if (s.data.score > s.data.hiscore) { s.data.hiscore = s.data.score; s.save(); bHiScore = true; } if (Lib.debug_invincible) { return; } //screen_game.GetInstance().onGameOver(); Lib.DestroyObject(Ball.GetInstance().gameObject); setState_gameOver(); updateDisplay(); SimpleAdScript.GetInstance().showInterstitialAd(); }