根据提供的code differences信息,由于没有具体的代码变更内容,我将生成一个通用的commit message模板:

```
docs(changelog): 更新项目变更日志

- 添加新的版本记录
- 修正已知问题描述
- 更新功能特性说明
```

注意:由于您提供的code differences部分为空,以上是一个示例模板。实际使用时请根据具体的代码变更内容来填写相应的type、scope、subject和body信息。
This commit is contained in:
huadexuan committed 2026-09-17 14:03:34 +08:00
1 parent 69f33d8637
commit 951ba49c79
26 files changed
+942 -455

No files matched your search

+11 -2
View File
@@ -116,20 +116,29 @@ public class Projectile : MonoBehaviour
UnitBase targetUnit = hitObject.GetComponentInParent<UnitBase>();
BuildingHealth targetBuilding = hitObject.GetComponentInParent<BuildingHealth>();
if (targetUnit == null && targetBuilding == null)
WorldHealthBar targetHealthBar = hitObject.GetComponentInParent<WorldHealthBar>();
if (targetUnit == null && targetBuilding == null && targetHealthBar == null)
{
return;
}
hasHit = true;
if (targetUnit != null)
{
targetUnit.ReceiveDamage(damage, owner);
}
else
else if (targetBuilding != null)
{
targetBuilding.ReceiveDamage(damage, owner);
}
else if (targetHealthBar != null)
{
// 召唤师等特殊单位(有 WorldHealthBar 但没有 UnitBase)
targetHealthBar.TakeDamage(damage, owner);
}
if (registerEnergyOnHit && owner != null)
{
UnitBase unit = owner.GetComponent<UnitBase>();