Esempio n. 1
0
    //Singleton
    private void Awake()
    {
        int numGameSessions = FindObjectsOfType <GameSession>().Length;

        if (numGameSessions > 1)
        {
            Destroy(gameObject);
        }
        else
        {
            DontDestroyOnLoad(gameObject);
        }

        levelNumber = PlayerPrefsController.GetLevelProgress();
    }