Commit e02bc7e5 authored by SherryChaos's avatar SherryChaos

fix bugs

parent c220392c
...@@ -298,6 +298,7 @@ namespace MDPro3 ...@@ -298,6 +298,7 @@ namespace MDPro3
private void OnApplicationQuit() private void OnApplicationQuit()
{ {
Running = false; Running = false;
TcpHelper.tcpClient?.Close();
YgoServer.StopServer(); YgoServer.StopServer();
} }
} }
......
...@@ -1696,14 +1696,7 @@ namespace MDPro3 ...@@ -1696,14 +1696,7 @@ namespace MDPro3
{ {
if (condition != Condition.Replay) if (condition != Condition.Replay)
{ {
selections = new List<string>() ShowSaveReplay();
{
InterString.Get("保存回放"),
InterString.Get("保存"),
InterString.Get("放弃"),
Tools.GetTimeString()
};
ShowPopupInput(selections, OnSaveReplay, OnGiveUpReplay, InputValidation.ValidationType.Path);
Destroy(mono.gameObject); Destroy(mono.gameObject);
} }
}; };
...@@ -1714,6 +1707,8 @@ namespace MDPro3 ...@@ -1714,6 +1707,8 @@ namespace MDPro3
playableGuide0.GetComponent<Animator>().SetTrigger("End"); playableGuide0.GetComponent<Animator>().SetTrigger("End");
playableGuide1.GetComponent<Animator>().SetTrigger("End"); playableGuide1.GetComponent<Animator>().SetTrigger("End");
} }
//防止对方在更换副卡组时拔螺丝
UIManager.UIBlackOut(transitionTime);
break; break;
case GameMessage.Start: case GameMessage.Start:
CoreReset(); CoreReset();
...@@ -4756,22 +4751,14 @@ namespace MDPro3 ...@@ -4756,22 +4751,14 @@ namespace MDPro3
#region PracticalizeTools #region PracticalizeTools
public int LocalPlayer(int p, bool advanced = false) public int LocalPlayer(int p)
{ {
if (p == 0 || p == 1) if (p == 0 || p == 1)
{ {
if (advanced) if (isFirst)
{ return p;
return 1 - p;
}
else
{
if (isFirst)
return p;
return 1 - p;
}
} }
return p; return p;
} }
public static int[] GetSelectLevelSum(List<GameCard> cards) public static int[] GetSelectLevelSum(List<GameCard> cards)
...@@ -6442,6 +6429,18 @@ namespace MDPro3 ...@@ -6442,6 +6429,18 @@ namespace MDPro3
} }
} }
void ShowSaveReplay()
{
var selections = new List<string>()
{
InterString.Get("保存回放"),
InterString.Get("保存"),
InterString.Get("放弃"),
Tools.GetTimeString()
};
ShowPopupInput(selections, OnSaveReplay, OnGiveUpReplay, InputValidation.ValidationType.Path);
}
#endregion #endregion
#region Enum #region Enum
......
...@@ -402,28 +402,18 @@ namespace MDPro3 ...@@ -402,28 +402,18 @@ namespace MDPro3
} }
void AddChatItem(int player, string content) void AddChatItem(int player, string content)
{ {
if (Program.I().ocgcore.isShowed) if (Program.I().ocgcore.isShowed && player < 4)
{ {
if (mode != 2) if (mode != 2)
player = Program.I().ocgcore.LocalPlayer(player); player = Program.I().ocgcore.LocalPlayer(player);
else else
{ {
if (Program.I().ocgcore.isFirst) if (Program.I().ocgcore.isFirst && selfType > 1
player ^= 2; || !Program.I().ocgcore.isFirst && selfType < 2)
if (player == 0) player = (player + 2) % 4;
player = 0;
else if (player == 1)
player = 2;
else if (player == 2)
player = 1;
else if (player == 3)
player = 3;
else
player = 10;
} }
} }
var nickName = players[player]?.name; var nickName = players[player]?.name;
GameObject item = null; GameObject item = null;
var position = GetPlayerPositon(player); var position = GetPlayerPositon(player);
......
...@@ -88,7 +88,7 @@ namespace MDPro3 ...@@ -88,7 +88,7 @@ namespace MDPro3
cg.alpha = 1f; cg.alpha = 1f;
cg.interactable = true; cg.interactable = true;
cg.blocksRaycasts = true; cg.blocksRaycasts = true;
if (depth <= 0) if (depth <= 0 || (this == Program.I().editDeck && Program.I().editDeck.condition == EditDeck.EditDeckCondition.ChangeSide))
UIManager.HideExitButton(0); UIManager.HideExitButton(0);
else else
UIManager.ShowExitButton(0); UIManager.ShowExitButton(0);
......
...@@ -135,8 +135,7 @@ PlayerSettings: ...@@ -135,8 +135,7 @@ PlayerSettings:
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 1.0.6 bundleVersion: 1.0.6
preloadedAssets: preloadedAssets: []
- {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1
...@@ -530,7 +529,7 @@ PlayerSettings: ...@@ -530,7 +529,7 @@ PlayerSettings:
m_APIs: 0b000000 m_APIs: 0b000000
m_Automatic: 1 m_Automatic: 1
- m_BuildTarget: WindowsStandaloneSupport - m_BuildTarget: WindowsStandaloneSupport
m_APIs: 0b000000020000001200000015000000 m_APIs: 0200000012000000150000000b000000
m_Automatic: 0 m_Automatic: 0
m_BuildTargetVRSettings: m_BuildTargetVRSettings:
- m_BuildTarget: Standalone - m_BuildTarget: Standalone
......
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