Throwing Knife Added

This commit is contained in:
CortexCore
2023-10-25 17:26:42 +08:00
parent 3e39e627bc
commit c5f638d9d2
31 changed files with 2432 additions and 310 deletions

View File

@@ -51,7 +51,7 @@ namespace BITFALL.Throws
{
isHolding = false;
base.Entry();
animator.Play(BITConstant.Player.Draw);
animator.Play(BITConstant.Player.Draw);
}
private void OnThrow(InputAction.CallbackContext obj)
@@ -82,6 +82,7 @@ namespace BITFALL.Throws
if (!_equipmentContainer.TryUseEquip<EquipmentAsThrow>()) return;
var instance = _assetableThrow.GetInstance();
if (!instance.TryGetComponent<Rigidbody>(out var _rigidbody)) return;
_rigidbody.rotation = throwPoint.rotation;
_rigidbody.position = throwPoint.position;
_rigidbody.AddForce(throwPoint.forward * throwForce, ForceMode.VelocityChange);
}