feat(gameplay): 更新核心场景中的卡牌和能量豆配置

- 将能量豆5重命名为能量豆6,能量豆4重命名为能量豆7等,调整了所有
  能量豆的命名顺序
- 将卡牌5重命名为卡牌1,并添加了新的组件包括召唤槽脚本和按钮交互
  组件
- 为卡牌添加子对象Image用于显示卡牌内容
- 调整了卡牌和能量豆的层级结构和父子关系
- 实现了通过数字键1和2进行召唤的功能,支持指定召唤槽位
- 添加了UI元素的射线检测控制,部分元素设置为不响应射线点击

fix(input): 防止在UI元素上移动角色

- 在移动输入检查中增加了对EventSystem的判断,当鼠标指针位于
  UI元素上方时禁止角色移动
- 避免了玩家在操作UI时意外移动角色的问题
```
This commit is contained in:
huadexuan committed 2026-09-08 23:53:24 +08:00
1 parent d4e8da8ab3
commit 2dfffd57fe
5 files changed
+266 -56

No files matched your search

+33 -16
View File
@@ -119,30 +119,47 @@ public class MainCharacterCombat : MonoBehaviour
private void HandleSummonInput()
{
if (summoning || animator == null || movement == null)
{
return;
}
if (Input.GetKeyDown(KeyCode.Alpha1) || Input.GetKeyDown(KeyCode.Alpha2))
{
movement.StopMovement();
if (attacking)
{
FinishAttack();
}
}
if (Input.GetKeyDown(KeyCode.Alpha1))
{
BeginSummon(humanSoldierPrefab);
RequestSummon(1);
}
else if (Input.GetKeyDown(KeyCode.Alpha2))
{
BeginSummon(archerPrefab);
RequestSummon(2);
}
}
public bool RequestSummon(int slot)
{
if (summoning || animator == null)
{
return false;
}
GameObject prefab = slot == 1
? humanSoldierPrefab
: slot == 2
? archerPrefab
: null;
if (prefab == null)
{
return false;
}
if (movement != null)
{
movement.StopMovement();
}
if (attacking)
{
FinishAttack();
}
BeginSummon(prefab);
return true;
}
private void BeginSummon(GameObject prefab)
{
if (prefab == null)