Commit 9433adf5 authored by 赤子奈落's avatar 赤子奈落

fix shortcuts function bug and card selection bug

1.关闭决斗时,UI界面(如设置界面)鼠标右键关闭功能,防止与右键取消选择与连锁等功能冲突;
2.修复选择场上或者手卡中的卡并完成选择后,卡片选择框不关闭的BUG。
parent 57449c95
......@@ -53,29 +53,37 @@ public class Shortcuts : MonoBehaviour
Program.I().setting.show();
}
if (Input.GetMouseButtonUp(1))
if(Program.I().ocgcore.gameField != null && Program.I().ocgcore.gameField.gameObject != null)
{
if (Program.I().character.isShowed)
Program.I().character.Hide();
else if (Program.I().appearance.isShowed)
Program.I().appearance.Hide();
else if (Program.I().setting.isShowed)
Program.I().setting.hide();
else if (Program.I().cardSelection.isShowed && Program.I().cardSelection.exitable)
Program.I().cardSelection.hide();
else if (PhaseUIBehaviour.isShowed)
PhaseUIBehaviour.hide();
else if (Program.I().aiRoom.isShowed)
}
else
{
if (Input.GetMouseButtonUp(1))
{
Program.I().shiftToServant(Program.I().menu);
UIHandler.OpenHomeUI();
if (Program.I().character.isShowed)
Program.I().character.Hide();
else if (Program.I().appearance.isShowed)
Program.I().appearance.Hide();
else if (Program.I().setting.isShowed)
Program.I().setting.hide();
else if (Program.I().cardSelection.isShowed && Program.I().cardSelection.exitable)
Program.I().cardSelection.hide();
else if (PhaseUIBehaviour.isShowed)
PhaseUIBehaviour.hide();
else if (Program.I().aiRoom.isShowed)
{
Program.I().shiftToServant(Program.I().menu);
UIHandler.OpenHomeUI();
}
else if (Program.I().animation.isPlaying)
Program.I().animation.StopPlaying();
else if (Program.I().animation.isShowed)
Program.I().animation.hide();
}
else if (Program.I().animation.isPlaying)
Program.I().animation.StopPlaying();
else if (Program.I().animation.isShowed)
Program.I().animation.hide();
}
//if (Input.GetKeyUp(KeyCode.F2))
//{
// if (Program.I().setting.isShowed)
......
......@@ -5968,7 +5968,7 @@ public class Ocgcore : ServantWithCardDescription
{
gameInfo.removeHashedButton("sendSelected");
Program.I().ocgcore.gameField.btn_confirm.hide();
Program.I().cardSelection.finishable = false;
Program.I().cardSelection.hide();
sendSelectedCards();
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment