[bug]======寻宝特效穿透修改

dev_chengFeng
wangzhenxing 2022-03-25 14:12:19 +08:00
parent c66ce27a88
commit c593cdf2d6
2 changed files with 47 additions and 22 deletions

View File

@ -711,7 +711,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -1.8, y: -390.5}
m_AnchoredPosition: {x: -1.8, y: -401}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &380322857252361036
@ -4282,8 +4282,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -15.119997, y: 537.2}
m_SizeDelta: {x: 855.76, y: 490}
m_AnchoredPosition: {x: -15.119997, y: 548}
m_SizeDelta: {x: 855.8, y: 495.77}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1937634087149734782
CanvasRenderer:
@ -13784,7 +13784,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 4.830002, y: -239}
m_AnchoredPosition: {x: 4.830002, y: -296}
m_SizeDelta: {x: 547.6, y: 200.6}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &314793541967843562
@ -13832,7 +13832,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: 42263669b8cc5c04a96720be44775913, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:

View File

@ -34,13 +34,15 @@ function FindTreasureDispatchPanel:InitComponent()
self.btnAutoSureText = Util.GetGameObject(self.transform, "btnAutoSure/Text"):GetComponent("Text")
self.cardPre = Util.GetGameObject(self.gameObject, "item")
self.Scrollbar = Util.GetGameObject(self.gameObject, "Scrollbar"):GetComponent("Scrollbar")
local v = Util.GetGameObject(self.gameObject, "scroll"):GetComponent("RectTransform").rect
self.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(self.gameObject, "scroll").transform,
self.cardPre, self.Scrollbar, Vector2.New(-v.x*2, -v.y), 1, 5, Vector2.New(25,35))
self.ScrollView.moveTween.MomentumAmount = 1
self.cardPre, self.Scrollbar, Vector2.New(-v.x*2, -v.y), 1, 5, Vector2.New(25,32))
self.ScrollView.moveTween.MomentumAmount = 0
self.ScrollView.moveTween.Strength = 1
self.ScrollView.elastic = false
--self.ScrollView.itemCount = 15
self.selectBtn = Util.GetGameObject(self.gameObject, "Tabs/selectBtn")
for i = 0, 6 do
tabs[i] = Util.GetGameObject(self.transform, "Tabs/grid/Btn" .. i)
@ -256,22 +258,45 @@ function FindTreasureDispatchPanel:OnShowCardData(go,heroData,type)
local starGrid = Util.GetGameObject(go.transform, "star")
local star,starType = heroData.GetStar(1)
SetHeroStars(self.spLoader, starGrid, star,starType)
local effect=SetHeroFlyEffect(go,self.spLoader,heroData.star,self.sortingOrder + 1,1,3)
if effect then
local meshs2=effect:GetComponentsInChildren(typeof(UnityEngine.SkinnedMeshRenderer))
local effect=SetHeroFlyEffect(go,self.spLoader,heroData.star,self.sortingOrder + 1,1,3)
-- if effect then
-- local meshs2=effect:GetComponentsInChildren(typeof(UnityEngine.SkinnedMeshRenderer))
-- for key, value in pairs(meshs2:ToTable()) do
-- if value.material.shader.name=="YXZ/Effect/TransparentRim" then
-- value.material.shader=poolManager:LoadAsset("YXZ_Effect_TransparentRim_1",poolManager.AssetType.Other)
-- end
-- end
-- end
-- local meshs1=starGrid:GetComponentsInChildren(typeof(UnityEngine.ParticleSystem))
-- for key, value in pairs(meshs1:ToTable()) do
-- local mat=value:GetComponent(typeof(UnityEngine.Renderer))
-- if mat.material.shader.name=="UI Particles/Additive" then
-- mat.material.shader=poolManager:LoadAsset("UI-Particle-Add_1",poolManager.AssetType.Other)
-- end
-- end
local particles=go:GetComponentsInChildren(typeof(UnityEngine.ParticleSystem))
for key, value in pairs(particles:ToTable()) do
local mat=value:GetComponent(typeof(UnityEngine.Renderer))
if mat.material.shader.name=="CGwell FX/Additive Lv1" then
mat.material.shader=poolManager:LoadAsset("Add Lv1_1",poolManager.AssetType.Other)
elseif mat.material.shader.name=="UI Particles/Additive" then
mat.material.shader=poolManager:LoadAsset("UI-Particle-Add_1",poolManager.AssetType.Other)
elseif mat.material.shader.name=="YXZ/Effect/Mix Masking(Without Moving)_alphablend" then
mat.material.shader=poolManager:LoadAsset("YXZ_MixMaskingWithoutMoving_alphablend_1",poolManager.AssetType.Other)
end
end
local meshs=go:GetComponentsInChildren(typeof(UnityEngine.MeshRenderer))
for key, value in pairs(meshs:ToTable()) do
if value.material.shader.name=="Custom/S_03_UV_alpha_add" then
value.material.shader=poolManager:LoadAsset("S_03_uv_alpha_add_1",poolManager.AssetType.Other)
end
end
local meshs2=go:GetComponentsInChildren(typeof(UnityEngine.SkinnedMeshRenderer))
for key, value in pairs(meshs2:ToTable()) do
if value.material.shader.name=="YXZ/Effect/TransparentRim" then
value.material.shader=poolManager:LoadAsset("YXZ_Effect_TransparentRim_1",poolManager.AssetType.Other)
end
end
end
local meshs1=starGrid:GetComponentsInChildren(typeof(UnityEngine.ParticleSystem))
for key, value in pairs(meshs1:ToTable()) do
local mat=value:GetComponent(typeof(UnityEngine.Renderer))
if mat.material.shader.name=="UI Particles/Additive" then
mat.material.shader=poolManager:LoadAsset("UI-Particle-Add_1",poolManager.AssetType.Other)
end
end
value.material.shader=poolManager:LoadAsset("YXZ_Effect_TransparentRim_1",poolManager.AssetType.Other)
end
end
Util.SetParticleSortLayer(starGrid,self.sortingOrder + 1)
local cardBtn = Util.GetGameObject(go.transform, "icon")