public void Fire() { if (CanFire()) { GetComponent<Animator>().SetTrigger("Fire"); if (IsMelee) { MeleeAttack(); } else { RangedAttack(); } } }