Esempio n. 1
0
        private void OnTriggerEnter(Collider other)
        {
            EnemyStates eStates = other.transform.GetComponentInParent <EnemyStates>();

            if (eStates == null)
            {
                return;
            }

            eStates.DoDamage(states.currentAction);
        }
Esempio n. 2
0
    void OnTriggerEnter(Collider other)
    {
        EnemyStates eStates = other.transform.GetComponentInParent <EnemyStates>();

        if (eStates == null)
        {
            return;
        }

        eStates.DoDamage(states.currentAction, states.inventoryManager.GetCurrentWeapon(states.currentAction.mirror));
    }
Esempio n. 3
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Enemigo")
        {
            EnemyStates eStates = other.transform.GetComponentInParent <EnemyStates>();

            if (eStates == null)
            {
                return;
            }


            float r = Random.Range(0f, 1f);
            if (tipoAtaque == "ad")
            {
                eStates.DoDamage(10, r);
            }
            else
            {
                eStates.DoDamage(20, r);
            }
        }
    }