private void OnTriggerEnter(Collider other) { EnemyStates eStates = other.transform.GetComponentInParent <EnemyStates>(); if (eStates == null) { return; } eStates.DoDamage(states.currentAction); }
void OnTriggerEnter(Collider other) { EnemyStates eStates = other.transform.GetComponentInParent <EnemyStates>(); if (eStates == null) { return; } eStates.DoDamage(states.currentAction, states.inventoryManager.GetCurrentWeapon(states.currentAction.mirror)); }
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); } } }