예제 #1
0
 private void HandleShooting()
 {
     if (Input.GetButton("Fire1"))
     {
         shootController.Shoot();
     }
 }
예제 #2
0
    public void shoot(GameObject bullet, string animation)
    {
        //if (!_anim.GetCurrentAnimatorStateInfo(0).IsName("PlayerIdle")) return;

        shootController.Shoot(bullet, animation);
        ammo--;
        uiManager.BulletsControl(ammo);
        SFXManager.SharedInstance.PlaySFX(SFXType.SoundType.FIRE);
    }
예제 #3
0
    public void OnAttackFired(string state)
    {
        //Debug.Log("Attack Fired: " + Time.time + "  - > " + state );

        if (state == "Trigger")
        {
            isAttacking = true;
            Transform shootpoint = GetNextAttackShootPoint();
            if (nextObrBullet != null)
            {
                //Debug.Log("Shoot Orb  !!!");
                shootController.ShootOrb(nextObrBullet, gameObject, shootpoint, target);

                // reset orb
                playerController.nextOrbSkill = null;
                nextObrBullet = null;
            }
            else
            {
                //Debug.Log("Shoot Bullet  !!!");
                shootController.Shoot(gameObject, shootpoint, target);
            }


            // gizmos
            gizmosShootPoint   = shootpoint.position;
            gizmosReceivePoint = target.position;
        }
        else
        { // End
            AddCount();

            if (!CanAttack()) // && !player.isChanneling
            {
                FightStance();
            }
        }
    }