补充参战防御塔进入战斗逻辑
- 将 Inventory 中参战的防御塔数据传递到 CombatSelectForm 中 - 为防御塔的图标展示添加 TowerRepoItem 与 TowerIconArea 适配防御塔的三层 Image
This commit is contained in:
@@ -9,15 +9,22 @@ namespace GeometryTD.Entity.EntityData
|
||||
{
|
||||
[SerializeField] private TowerStatsData _stats = new TowerStatsData();
|
||||
[SerializeField] private int _towerLevel = 0;
|
||||
[SerializeField] private Color _muzzleColor = Color.white;
|
||||
[SerializeField] private Color _bearingColor = Color.white;
|
||||
[SerializeField] private Color _baseColor = Color.white;
|
||||
|
||||
public TowerData(int entityId, int typeId, Vector3 position, Quaternion rotation,
|
||||
TowerStatsData stats, int towerLevel = 0)
|
||||
TowerStatsData stats, int towerLevel = 0, Color? muzzleColor = null, Color? bearingColor = null,
|
||||
Color? baseColor = null)
|
||||
: base(entityId, typeId)
|
||||
{
|
||||
Position = position;
|
||||
Rotation = rotation;
|
||||
_stats = stats ?? new TowerStatsData();
|
||||
_towerLevel = Mathf.Max(0, towerLevel);
|
||||
_muzzleColor = muzzleColor ?? Color.white;
|
||||
_bearingColor = bearingColor ?? Color.white;
|
||||
_baseColor = baseColor ?? Color.white;
|
||||
}
|
||||
|
||||
public TowerStatsData Stats
|
||||
@@ -31,5 +38,23 @@ namespace GeometryTD.Entity.EntityData
|
||||
get => _towerLevel;
|
||||
set => _towerLevel = Mathf.Max(0, value);
|
||||
}
|
||||
|
||||
public Color MuzzleColor
|
||||
{
|
||||
get => _muzzleColor;
|
||||
set => _muzzleColor = value;
|
||||
}
|
||||
|
||||
public Color BearingColor
|
||||
{
|
||||
get => _bearingColor;
|
||||
set => _bearingColor = value;
|
||||
}
|
||||
|
||||
public Color BaseColor
|
||||
{
|
||||
get => _baseColor;
|
||||
set => _baseColor = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user