This commit is contained in:
2026-07-04 19:56:30 +08:00
parent 63ef1f9e19
commit f1720ab889
113 changed files with 12662 additions and 2027 deletions
@@ -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>