1
This commit is contained in:
@@ -150,7 +150,7 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
[Header("攻击参数")]
|
||||
public float attackTime = 0.5f;
|
||||
[Header("人机参数")]
|
||||
public float botRotateSpeed = 360f; // 人机炮台旋转速度(度/秒)
|
||||
public float botRotateSpeed = 40f; // 人机炮台旋转速度(度/秒),和自动扫射速度一致
|
||||
public float botTargetHoldTime = 2.5f; // 人机锁定目标保持时间(秒)
|
||||
float clickTime = 0;
|
||||
private Dictionary<int, float> botFireTimer = new Dictionary<int, float>();
|
||||
@@ -2009,7 +2009,11 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
|
||||
|
||||
if (sit.IsFlipped) angle = (angle + 180f) % 360f;
|
||||
|
||||
sit.SetRotation(angle);
|
||||
// 平滑旋转:像真人一样缓慢转动,避免瞬间闪现
|
||||
float current = sit.currentAngle;
|
||||
float maxDelta = botRotateSpeed * Time.deltaTime;
|
||||
float smoothed = Mathf.MoveTowardsAngle(current, angle, maxDelta);
|
||||
sit.SetRotation(smoothed);
|
||||
}
|
||||
|
||||
/// <summary>人机开火同步(房主代发)</summary>
|
||||
|
||||
Reference in New Issue
Block a user