```
feat(gameplay): 添加建筑系统和改进摄像机控制 - 移除人类士兵数据资产文件,重构为建筑放置系统 - 在CharacterData中添加productionInterval和buildingCost字段用于建筑生产 - 实现CameraFollow脚本的完整重写,支持键盘WASD拖动、鼠标拖动、触摸拖动 - 添加摄像机缩放功能,支持上下键和触摸双指缩放 - 更新Projecttile.cs以同时处理单位和建筑目标的伤害检测 - 修改SummonCardButton从法力值召唤改为金币建筑放置模式 - 在UnitBase.cs中更新攻击逻辑以支持对建筑造成伤害 - 升级WorldHealthBar以显示建筑生产进度和更好的缩放补偿 - 修复MainCharacterDebugMovement移除键盘移动输入冲突 - 更新包管理器中的codely.bridge版本从1.0.80到1.0.81 ```
This commit is contained in:
1 parent
fb56cd7ede
commit
769aea30f3
55 files changed
+9328
-90
No files matched your search
@@ -115,13 +115,21 @@ public class Projectile : MonoBehaviour
|
||||
}
|
||||
|
||||
UnitBase targetUnit = hitObject.GetComponentInParent<UnitBase>();
|
||||
if (targetUnit == null)
|
||||
BuildingHealth targetBuilding = hitObject.GetComponentInParent<BuildingHealth>();
|
||||
if (targetUnit == null && targetBuilding == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
hasHit = true;
|
||||
targetUnit.ReceiveDamage(damage, owner);
|
||||
if (targetUnit != null)
|
||||
{
|
||||
targetUnit.ReceiveDamage(damage, owner);
|
||||
}
|
||||
else
|
||||
{
|
||||
targetBuilding.ReceiveDamage(damage, owner);
|
||||
}
|
||||
if (registerEnergyOnHit && owner != null)
|
||||
{
|
||||
UnitBase unit = owner.GetComponent<UnitBase>();
|
||||
|
||||
Reference in new issue
Block a user