void Awake() { //usarRefereciaDoPlayer_ref = GetComponent<UsarRefereciaDoPlayer>(); spawnarArmadilhas_ref = GetComponent <SpawnarArmadilhas>(); spawnarMunicao_ref = GetComponent <SpawnarMunicao>(); if (singleton != null && singleton != this) { GameObject.Destroy(this); } else { singleton = this; } }
private void Awake() { spawnarMunicao_ref = GameObject.Find("Game").GetComponent <SpawnarMunicao>(); referenciaDoPlayerAoInstanciar_ref = GameObject.Find("Game").GetComponent <Game>(); }
private void Awake() { spawnarMunicao_ref = GetComponent <SpawnarMunicao>(); vida_ref = GameObject.Find("Tanque").GetComponent <Vida>(); }