添加“奖励 3 选 1”UI
- RewardSelectForm:其中包括 3 个可选的 RewardItem ,刷新和放弃按钮 - 应用战斗节点基地生命产生的额外事件
This commit is contained in:
@@ -93,7 +93,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Tower] {tower.Name} ({tower.Rarity})",
|
||||
InstanceId = tower.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.None
|
||||
ComponentSlotType = TowerCompSlotType.None,
|
||||
IconAreaContext = BuildIconAreaContext(tower.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -106,7 +107,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Muzzle] {item.Name} ({item.Rarity})",
|
||||
InstanceId = item.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.Muzzle
|
||||
ComponentSlotType = TowerCompSlotType.Muzzle,
|
||||
IconAreaContext = BuildIconAreaContext(item.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -119,7 +121,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Bearing] {item.Name} ({item.Rarity})",
|
||||
InstanceId = item.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.Bearing
|
||||
ComponentSlotType = TowerCompSlotType.Bearing,
|
||||
IconAreaContext = BuildIconAreaContext(item.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -132,7 +135,8 @@ namespace GeometryTD.UI
|
||||
{
|
||||
Title = $"[Base] {item.Name} ({item.Rarity})",
|
||||
InstanceId = item.InstanceId,
|
||||
ComponentSlotType = TowerCompSlotType.Base
|
||||
ComponentSlotType = TowerCompSlotType.Base,
|
||||
IconAreaContext = BuildIconAreaContext(item.Rarity)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -158,6 +162,15 @@ namespace GeometryTD.UI
|
||||
_itemContextMap[itemContext.InstanceId] = itemContext;
|
||||
}
|
||||
|
||||
private static IconAreaContext BuildIconAreaContext(RarityType rarity)
|
||||
{
|
||||
return new IconAreaContext
|
||||
{
|
||||
Rarity = rarity,
|
||||
Icon = null
|
||||
};
|
||||
}
|
||||
|
||||
private void OnRepoItemSelected(object sender, GameEventArgs e)
|
||||
{
|
||||
if (!(e is RepoItemSelectedEventArgs args))
|
||||
|
||||
Reference in New Issue
Block a user