예제 #1
0
    private void Shoot()
    {
        shootTimeCount += Time.deltaTime;

        if (shootTimeCount >= weaponManager.GetCurrentGun().fireSpeed)
        {
            AudioPlayer.Instance.PlayOneShot(weaponManager.GetCurrentGun().attackAudio);
            playerBehaviour.CrossFade(PlayerBehaviour.AnimationState.SHOOT, crossdurationTime);
            //playerBehaviour.CurrentAnimator().CrossFadeInFixedTime(PlayerBehaviour.AnimationState.SHOOT, transitionDuration);
            //playerBehaviour.SetAnimation(PlayerBehaviour.AnimationState.SHOOT);
            BulletSpawner.Instance.Spawn(weaponManager.GetCurrentBulletBownTrans().position, weaponManager.GetCurrentBulletBownTrans().rotation, this.gameObject);

            shootTimeCount = 0f;
        }
    }