예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     if (PlayerPrefsX.GetBool("hasCompletedTutorial") == false)
     {
         _roundManager           = FindObjectOfType <RoundManager>(); //this needs to be reactivated after tutorial is over
         _movement               = FindObjectOfType <Movement>();
         _coinSpawning           = FindObjectOfType <CoinSpawning>();
         _coinSpawning._canSpawn = false;  //this needs to be reactivated after tutorial is over
         _runTutorial            = true;
         HoldAnim.SetActive(true);
     }
     else
     {
         _runTutorial = false;
         panel.SetActive(false);
         //Destroy(this);
     }
 }
예제 #2
0
 // Start is called before the first frame update
 private void Start()
 {
     transitionTime = delay + PortalAnimDuration;
     topRange       = findingDimensions.GetWorldPosition(0, new Vector2(Screen.width, Screen.height));
     bottomRange    = findingDimensions.GetWorldPosition(0, new Vector2(0, 0));
     coinSpawning   = FindObjectOfType <CoinSpawning>();
     counters       = FindObjectsOfType <RoundCounter>();
     foreach (RoundCounter count in counters)
     {
         count.GetComponent <TextMeshProUGUI>().text = (_nextRound + 1).ToString();
     }
     _roundCounter = GameObject.FindGameObjectWithTag("Round").GetComponent <TextMeshProUGUI>();
     if (PlayerPrefsX.GetBool("hasCompletedTutorial") == false)
     {
         UpdateStates(RoundStates.RoundTutorial);
     }
     else
     {
         UpdateStates(RoundStates.RoundStart);
     }
 }