增加技能按钮说明

This commit is contained in:
2026-07-06 11:57:27 +08:00
parent 50d42f8f9e
commit a2f750c234
2 changed files with 43 additions and 7 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ namespace IndianOceanAssets.Engine2_5D
[Header("冷却")]
[Tooltip("放置灵灯的冷却时间(秒)")]
[SerializeField] private float cooldown = 5f;
[SerializeField] private float cooldown = 3.5f;
[Header("灵灯预制体")]
[SerializeField] private GameObject lanternPrefab;
@@ -49,8 +49,8 @@ namespace IndianOceanAssets.Engine2_5D
private void Update()
{
// 按 U 且 CD 就绪 且 还有灵灯 → 放置
if (Input.GetKeyDown(lanternKey)
// 按 U 或鼠标左键 且 CD 就绪 且 还有灵灯 → 放置
if ((Input.GetKeyDown(lanternKey) || Input.GetMouseButtonDown(0))
&& _remainingLanterns > 0
&& Time.time > _lastPlaceTime + cooldown
&& lanternPrefab != null)