Exemple #1
0
 public void OnTarget(attributes atb)
 {
     if (!atb.CompareTag(tag))
     {
         stateNow  = statesIa.chase;
         atbTarget = atb;
     }
 }
Exemple #2
0
    protected virtual void OnTriggerEnter2D(Collider2D collision)
    {
        attributes atb = collision.GetComponentInParent <attributes>();

        if (atb && !atb.CompareTag(ownerAtb.tag))
        {
            DamgeAplication(atb, 1f, Vector2.zero);
        }

        //Som de acerto do progetil
        AudioSource ad = repository.GetAudioSource();

        ad.PlayOneShot(weaponInfs.clipHit);
        gameObject.SetActive(false);
    }