diff --git a/Assets/ManagedResources/BG/w_wybq_bg.jpg b/Assets/ManagedResources/BG/w_wybq_bg.jpg new file mode 100644 index 0000000000..51f46507fd Binary files /dev/null and b/Assets/ManagedResources/BG/w_wybq_bg.jpg differ diff --git a/Assets/ManagedResources/BG/w_wybq_bg.jpg.meta b/Assets/ManagedResources/BG/w_wybq_bg.jpg.meta new file mode 100644 index 0000000000..cd2a79c344 --- /dev/null +++ b/Assets/ManagedResources/BG/w_wybq_bg.jpg.meta @@ -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 diff --git a/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua b/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua index 813299cfed..1a66e386aa 100644 --- a/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua +++ b/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua @@ -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 + return end - 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