图片修改提交

dev_chengFeng
jiaoyangna 2021-11-27 13:54:36 +08:00
parent 83946b29f2
commit 04987414e9
5 changed files with 84 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -980,6 +980,80 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &2420142257613195181
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2544234084882806026}
- component: {fileID: 536508017458147167}
- component: {fileID: 6042825148464630560}
m_Layer: 5
m_Name: yihuode
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2544234084882806026
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2420142257613195181}
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: []
m_Father: {fileID: 1850525865902583112}
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: -8.5, y: 3.5}
m_SizeDelta: {x: 137, y: 127}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &536508017458147167
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2420142257613195181}
m_CullTransparentMesh: 0
--- !u!114 &6042825148464630560
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2420142257613195181}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: d2eff9e1ef9c15745986a5aa489eb10c, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &2541507576273689499
GameObject:
m_ObjectHideFlags: 0
@ -1990,7 +2064,8 @@ RectTransform:
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: []
m_Children:
- {fileID: 2544234084882806026}
m_Father: {fileID: 773274248527752682}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -20,7 +20,7 @@ local tagNum--页签号
local goList = {}--勾选按钮列表
local itemType = 0 --宝箱里面道具类型
--初始化组件(用于子类重写)
function RewardBoxPanel:InitComponent()
this.spLoader = SpriteLoader.New()
@ -153,7 +153,7 @@ function RewardBoxPanel:SetGiftData()--设置奖励列表
for index, value in ipairs(this.rewardGroup) do
RewardGroupList[index] = value
end
itemType = itemConfig[rewardGroup[RewardGroupList[tagNum]].ShowItem[1][1]].ItemType
this.ScrollView:SetData(rewardGroup[RewardGroupList[tagNum]].ShowItem,function(index,item)
RewardBoxPanel:SetSingleGiftData(index,item,RewardGroupList[tagNum],tagNum)
end)
@ -164,6 +164,7 @@ end
function RewardBoxPanel:SetSingleGiftData(index,item,boxId,tagNum)
itemList[index] = item
local icon = Util.GetGameObject(item,"icon")
local yihuode = Util.GetGameObject(icon,"yihuode")
local tip = Util.GetGameObject(item,"tip"):GetComponent("Text")
local select = Util.GetGameObject(item,"select")
local go = Util.GetGameObject(item,"select/Go")
@ -173,6 +174,7 @@ function RewardBoxPanel:SetSingleGiftData(index,item,boxId,tagNum)
item:SetActive(true)
if not itemIconList[item] then
local view = SubUIManager.Open(SubUIConfig.ItemView, icon.transform)
view.transform:SetAsFirstSibling()
itemIconList[item] = view
end
itemIconList[item]:OnOpen(false,rewardGroup[boxId].ShowItem[index],1,false, false, false, self.sortingOrder)
@ -183,12 +185,15 @@ function RewardBoxPanel:SetSingleGiftData(index,item,boxId,tagNum)
--判断是否是在背包界面打开
select:GetComponent("Button").interactable = BagManager.isBagPanel
select:SetActive(BagManager.isBagPanel)
yihuode:SetActive(false)
if itemConfig[rewardGroup[boxId].ShowItem[index][1]].ItemType == ItemType.Incarnation then
local num = BagManager.GetItemCountById(rewardGroup[boxId].ShowItem[index][1])
if num > 0 then
select:SetActive(false)
yihuode:SetActive(true)
else
select:SetActive(true)
yihuode:SetActive(false)
end
end
--判断是否选了该物品
@ -219,7 +224,7 @@ function RewardBoxPanel:SetBottom()--设置底部滑动条
this.btnOk:SetActive(not BagManager.isBagPanel)
if not BagManager.isBagPanel then return end
maxOwnNum = BagManager.GetItemCountById(this.itemId)--拥有的最大数量
maxNum = gameSetting[1].OpenBoxLimits--最大领取数量(配表)
maxNum = itemType == ItemType.Incarnation and 1 or gameSetting[1].OpenBoxLimits--最大领取数量(配表)
this.Slider:GetComponent("Slider").value=1
this.Slider:GetComponent("Slider").minValue = 0
this.Slider:GetComponent("Slider").maxValue = maxOwnNum >= maxNum and maxNum or maxOwnNum--当前物品总数量