S7-03 + S7-04 + S7-05
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user