重构
This commit is contained in:
@@ -21,6 +21,10 @@ namespace IndianOceanAssets.Engine2_5D
|
||||
private float lastRollTime; // Timestamp of last roll
|
||||
private bool isRolling; // Is player currently rolling?
|
||||
|
||||
/// <summary>冲刺冷却剩余/总时长(供 HUD 显示,替代反射读取私有字段)。</summary>
|
||||
public (float remaining, float total) RollCooldown
|
||||
=> (Mathf.Max(0f, (lastRollTime + rollCooldown) - Time.time), rollCooldown);
|
||||
|
||||
[SerializeField] private KeyCode rollKeyCode; // Key to trigger roll
|
||||
|
||||
// Enum to switch between sword or projectile attack types
|
||||
|
||||
Reference in New Issue
Block a user