Exemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 2
0
 private void Awake()
 {
     name  = PlayerPrefs.GetString("PlayerName");
     alert = GameObject.FindGameObjectWithTag("Alert").GetComponent <DialogueAlert>();
 }