コード例 #1
0
 public void Attack()
 {
     if (movement.CanAttack())
     {
         equippedWeapon.OnAttack(movement.GetFacingDirection(), transform.position, "Player");
         if (equippedWeapon.GetReloadTime() * HP.GetHPPercentage() <= 0.2f)
         {
             StartCoroutine(movement.WaitUntilCanAttack(0.2f));
         }
         else
         {
             StartCoroutine(movement.WaitUntilCanAttack(equippedWeapon.GetReloadTime() * HP.GetHPPercentage()));
         }
     }
 }