update space shooter
parent
614308a604
commit
9a952a8bb3
|
@ -65,11 +65,12 @@ internal class FsmInitialize : IStateNode
|
||||||
// 联机运行模式
|
// 联机运行模式
|
||||||
if (playMode == EPlayMode.HostPlayMode)
|
if (playMode == EPlayMode.HostPlayMode)
|
||||||
{
|
{
|
||||||
|
string defaultHostServer = GetHostServerURL();
|
||||||
|
string fallbackHostServer = GetHostServerURL();
|
||||||
var createParameters = new HostPlayModeParameters();
|
var createParameters = new HostPlayModeParameters();
|
||||||
createParameters.DecryptionServices = new GameDecryptionServices();
|
createParameters.DecryptionServices = new GameDecryptionServices();
|
||||||
createParameters.QueryServices = new GameQueryServices();
|
createParameters.QueryServices = new GameQueryServices();
|
||||||
createParameters.DefaultHostServer = GetHostServerURL();
|
createParameters.RemoteServices = new RemoteServices(defaultHostServer, fallbackHostServer);
|
||||||
createParameters.FallbackHostServer = GetHostServerURL();
|
|
||||||
initializationOperation = package.InitializeAsync(createParameters);
|
initializationOperation = package.InitializeAsync(createParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,6 +116,30 @@ internal class FsmInitialize : IStateNode
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 远端资源地址查询服务类
|
||||||
|
/// </summary>
|
||||||
|
private class RemoteServices : IRemoteServices
|
||||||
|
{
|
||||||
|
private readonly string _defaultHostServer;
|
||||||
|
private readonly string _fallbackHostServer;
|
||||||
|
|
||||||
|
public RemoteServices(string defaultHostServer, string fallbackHostServer)
|
||||||
|
{
|
||||||
|
_defaultHostServer = defaultHostServer;
|
||||||
|
_fallbackHostServer = fallbackHostServer;
|
||||||
|
}
|
||||||
|
string IRemoteServices.GetRemoteFallbackURL(string fileName)
|
||||||
|
{
|
||||||
|
return $"{_defaultHostServer}/{fileName}";
|
||||||
|
}
|
||||||
|
string IRemoteServices.GetRemoteMainURL(string fileName)
|
||||||
|
{
|
||||||
|
return $"{_fallbackHostServer}/{fileName}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源文件解密服务类
|
/// 资源文件解密服务类
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue