S7-03 + S7-04 + S7-05

This commit is contained in:
2026-03-12 11:24:38 +08:00
parent 185ea43323
commit 3840f8e65a
21 changed files with 620 additions and 373 deletions
@@ -1,6 +1,7 @@
using GeometryTD.Definition;
using GeometryTD.Entity.EntityData;
using GeometryTD;
using GeometryTD.Entity;
using UnityEngine;
namespace Components
@@ -76,6 +77,9 @@ namespace Components
{
BaseDamage = _attackDamage,
AttackPropertyType = attackPropertyType,
SourceEntityId = ResolveSourceEntityId(),
ProjectileEntityId = bulletEntityId,
OriginPosition = spawnPoint.position,
TagRuntimes = CloneTagRuntimes(_tagRuntimes)
};
BulletData bulletData = new BulletData(
@@ -114,5 +118,11 @@ namespace Components
return cloned;
}
private int ResolveSourceEntityId()
{
TowerEntity towerEntity = GetComponentInParent<TowerEntity>();
return towerEntity != null ? towerEntity.Id : 0;
}
}
}