// Start is called before the first frame update void Start() { vidaEnemigo = GetComponentInParent <CEnemigo>(); StartCoroutine("asignarBarra"); }
// Start is called before the first frame update void Start() { dañoEnemigo = GetComponentInParent<CEnemigo>(); Debug.Log(dañoEnemigo.name); }
public string etiqueta; // lo vuelve accesible // Start is called before the first frame update void Start() { dañoEnemigo = GetComponentInParent <CEnemigo>(); //Encuentra un componente del tipo "CEnemigo" que esté vinculado al objeto o encapsulado a un elemento específico Debug.Log(dañoEnemigo.name); }
// Start is called before the first frame update void Start() { vidaEnemigo = GetComponentInParent <CEnemigo>(); //"vidaEnemigo" obtine componente de "CEnemigo" StartCoroutine("asignarvida"); //Ejecuta la corrutina "asignarvida" }