void OnTriggerStay2D(Collider2D other) { if (other.gameObject.name.Equals("AreaGoblin") && atacando && viviendo) { ControlEnemigo ctrE = other.gameObject.GetComponentInParent <ControlEnemigo>(); if (ctrE != null) { ctrE.RecibirAtaque(); } estaCol = true; Debug.Log("Daño de arma Stay"); } }
// Use this for initialization void Start() { ctr = GameObject.Find("enemigo").GetComponent <ControlEnemigo> (); }
// Use this for initialization void Start() { ctr = GameObject.Find("goblin archer").GetComponent <ControlEnemigo> ();; }