船相关脚本呢

This commit is contained in:
2025-05-27 20:27:48 +08:00
parent 7ad9f351c7
commit 8dac46c92a
10 changed files with 60840 additions and 60783 deletions

View File

@@ -25,12 +25,6 @@ namespace NBF
new(0.6626424f, 0.1791001f, 0.8680198f, 0.8680198f), new(1, 1, 3.38758f, 3.38758f)
});
/// <summary>
/// 使用中
/// </summary>
public bool IsUse;
/// <summary>
/// 船站立位置
/// </summary>
@@ -40,22 +34,23 @@ namespace NBF
/// 浮力组件
/// </summary>
private FloatingObject _floatingObject;
private float _BuoyancyFactor = 1f;
private void Awake()
{
if (_floatingObject == null) _floatingObject = GetComponent<FloatingObject>();
}
private void FixedUpdate()
public void BoatInput(Vector2 moveInput)
{
if (!IsUse) return;
if (!_floatingObject.InWater) return;
var input = Vector3.zero;
Vector2 moveInput = InputManager.GetMovementInput();
input.x = moveInput.x; // 水平转向x轴
input.z = moveInput.y; // 前后移动y轴映射到z轴
var rb = _floatingObject.RigidBody;
// Thrust