Esempio n. 1
0
    void Awake()
    {
        if (Instance == null)
        {
            DontDestroyOnLoad(gameObject);
            Instance = this;
        }
        else if (Instance != this)
        {
            Destroy(gameObject);
        }

        if (SceneManager.GetActiveScene().name == "Result")
        {
            NumberOfStepsText.text = Instance.AmountOfStepsTaken.ToString();
        }
        else if (SceneManager.GetActiveScene().name == "Main")
        {
            Instance = null;
        }
    }
 // Use this for initialization
 void Awake()
 {
     numWiz = GameObject.Find("NumberWizard").GetComponent <NumberWizard>();
 }
Esempio n. 3
0
 void Start()
 {
     guessCount.text = NumberWizard.GetGuessCount();
 }
    // Start is called before the first frame update
    void Start()
    {
        int guessNum = NumberWizard.GetGuessCounter();

        guessTextCounter.text = guessNum.ToString();
    }