public void bowHit(GameObject enemy) { int damage; interaction interEnemy = enemy.GetComponent <interaction>(); damage = Random.Range(myStats.ranged_dmg_min, myStats.ranged_dmg_max); if (animator) { animator.SetTrigger("attack"); } interEnemy.applyDamage(damage); }
public void swordHit(GameObject enemy) { int damage; interaction interEnemy = enemy.GetComponent <interaction>(); //int sndfx; damage = Random.Range(myStats.melee_dmg_min, myStats.melee_dmg_max); //sndfx = Random.Range(0,8); //AudioSource.PlayClipAtPoint(meleeBattle[sndfx], transform.position); if (animator) { animator.SetTrigger("attack"); } interEnemy.applyDamage(damage); }