补全防御塔组装与介绍描述功能
- RepoForm.CombineArea:防御塔组装,直接继承所有组件的属性 - ItemDescUtility:根据属性构建不同的 ItemDescForm 的文本
This commit is contained in:
@@ -32,6 +32,6 @@ namespace GeometryTD.Definition
|
||||
/// <summary>
|
||||
/// 背包中的防御塔实例。
|
||||
/// </summary>
|
||||
public List<DefenseTowerItemData> Towers { get; set; } = new List<DefenseTowerItemData>();
|
||||
public List<TowerItemData> Towers { get; set; } = new List<TowerItemData>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,49 +5,20 @@ namespace GeometryTD.Definition
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct ImpactData
|
||||
{
|
||||
private readonly CampType m_Camp;
|
||||
private readonly int m_HP;
|
||||
private readonly int m_Attack;
|
||||
private readonly int m_Defense;
|
||||
|
||||
public ImpactData(CampType camp, int hp, int attack, int defense)
|
||||
{
|
||||
m_Camp = camp;
|
||||
m_HP = hp;
|
||||
m_Attack = attack;
|
||||
m_Defense = defense;
|
||||
Camp = camp;
|
||||
HP = hp;
|
||||
Attack = attack;
|
||||
Defense = defense;
|
||||
}
|
||||
|
||||
public CampType Camp
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Camp;
|
||||
}
|
||||
}
|
||||
public CampType Camp { get; }
|
||||
|
||||
public int HP
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_HP;
|
||||
}
|
||||
}
|
||||
public int HP { get; }
|
||||
|
||||
public int Attack
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Attack;
|
||||
}
|
||||
}
|
||||
public int Attack { get; }
|
||||
|
||||
public int Defense
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Defense;
|
||||
}
|
||||
}
|
||||
public int Defense { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ namespace GeometryTD.Definition
|
||||
/// 组件当前耐久(0~100)。
|
||||
/// </summary>
|
||||
public float Endurance { get; set; } = 100f;
|
||||
public bool IsAssembledIntoTower { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 组件约束(先沿用 DataTable 原定义)。
|
||||
@@ -94,4 +95,4 @@ namespace GeometryTD.Definition
|
||||
SlotType = TowerCompSlotType.Accessory;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-10
@@ -7,10 +7,10 @@ namespace GeometryTD.Definition
|
||||
/// 注意:这里是塔实例的独立值,不通过组件引用实时计算。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public sealed class DefenseTowerStatsData
|
||||
public sealed class TowerStatsData
|
||||
{
|
||||
public int[] AttackDamage { get; set; }
|
||||
public float[] DamageRandomRate { get; set; }
|
||||
public float DamageRandomRate { get; set; }
|
||||
public float[] RotateSpeed { get; set; }
|
||||
public float[] AttackRange { get; set; }
|
||||
public float[] AttackSpeed { get; set; }
|
||||
@@ -23,7 +23,7 @@ namespace GeometryTD.Definition
|
||||
/// 背包内防御塔实例数据。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public sealed class DefenseTowerItemData
|
||||
public sealed class TowerItemData
|
||||
{
|
||||
/// <summary>
|
||||
/// 防御塔实例唯一 Id。
|
||||
@@ -39,12 +39,7 @@ namespace GeometryTD.Definition
|
||||
/// 防御塔品质。
|
||||
/// </summary>
|
||||
public RarityType Rarity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前耐久(0~100)。
|
||||
/// </summary>
|
||||
public float Endurance { get; set; } = 100f;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 构成该防御塔的枪口组件实例 Id。
|
||||
/// </summary>
|
||||
@@ -63,6 +58,6 @@ namespace GeometryTD.Definition
|
||||
/// <summary>
|
||||
/// 防御塔独立属性,不依赖组件对象引用。
|
||||
/// </summary>
|
||||
public DefenseTowerStatsData Stats { get; set; } = new DefenseTowerStatsData();
|
||||
public TowerStatsData Stats { get; set; } = new TowerStatsData();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user