Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
ZhangBiao 2021-08-04 16:39:11 +08:00
commit 78155b6a3f
3 changed files with 138 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

View File

@ -0,0 +1,121 @@
fileFormatVersion: 2
guid: 9859e8fd4d39ca349946f4c527799eb9
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 0
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 4
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 57
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5621e4cf5a5876944956f4131c035ca7
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName: lz4/bg/w_wybq_bg
assetBundleVariant: unity3d

View File

@ -87,21 +87,23 @@ local function SetPosition(self, dv2)
end
local fv2 = av2 + dv2
if not self.elastic then
--if not self.elastic then
if self.itemDis > 0 then
if self.dragType == 1 then
if fv2.y < 0 or fv2.y > self.itemDis then
if fv2.y < (0 - self.maxOffSet) or fv2.y > (self.itemDis + self.maxOffSet) then
fv2.y = math.clamp(fv2.y, 0, self.itemDis)
return
end
elseif self.dragType == 2 then
if fv2.x < 0 or fv2.x > self.itemDis then
if fv2.x < (0 - self.maxOffSet) or fv2.x > (self.itemDis + self.maxOffSet) then
fv2.x = math.clamp(-fv2.x, -self.itemDis, 0)
return
end
end
else
fv2 = Vector2.zero
end
return
end
--end
self.dragGOTran.anchoredPosition = fv2
local curIndex
@ -304,7 +306,16 @@ function ScrollCycleView:OnOpen(itemGO, scrollBar, scrollSizeDeltaV2, dragType,
self.dragGOTran.anchoredPosition = Vector2.New(0, 0)
end
function this:SetData(dataList, updateFunc, noTop, noAnim)
function this:SetData(dataList, updateFunc, noTop, noAnim,maxOffSet)
if not maxOffSet then
if not self.elastic then
self.maxOffSet = 0
else
self.maxOffSet = 500
end
else
self.maxOffSet = maxOffSet
end
self.dataList = dataList --传入的数据列表
self.updateFunc = updateFunc --刷新回调,返回数据列表的索引和对应预设
self.dataCount = #dataList