Example #1
0
 private void Awake()
 {
     if ((instancia != this) && (instancia != null))
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instancia = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Example #2
0
 private void Start()
 {
     mov    = GetComponent <MovimentacaoTopDown>();
     source = GetComponent <AudioSource>();
 }