Example #1
0
 private void Start()
 {
     borderLines                  = FindObjectOfType <GameLines>().GetComponent <GameLines>();
     playerActionsClass           = playerPrefab.GetComponent <PlayerActions>();
     currentActiveBackgroundIndex = 0;
     proceduralGeneration         = FindObjectOfType <ProceduralGeneration>();
     playerStats                  = FindObjectOfType <PlayerStatistics>();
     if (proceduralGeneration == null)
     {
         SetActiveBackgroundIndex();
         FrameBordersPlayerAreaAndLevelProgress();
     }
 }
Example #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();
 }