update space shooter
parent
614308a604
commit
9a952a8bb3
|
@ -65,11 +65,12 @@ internal class FsmInitialize : IStateNode
|
|||
// 联机运行模式
|
||||
if (playMode == EPlayMode.HostPlayMode)
|
||||
{
|
||||
string defaultHostServer = GetHostServerURL();
|
||||
string fallbackHostServer = GetHostServerURL();
|
||||
var createParameters = new HostPlayModeParameters();
|
||||
createParameters.DecryptionServices = new GameDecryptionServices();
|
||||
createParameters.QueryServices = new GameQueryServices();
|
||||
createParameters.DefaultHostServer = GetHostServerURL();
|
||||
createParameters.FallbackHostServer = GetHostServerURL();
|
||||
createParameters.RemoteServices = new RemoteServices(defaultHostServer, fallbackHostServer);
|
||||
initializationOperation = package.InitializeAsync(createParameters);
|
||||
}
|
||||
|
||||
|
@ -115,6 +116,30 @@ internal class FsmInitialize : IStateNode
|
|||
#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>
|
||||
|
|
Loading…
Reference in New Issue