Exemplo n.º 1
0
    IEnumerator UpdatePlayerStateAfterCrossCheck()
    {
        yield return(new WaitForSeconds(0.5f));

        if (isPlayerEligibleForReward)
        {
            retryCanvas.gameObject.SetActive(false);
            retryCanvasVisible = false;
            playerActionsClass.isGamePaused = false;
            playerClass.gameObject.SetActive(true);
            playerClass.timeUntilPlayerShouldNotDie = timeUntilPlayerShouldNotDie;
            playerClass.playerState      = PlayerState.Hover;
            isPlayerDied                 = false;
            retryCanvasAnimationDisabled = false;
            timeForAdButtonAnimation     = initialTimeForAdButtonAnimation;
            slowmotionClass.customSlowmo(false, onPauseSlowmoFactor);
            isPlayerEligibleForReward = false;
            adMobClass.RequestRewardBasedVideo();
        }
    }
Exemplo n.º 2
0
 private void Start()
 {
     slowmotionClass                       = slowmotion.GetComponent <Slowmotion>();
     playerClass                           = player.GetComponent <Player>();
     playerActionsClass                    = player.GetComponent <PlayerActions>();
     coinsAcquiredOnScreenText             = coinsAcquired.GetComponent <TextMeshProUGUI>();
     coinsInScene                          = FindObjectsOfType <Coin>().Length;
     coinsAcquiredOnScreenText.text        = currentCoinsAcquired.ToString() + " / " + coinsInScene;
     playerStats                           = FindObjectOfType <PlayerStatistics>();
     taskHandler                           = FindObjectOfType <TaskHandler>();
     prevLowerBound                        = Camera.main.ViewportToWorldPoint(new Vector3(0, 0, 0)).y;
     playSpaceCollider                     = playSpace.GetComponent <PolygonCollider2D>();
     gameLinesClass                        = gameLines.GetComponent <GameLines>();
     levelCompletedText                    = levelCompletedTextGO.GetComponent <TextMeshProUGUI>();
     PersistentInformation.LevelIdentifier = gameObject.scene.name;
     pg = FindObjectOfType <ProceduralGeneration>();
     initialTimeForAdButtonAnimation = timeForAdButtonAnimation;
     adMobClass = FindObjectOfType <AdMob>();
     adMobClass.RequestRewardBasedVideo();
     adMobClass.RequestInterstitial();
 }
Exemplo n.º 3
0
 public void OnClickRequestAd()
 {
     adMob = FindObjectOfType <AdMob>();
     adMob.RequestRewardBasedVideo();
 }