船相关脚本呢
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user