private void AttackAI() { if (!TryGetDirection(out direction)) { return; } var ray = new Ray(this.transform.position, direction); bool hitted = Physics.Raycast(ray, out RaycastHit hit, AttackRange); if (hitted && (hit.collider.tag == "Player")) { curWeapon.Shoot(direction); } }
private void ShotButton_HoldShootNotify(Vector3 direction) => curWeapon.Shoot(direction != Vector3.zero ? direction : ShotDirection);
public override void EntryAction() { weapon.Shoot(); animController.SetTrigger("Shoot"); }