查看礼物信息提交

dev_one_discount
wangzhenxing 2023-09-13 15:44:06 +08:00
parent eeb3859f72
commit e80056fcd4
3 changed files with 222 additions and 20 deletions

View File

@ -15543,7 +15543,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1833415466006012030
RectTransform:
m_ObjectHideFlags: 0
@ -20531,6 +20531,7 @@ RectTransform:
- {fileID: 766109449052593049}
- {fileID: 6343545840538766107}
- {fileID: 1833415466006012030}
- {fileID: 5386874473300730168}
m_Father: {fileID: 307101446868176157}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -51480,7 +51481,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.000012101404, y: 10}
m_SizeDelta: {x: 30, y: 180}
m_SizeDelta: {x: 0, y: 180}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &7559439943759304843
MonoBehaviour:
@ -130569,6 +130570,80 @@ MonoBehaviour:
m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &3500168843157008096
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9075822655596589383}
- component: {fileID: 4590717861424323818}
- component: {fileID: 7009966137364737704}
m_Layer: 0
m_Name: Grid
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9075822655596589383
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3500168843157008096}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 100.00815}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 5386874473300730168}
m_RootOrder: 0
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: 0.000012101404, y: 10}
m_SizeDelta: {x: 0, y: 180}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &4590717861424323818
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3500168843157008096}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Padding:
m_Left: 30
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 4
m_Spacing: 60
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 0
m_ChildControlHeight: 0
--- !u!114 &7009966137364737704
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3500168843157008096}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1741964061, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalFit: 2
m_VerticalFit: 0
--- !u!1 &3506416306957056963
GameObject:
m_ObjectHideFlags: 0
@ -136470,7 +136545,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &6343545840538766107
RectTransform:
m_ObjectHideFlags: 0
@ -159627,10 +159702,10 @@ RectTransform:
m_Father: {fileID: 2560409808489270275}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 315, y: -125}
m_SizeDelta: {x: 200, y: 250}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4373769112107159852
CanvasRenderer:
@ -191711,6 +191786,97 @@ MonoBehaviour:
m_LineSpacing: 1
m_Text: "\u73A9\u5BB6\u4FE1\u606F"
LanguageIndex: 0
--- !u!1 &6022328275602994997
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5386874473300730168}
- component: {fileID: 2969042710309720145}
- component: {fileID: 2040096620824510401}
- component: {fileID: 6863632528125148426}
m_Layer: 5
m_Name: giftInfo
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5386874473300730168
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6022328275602994997}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 9075822655596589383}
m_Father: {fileID: 3031162827143993638}
m_RootOrder: 5
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: -0.34, y: -0.00012207031}
m_SizeDelta: {x: 868.34, y: 250}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2969042710309720145
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6022328275602994997}
m_CullTransparentMesh: 0
--- !u!114 &2040096620824510401
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6022328275602994997}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Content: {fileID: 9075822655596589383}
m_Horizontal: 1
m_Vertical: 0
m_MovementType: 1
m_Elasticity: 0.1
m_Inertia: 1
m_DecelerationRate: 0.135
m_ScrollSensitivity: 1
m_Viewport: {fileID: 0}
m_HorizontalScrollbar: {fileID: 0}
m_VerticalScrollbar: {fileID: 0}
m_HorizontalScrollbarVisibility: 0
m_VerticalScrollbarVisibility: 0
m_HorizontalScrollbarSpacing: 0
m_VerticalScrollbarSpacing: 0
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &6863632528125148426
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6022328275602994997}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &6030290806645482471
GameObject:
m_ObjectHideFlags: 0
@ -203611,10 +203777,10 @@ RectTransform:
m_Father: {fileID: 2560409808489270275}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -105, y: -125}
m_SizeDelta: {x: 200, y: 250}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &9045290434950231555
CanvasRenderer:
@ -240583,10 +240749,10 @@ RectTransform:
m_Father: {fileID: 2560409808489270275}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -315, y: -125}
m_SizeDelta: {x: 200, y: 250}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3788160343196487560
CanvasRenderer:
@ -258117,10 +258283,10 @@ RectTransform:
m_Father: {fileID: 2560409808489270275}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 105, y: -125}
m_SizeDelta: {x: 200, y: 250}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6719372695838501122
CanvasRenderer:

View File

@ -129,6 +129,13 @@ local InfoBtns = {
this.RideInfoShow(data,obj)
end
},
[6] = {
name = "礼 物",
gridName = "giftInfo",
func = function (data,obj)
this.GiftInfoShow(data,obj)
end
},
}
@ -515,6 +522,7 @@ function this.FormationAdapter(teamInfo)
--====================其他信息按钮显示======================
this.infoIndex = 0
for index, value in ipairs(InfoBtns) do
LogError("teamInfo.giftEquipIds len============="..#teamInfo.giftEquipIds)
--添加按钮
local item = this.InfoBtnsList[index]
if not item then
@ -546,6 +554,11 @@ function this.FormationAdapter(teamInfo)
if this.infoIndex == 0 then
this.infoIndex = index
end
elseif (index == 6 and teamInfo.giftEquipIds and #teamInfo.giftEquipIds > 0) then
item.gameObject:SetActive(#teamInfo.giftEquipIds> 0)
if this.infoIndex == 0 then
this.infoIndex = index
end
else
item.gameObject:SetActive(false)
end
@ -739,6 +752,26 @@ function this.RideInfoShow(teamInfo,Grid)
end
end
--礼物
function this.GiftInfoShow(teamInfo,Grid)
for i = 1, #teamInfo.giftEquipIds do
local item = this.ItemPreList[this.infoIndex][i]
local value = teamInfo.giftEquipIds[i]
if not item then
item = SubUIManager.Open(SubUIConfig.ItemView, Grid.transform)
this.ItemPreList[this.infoIndex][i] = item
end
item:OnOpen(false, {value,0}, 1,true,false,false,this.sortingOrder)
item.gameObject:SetActive(true)
end
if #teamInfo.giftEquipIds > 4 then
-- Grid:GetComponent("HorizontalLayoutGroup").padding.left = 30
Grid:GetComponent("RectTransform").pivot = Vector2.New(0, 0.5)
else
-- Grid:GetComponent("HorizontalLayoutGroup").padding.left = -30
Grid:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
end
end
--============================底部按钮显示===========================
function this.RefreshBtnShow()
this.btnBox:SetActive(true)

View File

@ -729,11 +729,14 @@ function this.GiftInfo()
--LogError("v==============="..id)
local frame=Util.GetGameObject(giftList[i],"Frame"):GetComponent("Image")
local icon=Util.GetGameObject(giftList[i],"Icon"):GetComponent("Image")
Util.GetGameObject(giftList[i],"Name"):SetActive(false)
frame.sprite=this.spLoader:LoadSprite(GetQuantityImageByquality(equipConfig[id].Quality))
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[id].ResourceID))
Util.AddOnceClick(giftList[i],function()
UIManager.OpenPanel(UIName.GodPrintPopUp,0,curHeroData.dynamicId,v)
local data={}
data.id=id
UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup2,this,data,0)
end)
end
end