mirror of https://github.com/tuyoogame/YooAsset
update space shooter
parent
a2d4691f04
commit
995b0c8050
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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包含文件格式
|
||||
|
|
|
@ -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}");
|
||||
|
|
Loading…
Reference in New Issue