Ejemplo n.º 1
0
    void Awake()
    {
        InitializeSavedVariables();             //Initialize variables that needs to be saved when APP is closed
        LoadSavedVariables();                   //Load the variables from Playerprefs

        DontDestroyOnLoad(transform.gameObject);
        if (Instance == null)
        {
            Instance = this;
        }
        else if (Instance != this)
        {
            Destroy(gameObject);
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Target time to beat in seconds.
    /// </summary>


    void Awake()
    {
        DontDestroyOnLoad(transform.gameObject);
        if (Instance == null)
        {
            Instance = this;
        }
        else if (Instance != this)
        {
            Destroy(gameObject);
        }

        //	SceneManager.sceneLoaded += SceneLoadListener;
        //	SetUpLoadingScreen();           //Establish the loading screen and attach it to the canvas while fixing strange value artifacts
        //	InitializeSavedVariables();     //Initialize variables that needs to be saved when APP is closed
        //	LoadSavedVariables();           //Load the variables from Playerprefs
    }