Ejemplo n.º 1
0
    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);
        }
    }
Ejemplo n.º 2
0
 private void ShotButton_HoldShootNotify(Vector3 direction) =>
 curWeapon.Shoot(direction != Vector3.zero ? direction : ShotDirection);
Ejemplo n.º 3
0
 public override void EntryAction()
 {
     weapon.Shoot();
     animController.SetTrigger("Shoot");
 }