update space shooter

mlyDevMerge1.5.7
hevinci 2023-08-15 18:19:07 +08:00 committed by QiJing
parent e1cd69f716
commit 8a74d32ac5
3 changed files with 21 additions and 25 deletions

View File

@ -69,19 +69,20 @@ internal class FsmInitialize : IStateNode
string fallbackHostServer = GetHostServerURL();
var createParameters = new HostPlayModeParameters();
createParameters.DecryptionServices = new GameDecryptionServices();
createParameters.QueryServices = new GameQueryServices();
createParameters.BuildinQueryServices = new GameQueryServices();
createParameters.DeliveryQueryServices = new DefaultDeliveryQueryServices();
createParameters.RemoteServices = new RemoteServices(defaultHostServer, fallbackHostServer);
initializationOperation = package.InitializeAsync(createParameters);
}
// WebGL运行模式
if(playMode == EPlayMode.WebPlayMode)
if (playMode == EPlayMode.WebPlayMode)
{
string defaultHostServer = GetHostServerURL();
string fallbackHostServer = GetHostServerURL();
var createParameters = new WebPlayModeParameters();
createParameters.DecryptionServices = new GameDecryptionServices();
createParameters.QueryServices = new GameQueryServices();
createParameters.BuildinQueryServices = new GameQueryServices();
createParameters.RemoteServices = new RemoteServices(defaultHostServer, fallbackHostServer);
initializationOperation = package.InitializeAsync(createParameters);
}
@ -178,4 +179,19 @@ internal class FsmInitialize : IStateNode
return 1024;
}
}
/// <summary>
/// 默认的分发资源查询服务类
/// </summary>
private class DefaultDeliveryQueryServices : IDeliveryQueryServices
{
public DeliveryFileInfo GetDeliveryFileInfo(string packageName, string fileName)
{
throw new NotImplementedException();
}
public bool QueryDeliveryFiles(string packageName, string fileName)
{
return false;
}
}
}

View File

@ -6,18 +6,8 @@ using YooAsset;
/// <summary>
/// 资源文件查询服务类
/// </summary>
public class GameQueryServices : IQueryServices
public class GameQueryServices : IBuildinQueryServices
{
public DeliveryFileInfo GetDeliveryFileInfo(string packageName, string fileName)
{
throw new System.NotImplementedException();
}
public bool QueryDeliveryFiles(string packageName, string fileName)
{
return false;
}
public bool QueryStreamingAssets(string packageName, string fileName)
{
// 注意fileName包含文件格式

View File

@ -9,18 +9,8 @@ using YooAsset;
/// <summary>
/// 资源文件查询服务类
/// </summary>
public class GameQueryServices2 : IQueryServices
public class GameQueryServices2 : IBuildinQueryServices
{
public DeliveryFileInfo GetDeliveryFileInfo(string packageName, string fileName)
{
throw new System.NotImplementedException();
}
public bool QueryDeliveryFiles(string packageName, string fileName)
{
return false;
}
public bool QueryStreamingAssets(string packageName, string fileName)
{
return StreamingAssetsHelper2.FileExists($"{StreamingAssetsDefine.RootFolderName}/{packageName}/{fileName}");