Esempio n. 1
0
    // Use this for initialization
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        if (PlayerPrefs.HasKey("lives"))
        {
            lives = PlayerPrefs.GetInt("lives");
        }
        Object.DontDestroyOnLoad(gameObject);
        //Debug.Log (lives);
    }
Esempio n. 2
0
 void Awake()
 {
     control = this;
 }