예제 #1
0
 private void WeaponFireChecks()
 {
     if (Input.GetButtonDown("Fire1"))
     {
         if (UpperBodyMode == UpperBodyModes.Melee && !ub_animator.GetBool("ActionInProgress"))
         {
             ub_animator.SetTrigger("melee_attack");
         }
         else if (UpperBodyMode == UpperBodyModes.Rifle)
         {
             bulletSpawner.StartRepeatingFire();
         }
         else
         {
             bulletSpawner.Shoot(UpperBodyMode);
         }
     }
     if (Input.GetButtonUp("Fire1"))
     {
         bulletSpawner.EndRepeatingFire();
     }
 }