变身卡详情提交
parent
97c23fb3cb
commit
f6c94a3cfe
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6b1d7c5b3d4c3a74fab1fa0b04beeacd
|
||||
timeCreated: 1557822446
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -431,6 +431,7 @@ UIName = {
|
|||
TailsmanSoulMainPanel = 439,
|
||||
IncarnationPanel = 438,
|
||||
LingMaiMiJingPanel = 436,--灵脉秘境
|
||||
RewardTailsmanChipShowPopup = 440
|
||||
}
|
||||
|
||||
SubUIConfig = {
|
||||
|
|
|
|||
|
|
@ -219,6 +219,16 @@ function this.GetIncarnationData()
|
|||
return datas
|
||||
end
|
||||
|
||||
--获取已上阵的变身卡 --战斗获取
|
||||
function this.GetIncarnationDataById(id)
|
||||
for k,v in pairs(this.itemDataList) do
|
||||
if v.itemId == id then
|
||||
return v
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function this.CheckRedData(red)
|
||||
local list = {}
|
||||
if red == RedPointType.incarnation_people then
|
||||
|
|
|
|||
|
|
@ -0,0 +1,177 @@
|
|||
require("Base/BasePanel")
|
||||
local RewardTailsmanChipShowPopup = Inherit(BasePanel)
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||
local passiveSkillConfig = ConfigManager.GetConfig(ConfigName.PassiveSkillConfig)
|
||||
local _BaseProList = {}--基础属性对象
|
||||
local _suitProList = {}--套装属性对象
|
||||
local _superProList = {}--白金属性对象
|
||||
local typeToUpdate = {
|
||||
[2] = 2,--已穿戴->卸载单件
|
||||
[3] = 1,--未穿戴->穿单件
|
||||
[4] = 3,--未穿戴->替换单件
|
||||
}
|
||||
--初始化组件(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:InitComponent()
|
||||
self.spLoader = SpriteLoader.New()
|
||||
self.mask = Util.GetGameObject(self.transform, "mask")
|
||||
self.content = Util.GetGameObject(self.transform, "Content")
|
||||
--装备详情--topBar
|
||||
self.topBar = Util.GetGameObject(self.transform, "Content/topBar")
|
||||
self.eqiopName = Util.GetGameObject(self.topBar, "name"):GetComponent("Text")
|
||||
self.icon = Util.GetGameObject(self.topBar, "icon"):GetComponent("Image")
|
||||
self.frame = Util.GetGameObject(self.topBar, "frame"):GetComponent("Image")
|
||||
self.equipType=Util.GetGameObject(self.topBar, "equipType"):GetComponent("Text")
|
||||
self.equipQuaText=Util.GetGameObject(self.topBar, "equipQuaText"):GetComponent("Text")
|
||||
self.equipInfoText=Util.GetGameObject(self.topBar, "equipInfoText"):GetComponent("Text")
|
||||
self.effectbaijin = Util.GetGameObject(self.topBar, "fx_zhuangbeijiemian")
|
||||
--装备属性--midBar
|
||||
--basePro
|
||||
self.midBar = Util.GetGameObject(self.transform, "Content/midBar")
|
||||
self.basePro = Util.GetGameObject(self.midBar, "basePro")
|
||||
self.baseProName = Util.GetGameObject(self.basePro, "PropertyName"):GetComponent("Text")
|
||||
self.baseProGrid = Util.GetGameObject(self.basePro, "grid")
|
||||
self.baseProPre = Util.GetGameObject(self.basePro, "grid/curProName")
|
||||
self.baseProPre:SetActive(false)
|
||||
|
||||
--superPro
|
||||
self.superPro = Util.GetGameObject(self.midBar, "superPro")
|
||||
self.superProGrid = Util.GetGameObject(self.superPro, "proGrid")
|
||||
self.superProPre = Util.GetGameObject(self.superPro, "proGrid/Desc")
|
||||
self.superProPre:SetActive(false)
|
||||
|
||||
--装备获取途径--btmBar
|
||||
self.btmBar = Util.GetGameObject(self.transform, "Content/btmBar/howGet")
|
||||
self.canGetPre = Util.GetGameObject(self.btmBar, "scroll/canGetPre")
|
||||
self.canGetGrid = Util.GetGameObject(self.btmBar, "scroll")
|
||||
self.canGetScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.canGetGrid.transform,self.canGetPre, nil,
|
||||
Vector2.New(self.canGetGrid.transform.rect.width, self.canGetGrid.transform.rect.height), 1, 1, Vector2.New(0, 0))
|
||||
self.canGetScrollView.moveTween.MomentumAmount = 1
|
||||
self.canGetScrollView.moveTween.Strength = 2
|
||||
self.canGetScrollView.elastic = false
|
||||
self.jumpViewList = {}
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:BindEvent()
|
||||
Util.AddClick(self.mask, function()
|
||||
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:AddListener()
|
||||
|
||||
end
|
||||
|
||||
--移除事件监听(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:RemoveListener()
|
||||
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:OnOpen(_equipData,_func)
|
||||
if not _equipData then
|
||||
return
|
||||
end
|
||||
self.equipData = _equipData --当前装备数据
|
||||
self.func = _func
|
||||
end
|
||||
|
||||
function RewardTailsmanChipShowPopup:OnShow()
|
||||
local itemConfigData = IncarnationManager.GetIncarnationDataById(self.equipData)
|
||||
local equipConfigData = ConfigManager.GetConfigData(ConfigName.ItemConfig,self.equipData)
|
||||
self.topBar:GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_di_"..equipConfigData.Quantity)
|
||||
|
||||
self.equipQuaText.text=GetStringByEquipQua(equipConfigData.Quantity,GetQuaStringByEquipQua(equipConfigData.Quantity))
|
||||
self.eqiopName.text=GetStringByEquipQua(equipConfigData.Quantity,GetLanguageStrById(equipConfigData.Name))
|
||||
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(equipConfigData.Quantity))
|
||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(equipConfigData.ResourceID))
|
||||
self.equipInfoText.text = GetLanguageStrById(equipConfigData.ItemDescribe)
|
||||
self.equipType.text = ""
|
||||
|
||||
--下部按钮信息
|
||||
self.effectbaijin:SetActive(equipConfigData.Quantity==7)
|
||||
Util.SetParticleSortLayer(self.effectbaijin,self.sortingOrder + 1)
|
||||
|
||||
--basePro基础属性
|
||||
if itemConfigData.proDatas then
|
||||
self.basePro:SetActive(true)
|
||||
for _, pro in ipairs(_BaseProList) do
|
||||
pro:SetActive(false)
|
||||
end
|
||||
for index, prop in ipairs(itemConfigData.proDatas) do
|
||||
local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, index)
|
||||
if proConfigData then
|
||||
if not _BaseProList[index] then
|
||||
_BaseProList[index] = newObjToParent(self.baseProPre, self.baseProGrid)
|
||||
end
|
||||
_BaseProList[index]:SetActive(true)
|
||||
_BaseProList[index]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info)
|
||||
local vText = Util.GetGameObject(_BaseProList[index], "curProVale"):GetComponent("Text")
|
||||
if prop > 0 then
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop)
|
||||
else
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
self.basePro:SetActive(false)
|
||||
end
|
||||
if not _superProList[1] then
|
||||
_superProList[1] = newObjToParent(self.superProPre, self.superProGrid)
|
||||
end
|
||||
_superProList[1].gameObject:SetActive(true)
|
||||
_superProList[1]:GetComponent("Text").text = itemConfigData.skillDes
|
||||
|
||||
--获取途径
|
||||
if self.jumpViewList and #self.jumpViewList > 0 then
|
||||
for i = 1,#self.jumpViewList do
|
||||
SubUIManager.Close(self.jumpViewList[i])
|
||||
end
|
||||
end
|
||||
local curitemData = itemConfig[tonumber(self.equipData)]
|
||||
if curitemData and curitemData.Jump then
|
||||
if curitemData.Jump and #curitemData.Jump>0 then
|
||||
self.canGetScrollView:SetData(curitemData.Jump,function (index, item)
|
||||
local tempView = nil
|
||||
if self.isShowGo then
|
||||
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, curitemData.Jump[index],true)
|
||||
else
|
||||
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, curitemData.Jump[index],false)
|
||||
end
|
||||
table.insert(self.jumpViewList,tempView)
|
||||
end,true,true)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--(此处需要三遍才能完全打开)
|
||||
ForceRebuildLayout(self.midBar.transform)
|
||||
ForceRebuildLayout(self.midBar.transform)
|
||||
ForceRebuildLayout(self.midBar.transform)
|
||||
|
||||
if self.func then
|
||||
self.func()
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:OnClose()
|
||||
for i = 1, #self.jumpViewList do
|
||||
destroy(self.jumpViewList[i].gameObject)
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function RewardTailsmanChipShowPopup:OnDestroy()
|
||||
self.spLoader:Destroy()
|
||||
_BaseProList = {}
|
||||
_suitProList = {}
|
||||
_superProList = {}
|
||||
self.jumpViewList = {}
|
||||
end
|
||||
|
||||
return RewardTailsmanChipShowPopup
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 62f2cd9ef58bd094b9319c8189c9e17a
|
||||
timeCreated: 1557822999
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -274,7 +274,6 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
|
|||
Util.AddOnceClick(self.frameBtn, function()
|
||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop)
|
||||
end)
|
||||
|
||||
end
|
||||
elseif _itemData.itemType == 2 then
|
||||
--equip
|
||||
|
|
@ -369,6 +368,13 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
|
|||
Util.AddOnceClick(self.frameBtn, function()
|
||||
UIManager.OpenPanel(UIName.PokemonGetInfoPopup, true, _itemData.backData)
|
||||
end)
|
||||
elseif itemDataConFig.ItemType == ItemType.Incarnation then
|
||||
--,5随机道具,6符文
|
||||
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[ _itemData.backData.itemId].Quantity))
|
||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[ _itemData.backData.itemId].ResourceID))
|
||||
Util.AddOnceClick(self.frameBtn, function()
|
||||
UIManager.OpenPanel(UIName.RewardTailsmanChipShowPopup, _itemData.backData.itemId, nil)
|
||||
end)
|
||||
end
|
||||
self.gameObject:GetComponent("RectTransform").localScale = Vector2.New(self.scale, self.scale)
|
||||
end
|
||||
|
|
@ -709,6 +715,13 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
|
|||
Util.AddOnceClick(self.frameBtn, function()
|
||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, itemSId,nil,self.isRewardItemPop,true)
|
||||
end)
|
||||
elseif itemDataConFig.ItemType == ItemType.Incarnation then
|
||||
--,5随机道具,6符文
|
||||
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[itemSId].Quantity))
|
||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[itemSId].ResourceID))
|
||||
Util.AddOnceClick(self.frameBtn, function()
|
||||
UIManager.OpenPanel(UIName.RewardTailsmanChipShowPopup, itemSId, nil)
|
||||
end)
|
||||
else
|
||||
--,5随机道具,6符文
|
||||
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[itemSId].Quantity))
|
||||
|
|
|
|||
Loading…
Reference in New Issue