添加“奖励 3 选 1”UI
- RewardSelectForm:其中包括 3 个可选的 RewardItem ,刷新和放弃按钮 - 应用战斗节点基地生命产生的额外事件
This commit is contained in:
@@ -111,7 +111,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Tower] {tower.Name} ({tower.Rarity})",
|
||||
InstanceId = tower.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.None
|
||||
ComponentSlotType = TowerCompSlotType.None,
|
||||
IconAreaContext = BuildIconAreaContext(tower.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -130,7 +131,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Muzzle] {item.Name} ({item.Rarity})",
|
||||
InstanceId = item.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.Muzzle
|
||||
ComponentSlotType = TowerCompSlotType.Muzzle,
|
||||
IconAreaContext = BuildIconAreaContext(item.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -149,7 +151,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Bearing] {item.Name} ({item.Rarity})",
|
||||
InstanceId = item.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.Bearing
|
||||
ComponentSlotType = TowerCompSlotType.Bearing,
|
||||
IconAreaContext = BuildIconAreaContext(item.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -168,7 +171,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Base] {item.Name} ({item.Rarity})",
|
||||
InstanceId = item.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.Base
|
||||
ComponentSlotType = TowerCompSlotType.Base,
|
||||
IconAreaContext = BuildIconAreaContext(item.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -176,6 +180,15 @@ namespace GeometryTD.UI
|
||||
return itemContexts.ToArray();
|
||||
}
|
||||
|
||||
private static IconAreaContext BuildIconAreaContext(RarityType rarity)
|
||||
{
|
||||
return new IconAreaContext
|
||||
{
|
||||
Rarity = rarity,
|
||||
Icon = null
|
||||
};
|
||||
}
|
||||
|
||||
private void OnCombatFinishReturnButtonClicked(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(sender is CombatFinishForm) || !(e is CombatFinishReturnEventArgs))
|
||||
|
||||
Reference in New Issue
Block a user