parent
8cd3afb034
commit
b83e8902d7
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,143 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &215893893
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 215893894}
|
||||
- component: {fileID: 215893898}
|
||||
- component: {fileID: 215893897}
|
||||
- component: {fileID: 215893896}
|
||||
- component: {fileID: 215893895}
|
||||
m_Layer: 5
|
||||
m_Name: help
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &215893894
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 215893893}
|
||||
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: 1381114801743157822}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 431.75, y: -64.649994}
|
||||
m_SizeDelta: {x: 68, y: 68}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &215893898
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 215893893}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &215893897
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 215893893}
|
||||
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: 1
|
||||
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: 47b0d71d3c8ef79468a5fb4d8ec5f365, 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!114 &215893896
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 215893893}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 215893897}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
|
||||
Culture=neutral, PublicKeyToken=null
|
||||
--- !u!114 &215893895
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 215893893}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 1
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: -1
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &1267746605577272
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2621,6 +2759,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 689673585582351892}
|
||||
- {fileID: 6345434468995325929}
|
||||
- {fileID: 215893894}
|
||||
m_Father: {fileID: 5594356597870185692}
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
|
@ -2049,6 +2049,7 @@ GENERAL_POPUP_TYPE={
|
|||
WuJinShuXing = 40,
|
||||
WuJinSetting = 39,
|
||||
ChooseUpHero = 41,--选择up英雄
|
||||
JinJieYuLan = 42,
|
||||
}
|
||||
|
||||
--通用信息弹窗类型
|
||||
|
@ -2572,4 +2573,12 @@ CardPosImageName = {
|
|||
[4] = "bd_xinkapaifan4",
|
||||
[5] = "bd_xinkapaifan5",
|
||||
[6] = "bd_xinkapaifan6",
|
||||
}
|
||||
|
||||
PropertyType = {
|
||||
[0] = "任意",
|
||||
[1] = "人系",
|
||||
[2] = "佛系",
|
||||
[3] = "妖系",
|
||||
[4] = "道系",
|
||||
}
|
|
@ -17,6 +17,7 @@ local contentScripts = {
|
|||
--修行选择附身英雄
|
||||
[GENERAL_POPUP_TYPE.XiuXingSelectHero] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_XiuXingSelectHero"), panelName = "GeneralBigPopup_XiuXingSelectHero"},
|
||||
[GENERAL_POPUP_TYPE.WuJinShuXing] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_WuJinShuXing"), panelName = "GeneralBigPopup_WuJinShuXing"},
|
||||
[GENERAL_POPUP_TYPE.JinJieYuLan] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_JinJieYuLan"), panelName = "GeneralBigPopup_JinJieYuLan"},
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
|
|
@ -0,0 +1,167 @@
|
|||
----- 神应属性弹窗 -----
|
||||
local this = {}
|
||||
local HeroRankupGroup = ConfigManager.GetConfig(ConfigName.HeroRankupGroup)
|
||||
local HeroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||
--传入父脚本模块
|
||||
local parent
|
||||
local sortingOrder=0
|
||||
local itemList = {}
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
this.spLoader = SpriteLoader.New()
|
||||
self.bg =Util.GetGameObject(gameObject, "bg")
|
||||
self.pre =Util.GetGameObject(gameObject, "pre")
|
||||
self.upStarPre =Util.GetGameObject(gameObject, "upStarPre")
|
||||
self.close =Util.GetGameObject(gameObject, "close")
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(self.close,function()
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
end
|
||||
|
||||
function this:OnShow(_parent,...)
|
||||
parent=_parent
|
||||
sortingOrder = _parent.sortingOrder
|
||||
parent.BG:SetActive(false)
|
||||
local args = {...}
|
||||
local curHeroData = args[1]
|
||||
if not curHeroData or not HeroConfig[curHeroData.heroConfig.Id] or #HeroConfig[curHeroData.heroConfig.Id].RankupConsumeMaterial < 1 then
|
||||
parent:ClosePanel()
|
||||
return
|
||||
end
|
||||
if not itemList then
|
||||
itemList = {}
|
||||
end
|
||||
|
||||
local data = {}
|
||||
local oldIndex = 0
|
||||
local oldIndexType = 0
|
||||
local index = 0
|
||||
for k,v in ipairs(curHeroData.heroConfig.RankupConsumeMaterial) do
|
||||
if v[1] <= 10 then
|
||||
if oldIndexType ~= v[1] then
|
||||
oldIndexType = v[1]
|
||||
oldIndex = oldIndex + 1
|
||||
index = 1
|
||||
data[oldIndex] = {}
|
||||
data[oldIndex].sort = v[1]
|
||||
data[oldIndex][index] = {}
|
||||
data[oldIndex][index].id = curHeroData.heroConfig.Id
|
||||
data[oldIndex][index].star = v[1]
|
||||
data[oldIndex][index].property = curHeroData.heroConfig.PropertyName
|
||||
data[oldIndex][index].num = 1
|
||||
index = index + 1
|
||||
data[oldIndex][index] = {}
|
||||
data[oldIndex][index].id = curHeroData.heroConfig.Id
|
||||
data[oldIndex][index].star = v[1] - 1
|
||||
data[oldIndex][index].property = curHeroData.heroConfig.PropertyName
|
||||
data[oldIndex][index].num = 1
|
||||
end
|
||||
index = index + 1
|
||||
if not data[oldIndex][index] then
|
||||
data[oldIndex][index] = {}
|
||||
end
|
||||
local config = HeroRankupGroup[v[3]]
|
||||
if config.Issame == 1 then
|
||||
data[oldIndex][index].id = curHeroData.heroConfig.Id
|
||||
elseif config.IsId > 0 then
|
||||
data[oldIndex][index].id = config.IsId
|
||||
else
|
||||
data[oldIndex][index].id = 0
|
||||
end
|
||||
data[oldIndex][index].star = config.StarLimit
|
||||
if config.IsSameClan == 1 then
|
||||
data[oldIndex][index].property = curHeroData.heroConfig.PropertyName
|
||||
else
|
||||
data[oldIndex][index].property = 0
|
||||
end
|
||||
data[oldIndex][index].num = v[4]
|
||||
end
|
||||
end
|
||||
table.sort(data,function(a,b)
|
||||
return a.sort < b.sort
|
||||
end)
|
||||
local index = 0
|
||||
for k,m in pairs(data) do
|
||||
index = index + 1
|
||||
if not itemList[k] then
|
||||
itemList[k] = {}
|
||||
itemList[k].item = newObjToParent(self.pre,self.bg)
|
||||
itemList[k].k= {}
|
||||
itemList[k].k[1] = Util.GetGameObject(itemList[k].item, "k1")
|
||||
itemList[k].k[2] = Util.GetGameObject(itemList[k].item, "k2")
|
||||
itemList[k].k[3] = Util.GetGameObject(itemList[k].item, "k3")
|
||||
end
|
||||
if index == LengthOfTable(data) then
|
||||
Util.GetGameObject(itemList[k].item, "Image (4)").gameObject:SetActive(false)
|
||||
else
|
||||
Util.GetGameObject(itemList[k].item, "Image (4)").gameObject:SetActive(true)
|
||||
end
|
||||
for n,v in ipairs(m) do
|
||||
if not itemList[k][n] then
|
||||
if n < 3 then
|
||||
itemList[k][n] = newObjToParent(self.upStarPre,itemList[k].k[n])
|
||||
else
|
||||
itemList[k][n] = newObjToParent(self.upStarPre,itemList[k].k[3])
|
||||
end
|
||||
end
|
||||
itemList[k][n].transform.localScale = Vector3.New(0.8,0.8,0.8)
|
||||
local proImage = Util.GetGameObject(itemList[k][n], "iconbg/proImage"):GetComponent("Image")
|
||||
local iconDefault = Util.GetGameObject(itemList[k][n],"iconDefault")
|
||||
local icon = Util.GetGameObject(itemList[k][n],"icon"):GetComponent("Image")
|
||||
local frame = Util.GetGameObject(itemList[k][n],"frame"):GetComponent("Image")
|
||||
local num = Util.GetGameObject(itemList[k][n],"num"):GetComponent("Text")
|
||||
local starGrid = Util.GetGameObject(itemList[k][n], "iconbg/starGrid")
|
||||
local name = Util.GetGameObject(itemList[k][n], "name"):GetComponent("Text")
|
||||
proImage.gameObject:SetActive(false)
|
||||
if v.id > 0 then
|
||||
iconDefault:SetActive(false)
|
||||
icon.gameObject:SetActive(true)
|
||||
proImage.gameObject:SetActive(true)
|
||||
proImage.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(v.property))
|
||||
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(HeroConfig[v.id].Icon))
|
||||
frame.sprite=this.spLoader:LoadSprite(GetHeroQuantityImageByquality(HeroConfig[v.id].Quality, v.star))
|
||||
proImage.sprite=this.spLoader:LoadSprite(GetProStrImageByProNum(HeroConfig[v.id].PropertyName))
|
||||
name.text = HeroConfig[v.id].ReadingName
|
||||
else
|
||||
if v.property > 0 then
|
||||
proImage.gameObject:SetActive(true)
|
||||
proImage.sprite=this.spLoader:LoadSprite(GetProStrImageByProNum(v.property))
|
||||
end
|
||||
name.text = string.format("%s%s星",PropertyType[v.property],v.star)
|
||||
iconDefault:SetActive(true)
|
||||
icon.gameObject:SetActive(false)
|
||||
frame.sprite=this.spLoader:LoadSprite(GetHeroQuantityImageByquality(nil,v.star))
|
||||
end
|
||||
num.text = v.num
|
||||
SetHeroStars(this.spLoader, starGrid, v.star,1,nil,-15.3)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- local heroData = {
|
||||
-- id = 0,
|
||||
-- star = 0,
|
||||
-- property = 0,
|
||||
-- num = 0,
|
||||
-- }
|
||||
|
||||
function this:OnClose()
|
||||
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
Util.ClearChild(self.bg.transform)
|
||||
itemList = {}
|
||||
end
|
||||
|
||||
return this
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 240241de83baf6e4abe97a3dc36cbcc4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -62,9 +62,10 @@ function RoleUpStarLayout:InitComponent()
|
|||
this.magDef_UpStar=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/pro/magDef")
|
||||
this.lv_UpStar=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/pro/lv/proValue"):GetComponent("Text")
|
||||
this.nextlv_UpStar=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/pro/lv/nextproValue"):GetComponent("Text")
|
||||
this.help=Util.GetGameObject(self.gameObject,"upStar/btns/help")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
--绑定事件(用于子类重写)s
|
||||
function RoleUpStarLayout:BindEvent()
|
||||
--升星
|
||||
Util.AddOnceClick(this.upStarBtn, function()
|
||||
|
@ -78,6 +79,9 @@ function RoleUpStarLayout:BindEvent()
|
|||
PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.COMPOUND_HERO))
|
||||
end
|
||||
end)
|
||||
Util.AddClick(this.help, function()
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.JinJieYuLan,curHeroData)
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -97,6 +101,11 @@ function RoleUpStarLayout:SetData(_sortinglayer,_parent,_curHerodata,_isUpZhen,_
|
|||
self.gameObject:SetActive(true)
|
||||
this.sortingOrder = _sortinglayer
|
||||
curHeroData = _curHerodata
|
||||
if curHeroData.heroConfig.MaxRank > 5 then
|
||||
this.help.gameObject:SetActive(true)
|
||||
else
|
||||
this.help.gameObject:SetActive(false)
|
||||
end
|
||||
parent = _parent
|
||||
heroDatas = _heroDatas
|
||||
isUpZhen = _isUpZhen
|
||||
|
|
Loading…
Reference in New Issue