示例#1
0
    private void StartGame()
    {
        // showing interstitial
        if (lastAddsTime + gameSettings.interstitialShowingDelay < Time.realtimeSinceStartup)
        {
            AdsManager.ShowInterstitial(interstitialType);

            lastAddsTime = Time.realtimeSinceStartup;
        }

        reviveUsed           = false;
        firstStageCompleted  = false;
        currentItemsAbsorbed = 0;
        currentLevel         = GameSettingsPrefs.Get <int>("current level");

        levelState = LevelState.First;
        LevelController.instance.LoadLevel(currentLevel);
        UIController.instance.InitLevel(currentLevel);
        CameraController.instance.InitCameraOnFirstStage();
        ColorsController.SetRandomPreset();

        GroundGenerator.InitPlayground();

        waitingForTap = true;

        // ads
        bannerType        = AdsManager.GetBannerType();
        interstitialType  = AdsManager.GetInterstitialType();
        rewardedVideoType = AdsManager.GetRewardedVideoType();

        AdsManager.RequestInterstitial(interstitialType);
        AdsManager.RequestRewardBasedVideo(rewardedVideoType);

        AdsManager.ShowBanner(bannerType);
    }