【优化】背包中使用多个道具,明确标注数量
parent
2e6cdb5014
commit
0e8811df2b
|
@ -1764,6 +1764,7 @@ RectTransform:
|
|||
- {fileID: 6430118627428784244}
|
||||
- {fileID: 9195391275675604183}
|
||||
- {fileID: 9195391275245497546}
|
||||
- {fileID: 5927907443807698642}
|
||||
m_Father: {fileID: 2925180131101153177}
|
||||
m_RootOrder: 17
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -26590,6 +26591,85 @@ Animator:
|
|||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &7377197288346363957
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5927907443807698642}
|
||||
- component: {fileID: 5119499737869916343}
|
||||
- component: {fileID: 6054380860092621996}
|
||||
m_Layer: 5
|
||||
m_Name: numText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5927907443807698642
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7377197288346363957}
|
||||
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: 1564542999}
|
||||
m_RootOrder: 7
|
||||
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: 407.3, y: -36.900017}
|
||||
m_SizeDelta: {x: 102.8, y: 84}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5119499737869916343
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7377197288346363957}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &6054380860092621996
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7377197288346363957}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.92549026, g: 0.8588236, b: 0.74509805, 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_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 36
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 50
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text:
|
||||
--- !u!1 &7411713007268183163
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -72,6 +72,7 @@ function DoGuessPopup:OnOpen(panelType)
|
|||
this.itemName.text = ConfigManager.GetConfigData(ConfigName.ItemConfig, guessCoinId).Name
|
||||
local maxNum = BagManager.GetItemCountById(guessCoinId)
|
||||
this.itemNum.text = maxNum
|
||||
this.slider.minValue = 1
|
||||
this.slider.maxValue = maxNum
|
||||
this.slider.onValueChanged:AddListener(function()
|
||||
this.sliderCount.text = this.slider.value
|
||||
|
|
|
@ -17,12 +17,14 @@ function this:SetCount(value)
|
|||
count = value
|
||||
this.slider.value = value
|
||||
this.bodyText.text=string.format(Language[12235],count,selectEquipTreasureData.itemConfig.Name)
|
||||
this.numText.text = value
|
||||
end
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
||||
this.bodyText=Util.GetGameObject(gameObject,"BodyText"):GetComponent("Text")
|
||||
this.numText=Util.GetGameObject(gameObject,"numText"):GetComponent("Text")
|
||||
this.confirmBtn=Util.GetGameObject(gameObject,"ConfirmBtn")
|
||||
this.addBtn=Util.GetGameObject(gameObject,"add")
|
||||
this.reduceBtn=Util.GetGameObject(gameObject,"reduce")
|
||||
|
@ -116,7 +118,7 @@ function this:OnShow(_parent,...)
|
|||
end
|
||||
itemList[1].gameObject:SetActive(true)
|
||||
itemList[1]:OnOpen(false,{selectEquipTreasureData.id,selectEquipTreasureData.num},1,true,false)
|
||||
|
||||
this.slider.minValue = 1
|
||||
this.slider.maxValue = selectEquipTreasureData.num
|
||||
this.slider.value = selectEquipTreasureData.num
|
||||
this.slider.onValueChanged:AddListener(function()
|
||||
|
|
|
@ -128,6 +128,7 @@ function this:OnShow(_parent,...)
|
|||
c = tonumber(strs[3])
|
||||
d = tonumber(strs[4])
|
||||
lv = QinglongSerectTreasureManager.GetLevel()
|
||||
this.slider.minValue = 1
|
||||
this.slider.maxValue = 50 - lv
|
||||
this:SetCount(1)
|
||||
this.icon.sprite = SetIcon(id)
|
||||
|
|
Loading…
Reference in New Issue