示例#1
0
    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");
        }
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     ctr = GameObject.Find("enemigo").GetComponent <ControlEnemigo> ();
 }
示例#3
0
 // Use this for initialization
 void Start()
 {
     ctr = GameObject.Find("goblin archer").GetComponent <ControlEnemigo> ();;
 }