增加游戏结束判断
This commit is contained in:
parent
f6900fa0bc
commit
50ff305581
@ -6,7 +6,7 @@ using UnityEngine;
|
||||
|
||||
namespace Logic.Editor
|
||||
{
|
||||
public class CustomBuildProcessor : IPreprocessBuildWithReport
|
||||
public class CustomBuildProcessor : IPreprocessBuildWithReport, IPostprocessBuildWithReport
|
||||
{
|
||||
public int callbackOrder => 0;
|
||||
|
||||
@ -22,5 +22,10 @@ namespace Logic.Editor
|
||||
PlayerSettings.productName = $"TOHOTOPIA Demo v{asset.CurVersionInfo.FullVersion}";
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPostprocessBuild(BuildReport report)
|
||||
{
|
||||
PlayerSettings.productName = $"TOHOTOPIA Demo";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -317,7 +317,7 @@ namespace TH1_Logic.Steam
|
||||
{
|
||||
var playerID = Main.MapData.Net.GetPlayerId(message.MemberId);
|
||||
var player = Main.MapData.PlayerMap.GetPlayerData(playerID);
|
||||
if (player != null && player.Alive) value.State = MemberNetState.Disconnected;
|
||||
if (player != null && player.Alive && !Main.MapData.CheckIfGameEnd(out _)) value.State = MemberNetState.Disconnected;
|
||||
}
|
||||
}
|
||||
|
||||
@ -342,6 +342,7 @@ namespace TH1_Logic.Steam
|
||||
Main.MapData.Net.PlayerConfirm = message.PlayerConfirm;
|
||||
Main.MapData.Net.PlayerConfirm.TryGetValue(LobbyManager.Instance.Lobby.GetSelfMemberId(),
|
||||
out var value);
|
||||
if (Main.MapData.CheckIfGameEnd(out _)) return;
|
||||
if (value != null && value.State != MemberNetState.OK)
|
||||
{
|
||||
if (value.State == MemberNetState.Disconnected &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user