修复
This commit is contained in:
@@ -33,9 +33,10 @@ namespace Continentis.MainGame.Card
|
||||
/// </summary>
|
||||
/// <param name="commandGroup">目标指令组</param>
|
||||
/// <param name="title">选择卡牌的描述性标题</param>
|
||||
/// <param name="includeTeam">是否包含队伍内的卡牌,如果不包含,则强制切换到角色手牌,且禁用切换按钮</param>
|
||||
/// <param name="maxSelection">最大选择数量</param>
|
||||
/// <param name="forceMax">是否强制选择最大数量</param>
|
||||
public void AddSelectionCommands(ref CommandGroup commandGroup, string title, int maxSelection, bool forceMax = false)
|
||||
public void AddSelectionCommands(ref CommandGroup commandGroup, string title, int maxSelection, bool forceMax = false, bool includeTeam = false)
|
||||
{
|
||||
selectedCards = new List<CardInstance>();
|
||||
HandCardSelectionInterface handCardSelector = CombatUIManager.Instance.combatMainPage.handCardSelector;
|
||||
@@ -43,12 +44,21 @@ namespace Continentis.MainGame.Card
|
||||
commandGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
handCardSelector.Setup(title, mainLogic.card, maxSelection, selectCondition, forceMax);
|
||||
if (!includeTeam)
|
||||
{
|
||||
CombatUIManager.Instance.combatMainPage.teamSwitchButton.SwitchToCurrentCharacter();
|
||||
CombatUIManager.Instance.combatMainPage.teamSwitchButton.button.interactable = false;
|
||||
}
|
||||
}));
|
||||
commandGroup.AddCommand(new Cmd_WaitForUI(handCardSelector));
|
||||
commandGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
selectedCards = handCardSelector.selectedCards.ToList();
|
||||
selectedCards.ForEach(selectEffect);
|
||||
if (!includeTeam)
|
||||
{
|
||||
CombatUIManager.Instance.combatMainPage.teamSwitchButton.button.interactable = true;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user