Commit e02bc7e5 authored by SherryChaos's avatar SherryChaos

fix bugs

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