// Update is called once per frame
    void Update()
    {
        UpdateScrolling();

        frameCount++;
        if (frameCount > 30)
        {
            // update these periodically and not every frame
            hasInterstitial  = Chartboost.hasInterstitial(CBLocation.Default);
            hasMoreApps      = Chartboost.hasMoreApps(CBLocation.Default);
            hasRewardedVideo = Chartboost.hasRewardedVideo(CBLocation.Default);
            hasInPlay        = Chartboost.hasInPlay(CBLocation.Default);

            frameCount = 0;
        }

        //every 2 games shows an interstitial ad and resets the games played counter
        if (Game_Over_Controller.gameOverCount == 12 && Application.loadedLevel == 3)
        {
            ChartboostExample.ShowAd();
            Debug.Log("hey look at that ad");
            Game_Over_Controller.gameOverCount = 0;
        }
        //I don't remember why I made the counter start at 10, but I did
        if (Game_Over_Controller.gameOverCount == 0 && Application.loadedLevel == 2)
        {
            Debug.Log("Requesting new ad");
            ChartboostExample.CacheAd();
            //reset counter to 10
            Game_Over_Controller.gameOverCount = 10;
        }

        if (Application.loadedLevel == 3 && bannerShown == false)
        {
            Debug.Log("Banner should show");
            bannerShown  = true;
            bannerHidden = false;
        }
        if (Application.loadedLevel == 2 && bannerHidden == false)
        {
            Debug.Log("Banner should hide");
            bannerShown  = false;
            bannerHidden = true;
        }
    }