// Use this for initialization
 private void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;//Avoid doing anything else
     }
     instance = this;
     DontDestroyOnLoad(gameObject);
     PlayerPrefs.DeleteAll();
 }
Example #2
0
 private void Start()
 {
     StageCounter1        = StageCounter2 = StageCounter3 = 0;
     removePlayerPreprefs = gameObject.GetComponent <RemovePlayerPreprefs>();
 }