xiyou_yueNanZhengshi
parent
c48d4e94c8
commit
f65cef243e
|
@ -278,5 +278,5 @@ MonoBehaviour:
|
|||
isUpdate: 0
|
||||
isSDK: 0
|
||||
isSDKLogin: 0
|
||||
isGuide: 1
|
||||
isOpenGM: 0
|
||||
isGuide: 0
|
||||
isOpenGM: 1
|
||||
|
|
|
@ -68,7 +68,7 @@ Material:
|
|||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _R: 0.1
|
||||
- _R: 0.100000024
|
||||
- _ScaleX: 0.5625
|
||||
- _ScaleY: 1
|
||||
- _SmoothnessTextureChannel: 0
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -43718,10 +43718,10 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 40
|
||||
m_FontSize: 30
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 4
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
|
@ -45393,10 +45393,10 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 48
|
||||
m_FontSize: 30
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 4
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 50
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
|
|
|
@ -17561,7 +17561,7 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 36
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
|
@ -23032,7 +23032,7 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 36
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
|
|
|
@ -1171,7 +1171,7 @@
|
|||
[11170] = GetLanguageStrById("装备成功!"),
|
||||
[11171] = GetLanguageStrById("卸下成功!"),
|
||||
[11172] = GetLanguageStrById("道具种类:"),
|
||||
[11173] = GetLanguageStrById(" (+%s解锁)"),
|
||||
[11173] = GetLanguageStrById("(+%s解锁)"),
|
||||
[11174] = GetLanguageStrById("天书套装天赋:"),
|
||||
[11175] = GetLanguageStrById("以下神将可装备:"),
|
||||
[11176] = GetLanguageStrById("未佩戴天书!"),
|
||||
|
|
|
@ -34,9 +34,9 @@ local curType = 0
|
|||
local dataList = {}
|
||||
local list = {}
|
||||
local colorText = {
|
||||
sprite = {[0] = "s_slbz_1anniuhuise", [1] = "s_slbz_1anniuongse", [2] = "s_slbz_1anniuhuangse"},
|
||||
color = {[0] = "3B3B3B", [1] = "855139", [2] = "8B670C"},
|
||||
text = {[0] = Language[10314], [1] = Language[10340], [2] = Language[10386]}
|
||||
sprite = { [0] = "s_slbz_1anniuhuise", [1] = "s_slbz_1anniuongse", [2] = "s_slbz_1anniuhuangse" },
|
||||
color = { [0] = "3B3B3B", [1] = "855139", [2] = "8B670C" },
|
||||
text = { [0] = Language[10314], [1] = Language[10340], [2] = Language[10386] }
|
||||
}
|
||||
local difficult = {
|
||||
text = {
|
||||
|
@ -78,15 +78,15 @@ function this:InitComponent()
|
|||
local v21 = Util.GetGameObject(self.gameObject, "Panel/Scroll"):GetComponent("RectTransform").rect
|
||||
this.ScrollView =
|
||||
SubUIManager.Open(
|
||||
SubUIConfig.ScrollCycleView,
|
||||
Util.GetGameObject(self.gameObject, "Panel/Scroll").transform,
|
||||
this.levelPre,
|
||||
nil,
|
||||
Vector2.New(v21.width, v21.height),
|
||||
1,
|
||||
1,
|
||||
Vector2.New(0, 15)
|
||||
)
|
||||
SubUIConfig.ScrollCycleView,
|
||||
Util.GetGameObject(self.gameObject, "Panel/Scroll").transform,
|
||||
this.levelPre,
|
||||
nil,
|
||||
Vector2.New(v21.width, v21.height),
|
||||
1,
|
||||
1,
|
||||
Vector2.New(0, 15)
|
||||
)
|
||||
this.ScrollView.moveTween.MomentumAmount = 1
|
||||
this.ScrollView.moveTween.Strength = 1
|
||||
this.prefab = Util.GetGameObject(self.gameObject, "ItemView")
|
||||
|
@ -129,7 +129,7 @@ this.RefreshPanel = function()
|
|||
end
|
||||
|
||||
function this:OnOpen(_type)
|
||||
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
|
||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||
curType = _type
|
||||
XuanYuanMirrorManager.curType = curType
|
||||
end
|
||||
|
@ -146,10 +146,10 @@ function this:SwitchView(isNotAni)
|
|||
this:SetLevelData(go, dataList[index])
|
||||
table.insert(list, go)
|
||||
end
|
||||
,true,isNotAni)
|
||||
, true, isNotAni)
|
||||
local t = 0
|
||||
for k,v in ipairs(dataList) do
|
||||
if v.state == 1 then
|
||||
for k, v in ipairs(dataList) do
|
||||
if v.state == 1 then
|
||||
t = k
|
||||
break
|
||||
end
|
||||
|
@ -188,6 +188,7 @@ function this:NewItemView(config, gameObject, ...)
|
|||
end
|
||||
return sub
|
||||
end
|
||||
|
||||
function this:playUIAnimsOnStart(gameObject)
|
||||
local anims = gameObject:GetComponentsInChildren(typeof(PlayFlyAnim))
|
||||
if anims.Length > 0 then
|
||||
|
@ -211,7 +212,7 @@ function this:SetLevelData(go, data)
|
|||
local costNumText = Util.GetGameObject(btnFight, "IconNum"):GetComponent("Text")
|
||||
costNumText.gameObject:SetActive(false)
|
||||
|
||||
local tip = Util.GetGameObject(go, "Tip"):GetComponent("Text")
|
||||
local tip = Util.GetGameObject(go, "Tip"):GetComponent("Text")
|
||||
tip.gameObject:SetActive(true)
|
||||
|
||||
local itemId = storeData.Cost[1][1] --消耗道具
|
||||
|
@ -229,14 +230,15 @@ function this:SetLevelData(go, data)
|
|||
costIcon.gameObject:SetActive(true)
|
||||
costIcon.sprite = SetIcon(this.spLoader, itemId)
|
||||
if BagManager.GetItemCountById(itemId) < costNum then
|
||||
costNumText.text =string.format("<color=#%s>%s</color>", "E23823", PrintWanNum2(costNum))
|
||||
costNumText.text = string.format("<color=#%s>%s</color>", "E23823", PrintWanNum2(costNum))
|
||||
else
|
||||
costNumText.text =string.format("<color=#%s>%s</color>", colorText.color[data.state], PrintWanNum2(costNum))
|
||||
costNumText.text = string.format("<color=#%s>%s</color>", colorText.color[data.state],
|
||||
PrintWanNum2(costNum))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Util.AddOnceClick(btnFight,function()
|
||||
Util.AddOnceClick(btnFight, function()
|
||||
if data.state == 0 then
|
||||
PopupTipPanel.ShowTip(Language[10396])
|
||||
else
|
||||
|
@ -245,35 +247,36 @@ function this:SetLevelData(go, data)
|
|||
PopupTipPanel.ShowTip(Language[10319])
|
||||
return
|
||||
end
|
||||
LogError("costnum==="..costNum)
|
||||
LogError("XuanYuanMirrorManager.freeTime="..XuanYuanMirrorManager.freeTime)
|
||||
LogError("costnum===" .. costNum)
|
||||
LogError("XuanYuanMirrorManager.freeTime=" .. XuanYuanMirrorManager.freeTime)
|
||||
if BagManager.GetItemCountById(itemId) < costNum and XuanYuanMirrorManager.freeTime <= 0 then
|
||||
PopupTipPanel.ShowTip(string.format(Language[10320], GetLanguageStrById(itemConfig[itemId].Name)))
|
||||
return
|
||||
end
|
||||
if data.state == 2 then
|
||||
end
|
||||
if data.state == 2 then
|
||||
if XuanYuanMirrorManager.freeTime <= 0 then
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.buyTimeId, 1)
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP, storeData.Id, 1, function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.buyTimeId, 1)
|
||||
end)
|
||||
end
|
||||
XuanYuanMirrorManager.ExecuteFightBattle(data.id,2,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.freeTimeId, 1)
|
||||
end
|
||||
XuanYuanMirrorManager.ExecuteFightBattle(data.id, 2, function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.freeTimeId, 1)
|
||||
CheckRedPointStatus(RedPointType.People_Mirror)
|
||||
this:OnShow(true)
|
||||
this:OnShow(true)
|
||||
end)
|
||||
elseif data.state == 1 then
|
||||
if XuanYuanMirrorManager.freeTime <= 0 then
|
||||
local func = function()
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeData.Id,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.buyTimeId, 1)
|
||||
local func = function()
|
||||
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP, storeData.Id, 1, function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.buyTimeId, 1)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.XUANYUAN_MIRROR, curType, data)
|
||||
end
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.XuanYuanBuyTimes,costNum,func,GetLanguageStrById(itemConfig[itemId].Name))
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.XuanYuanBuyTimes, costNum, func,
|
||||
GetLanguageStrById(itemConfig[itemId].Name))
|
||||
else
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.XUANYUAN_MIRROR, curType, data)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
@ -293,7 +296,7 @@ function this:SetLevelData(go, data)
|
|||
end
|
||||
rewards[n].gameObject:SetActive(true)
|
||||
local o = this:NewItemView(SubUIConfig.ItemView, rewards[n])
|
||||
o:OnOpen(false, {m.id, m.num}, 0.78, false)
|
||||
o:OnOpen(false, { m.id, m.num }, 0.78, false)
|
||||
local image = Util.GetGameObject(rewards[n].gameObject, "PreciousShow")
|
||||
image.gameObject:SetActive(true)
|
||||
Util.GetGameObject(image, "Text").gameObject:SetActive(false)
|
||||
|
@ -305,7 +308,7 @@ function this:SetLevelData(go, data)
|
|||
end
|
||||
rewards[n].gameObject:SetActive(true)
|
||||
local o = this:NewItemView(SubUIConfig.ItemView, rewards[n])
|
||||
o:OnOpen(false, {m.id, m.num}, 0.78, false)
|
||||
o:OnOpen(false, { m.id, m.num }, 0.78, false)
|
||||
local image = Util.GetGameObject(rewards[n].gameObject, "PreciousShow")
|
||||
image.gameObject:SetActive(false)
|
||||
elseif (data.state == 1 or data.state == 0) and m.israte == 2 then
|
||||
|
@ -314,7 +317,7 @@ function this:SetLevelData(go, data)
|
|||
end
|
||||
rewards[n].gameObject:SetActive(true)
|
||||
local o = this:NewItemView(SubUIConfig.ItemView, rewards[n])
|
||||
o:OnOpen(false, {m.id, m.num}, 0.78, false)
|
||||
o:OnOpen(false, { m.id, m.num }, 0.78, false)
|
||||
local image = Util.GetGameObject(rewards[n].gameObject, "PreciousShow")
|
||||
image.gameObject:SetActive(true)
|
||||
Util.GetGameObject(image, "Text").gameObject:SetActive(false)
|
||||
|
@ -322,37 +325,37 @@ function this:SetLevelData(go, data)
|
|||
end
|
||||
end
|
||||
end
|
||||
Util.GetGameObject(go, "Bg/BgQuality/title"):GetComponent("Text").text = ""--mirrors[data.type].id
|
||||
Util.GetGameObject(go, "Bg/BgQuality/title"):GetComponent("Text").text = "" --mirrors[data.type].id
|
||||
Util.GetGameObject(go, "Bg/BgQuality/difficult"):GetComponent("Text").text = difficult.text[data.difficulity]
|
||||
Util.GetGameObject(go, "Bg/BgQuality/Text"):GetComponent("Text").text = data.power
|
||||
Util.GetGameObject(go, "Bg/BgQuality/Text"):GetComponent("Text").text = GetLanguageStrById(data.power)
|
||||
if GetCurLanguage() == 2 then
|
||||
Util.GetGameObject(go,"Bg/BgQuality/title"):GetComponent("Text").fontSize = 28
|
||||
Util.GetGameObject(go,"Bg/BgQuality/difficult"):GetComponent("Text").fontSize = 28
|
||||
Util.GetGameObject(go,"Bg/BgQuality/power"):GetComponent("Text").fontSize = 28
|
||||
Util.GetGameObject(go, "Bg/BgQuality/title"):GetComponent("Text").fontSize = 28
|
||||
Util.GetGameObject(go, "Bg/BgQuality/difficult"):GetComponent("Text").fontSize = 28
|
||||
Util.GetGameObject(go, "Bg/BgQuality/power"):GetComponent("Text").fontSize = 28
|
||||
end
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function this:OnShow(...)
|
||||
local args = {...}
|
||||
local args = { ... }
|
||||
dataList = XuanYuanMirrorManager.GetMirrorLevelData(curType)
|
||||
this:RefreshTimes()
|
||||
this:RefreshTimes()
|
||||
local buyTimeId = XuanYuanMirrorManager.buyTimeId
|
||||
storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig, "StoreId", 7, "Limit", buyTimeId)
|
||||
local usedTimes=PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId)
|
||||
local privilegeTime=PrivilegeManager.GetPrivilegeNumber(buyTimeId)
|
||||
--商店表数据
|
||||
LogError("usedtimes=="..usedTimes.." privegetime=="..privilegeTime)
|
||||
local buyTimes = usedTimes>= privilegeTime and privilegeTime or usedTimes+1
|
||||
LogError("bugytimes=="..buyTimeId.." buytimes=="..buyTimes)
|
||||
if buyTimes==0 then
|
||||
costNum=0
|
||||
local usedTimes = PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId)
|
||||
local privilegeTime = PrivilegeManager.GetPrivilegeNumber(buyTimeId)
|
||||
--商店表数据
|
||||
LogError("usedtimes==" .. usedTimes .. " privegetime==" .. privilegeTime)
|
||||
local buyTimes = usedTimes >= privilegeTime and privilegeTime or usedTimes + 1
|
||||
LogError("bugytimes==" .. buyTimeId .. " buytimes==" .. buyTimes)
|
||||
if buyTimes == 0 then
|
||||
costNum = 0
|
||||
else
|
||||
costNum = storeData.Cost[2][buyTimes]
|
||||
end
|
||||
|
||||
LogError("-----------------costnum=="..costNum)
|
||||
this:SwitchView(args[1])
|
||||
|
||||
LogError("-----------------costnum==" .. costNum)
|
||||
this:SwitchView(args[1])
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
|
@ -388,4 +391,4 @@ function this:OnDestroy()
|
|||
this.ScrollView = nil
|
||||
end
|
||||
|
||||
return XuanYuanMirrorPanelList
|
||||
return XuanYuanMirrorPanelList
|
||||
|
|
|
@ -4,43 +4,43 @@ local this = ExpeditionMonsterInfoPopup
|
|||
--子模块脚本
|
||||
local contentScripts = {
|
||||
--招募
|
||||
[1] = {view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Recruit"), panelName = "ExpeditionMonsterInfo_Recruit",type=EXPEDITON_POPUP_TYPE.Recruit},
|
||||
[1] = { view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Recruit"), panelName = "ExpeditionMonsterInfo_Recruit", type = EXPEDITON_POPUP_TYPE.Recruit },
|
||||
--商店
|
||||
[2] = {view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Shop"), panelName = "ExpeditionMonsterInfo_Shop",type=EXPEDITON_POPUP_TYPE.Shop},
|
||||
[2] = { view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Shop"), panelName = "ExpeditionMonsterInfo_Shop", type = EXPEDITON_POPUP_TYPE.Shop },
|
||||
-- 普通 精英 boss 贪婪
|
||||
[3]= {view=require("Modules/Expedition/View/ExpeditionMonsterInfo_Monster"),panelName="ExpeditionMonsterInfo_Monster",type=EXPEDITON_POPUP_TYPE.Monster},
|
||||
[3] = { view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Monster"), panelName = "ExpeditionMonsterInfo_Monster", type = EXPEDITON_POPUP_TYPE.Monster },
|
||||
--试炼
|
||||
[4]= {view=require("Modules/Expedition/View/ExpeditionMonsterInfo_Trail"),panelName="ExpeditionMonsterInfo_Trail",type=EXPEDITON_POPUP_TYPE.Trail},
|
||||
[4] = { view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Trail"), panelName = "ExpeditionMonsterInfo_Trail", type = EXPEDITON_POPUP_TYPE.Trail },
|
||||
--贪婪
|
||||
[5]= {view=require("Modules/Expedition/View/ExpeditionMonsterInfo_Greed"),panelName="ExpeditionMonsterInfo_Greed",type=EXPEDITON_POPUP_TYPE.Greed},
|
||||
|
||||
[6]= {view=require("Modules/Expedition/View/MonsterCampFormationInfo"),panelName="MonsterCampFormationInfo",type = EXPEDITON_POPUP_TYPE.MonsterXinMo},
|
||||
[5] = { view = require("Modules/Expedition/View/ExpeditionMonsterInfo_Greed"), panelName = "ExpeditionMonsterInfo_Greed", type = EXPEDITON_POPUP_TYPE.Greed },
|
||||
|
||||
[6] = { view = require("Modules/Expedition/View/MonsterCampFormationInfo"), panelName = "MonsterCampFormationInfo", type = EXPEDITON_POPUP_TYPE.MonsterXinMo },
|
||||
-- 四灵试炼 boss
|
||||
[7]= {view=require("Modules/Expedition/View/MonsterFormationInfo"),panelName="MonsterFormationInfo",type = EXPEDITON_POPUP_TYPE.FourElementMonster},
|
||||
[7] = { view = require("Modules/Expedition/View/MonsterFormationInfo"), panelName = "MonsterFormationInfo", type = EXPEDITON_POPUP_TYPE.FourElementMonster },
|
||||
-- 七界试炼
|
||||
[8]= {view=require("Modules/QiJieShiLian/QiJieShiLianMonsterInfo"),panelName="QiJieMonsterFormationInfo",type = EXPEDITON_POPUP_TYPE.QiJieShiLianMonster},
|
||||
[8] = { view = require("Modules/QiJieShiLian/QiJieShiLianMonsterInfo"), panelName = "QiJieMonsterFormationInfo", type = EXPEDITON_POPUP_TYPE.QiJieShiLianMonster },
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
local contentPrefabs = {}
|
||||
--打开弹窗索引
|
||||
local index=0
|
||||
local index = 0
|
||||
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function ExpeditionMonsterInfoPopup:InitComponent()
|
||||
this.contents=Util.GetGameObject(this.gameObject,"Contents")
|
||||
this.BGImage1=Util.GetGameObject(this.gameObject,"Contents/BG/BGImage1")
|
||||
this.BGImage2=Util.GetGameObject(this.gameObject,"Contents/BG/BGImage2")
|
||||
this.mask = Util.GetGameObject(this.gameObject,"BgMask")
|
||||
this.contents = Util.GetGameObject(this.gameObject, "Contents")
|
||||
this.BGImage1 = Util.GetGameObject(this.gameObject, "Contents/BG/BGImage1")
|
||||
this.BGImage2 = Util.GetGameObject(this.gameObject, "Contents/BG/BGImage2")
|
||||
this.mask = Util.GetGameObject(this.gameObject, "BgMask")
|
||||
--this.backBtn=Util.GetGameObject(this.contents,"BackBtn")
|
||||
--子模块脚本初始化
|
||||
for i = 1, #contentScripts do
|
||||
contentScripts[i].view:InitComponent(Util.GetGameObject(this.contents, contentScripts[i].panelName))
|
||||
this.spLoader = SpriteLoader.New()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
end
|
||||
--预设赋值
|
||||
for i=1,#contentScripts do
|
||||
contentPrefabs[i]=Util.GetGameObject(this.contents,contentScripts[i].panelName)
|
||||
for i = 1, #contentScripts do
|
||||
contentPrefabs[i] = Util.GetGameObject(this.contents, contentScripts[i].panelName)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -50,8 +50,8 @@ function ExpeditionMonsterInfoPopup:BindEvent()
|
|||
contentScripts[i].view:BindEvent()
|
||||
end
|
||||
--返回按钮
|
||||
Util.AddClick(this.mask,function()
|
||||
self:ClosePanel()
|
||||
Util.AddClick(this.mask, function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -70,34 +70,30 @@ function ExpeditionMonsterInfoPopup:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function ExpeditionMonsterInfoPopup:OnOpen(popupType,...)
|
||||
function ExpeditionMonsterInfoPopup:OnOpen(popupType, ...)
|
||||
-- local args={...}
|
||||
-- popupType=args[1]
|
||||
--根据传入类型打开对应面板
|
||||
for i,v in pairs(contentScripts) do
|
||||
if popupType==v.type then
|
||||
index=i
|
||||
for i, v in pairs(contentScripts) do
|
||||
if popupType == v.type then
|
||||
index = i
|
||||
break
|
||||
end
|
||||
end
|
||||
for i=1,#contentPrefabs do
|
||||
for i = 1, #contentPrefabs do
|
||||
contentPrefabs[i].gameObject:SetActive(false)
|
||||
end
|
||||
this.BGImage1:SetActive(index == 1 or index == 2)
|
||||
this.BGImage2:SetActive(index == 3 or index == 4 or index == 5 or index == 6 or index == 7 or index == 8)
|
||||
contentPrefabs[index].gameObject:SetActive(true)
|
||||
contentScripts[index].view:OnShow(this,...)--1、传入自己 2、传入不定参
|
||||
contentScripts[index].view:OnShow(this, ...) --1、传入自己 2、传入不定参
|
||||
end
|
||||
|
||||
|
||||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function ExpeditionMonsterInfoPopup:OnShow()
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function ExpeditionMonsterInfoPopup:OnClose()
|
||||
for i = 1, #contentScripts do
|
||||
|
@ -109,8 +105,8 @@ end
|
|||
function ExpeditionMonsterInfoPopup:OnDestroy()
|
||||
for i = 1, #contentScripts do
|
||||
contentScripts[i].view:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
this.spLoader:Destroy()
|
||||
end
|
||||
end
|
||||
|
||||
return ExpeditionMonsterInfoPopup
|
||||
return ExpeditionMonsterInfoPopup
|
||||
|
|
|
@ -23,8 +23,8 @@ function FightSmallChoosePanel:InitComponent()
|
|||
self.BtnBack = Util.GetGameObject(self.transform, "btnBack")
|
||||
self.worldBtn = Util.GetGameObject(self.transform, "worldBtn")
|
||||
self.curMapBg = Util.GetGameObject(self.gameObject, "curMap/curMapBg"):GetComponent("Image")
|
||||
for i=1, 20 do
|
||||
smallListGo[i] = Util.GetGameObject(self.gameObject, "curMap/curMapBg/mapAreaPre (".. i ..")")
|
||||
for i = 1, 20 do
|
||||
smallListGo[i] = Util.GetGameObject(self.gameObject, "curMap/curMapBg/mapAreaPre (" .. i .. ")")
|
||||
end
|
||||
self.selectMap = Util.GetGameObject(self.gameObject, "curMap/selectMap")
|
||||
|
||||
|
@ -51,12 +51,11 @@ end
|
|||
|
||||
--绑定事件(用于子类重写)
|
||||
function FightSmallChoosePanel:BindEvent()
|
||||
|
||||
Util.AddClick(self.BtnBack, function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(self.worldBtn, function()
|
||||
UIManager.OpenPanel(UIName.FightMiddleChoosePanel,curSmallFightId,false)
|
||||
UIManager.OpenPanel(UIName.FightMiddleChoosePanel, curSmallFightId, false)
|
||||
end)
|
||||
end
|
||||
|
||||
|
@ -72,26 +71,24 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function FightSmallChoosePanel:OnOpen(smallFightId)
|
||||
|
||||
curSmallFightId = smallFightId
|
||||
curMiddleFightId = math.floor(smallFightId/1000)
|
||||
difficultType = smallFightId%10
|
||||
curMiddleFightId = math.floor(smallFightId / 1000)
|
||||
difficultType = smallFightId % 10
|
||||
-- Log("打开关卡 "..smallFightId .." 章节id ".. curMiddleFightId .. " 难度 ".. difficultType)
|
||||
end
|
||||
|
||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||
function FightSmallChoosePanel:OnShow()
|
||||
|
||||
--self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
|
||||
self:OnShowPanelData()
|
||||
SoundManager.PlaySound(SoundConfig.Sound_LittleMap)
|
||||
|
||||
|
||||
if self.liveNode then
|
||||
self.liveNode:OnClose()
|
||||
end
|
||||
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),self.sortingOrder)
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
|
||||
if FightPointPassManager.GetRoleDirection()==1 then
|
||||
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"), self.sortingOrder)
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4, Vector3.New(0, 40, 0))
|
||||
if FightPointPassManager.GetRoleDirection() == 1 then
|
||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
||||
else
|
||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_RIGHT)
|
||||
|
@ -115,9 +112,9 @@ function FightSmallChoosePanel:OnShowPanelData()
|
|||
-- end
|
||||
-- end
|
||||
if self.liveNode == nil then
|
||||
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"),1)
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4,Vector3.New(0,40,0))
|
||||
if FightPointPassManager.GetRoleDirection()==1 then
|
||||
self.liveNode = PlayerLiveView:New(Util.GetGameObject(self.selectMap, "pos"), 1)
|
||||
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale4, Vector3.New(0, 40, 0))
|
||||
if FightPointPassManager.GetRoleDirection() == 1 then
|
||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)
|
||||
else
|
||||
self.liveNode:SetWalkDir(WALK_DIR.RUN_RIGHT)
|
||||
|
@ -128,7 +125,8 @@ function FightSmallChoosePanel:OnShowPanelData()
|
|||
self.curMapBg.sprite = self.spLoader:LoadSprite(curMiddleConFigData.ChapterBg)
|
||||
self.curMapBg:SetNativeSize()
|
||||
self.curMapBg.transform.localScale = Vector3.one
|
||||
self.curMapBg.transform.localPosition = Vector3.New(curMiddleConFigData.ChapterBgPos[1],curMiddleConFigData.ChapterBgPos[2],0)
|
||||
self.curMapBg.transform.localPosition = Vector3.New(curMiddleConFigData.ChapterBgPos[1],
|
||||
curMiddleConFigData.ChapterBgPos[2], 0)
|
||||
|
||||
curDifficulSData = {}
|
||||
if difficultType == FightDifficultyState.SimpleLevel then
|
||||
|
@ -145,11 +143,11 @@ function FightSmallChoosePanel:OnShowPanelData()
|
|||
for i = 1, math.max(#curDifficulSData, #smallListGo) do
|
||||
local go = smallListGo[i]
|
||||
if not go then
|
||||
go=newObject(smallListGo[1])
|
||||
go = newObject(smallListGo[1])
|
||||
go.transform:SetParent(Util.GetGameObject(self.gameObject, "curMap/curMapBg").transform)
|
||||
go.transform.localScale = Vector3.one
|
||||
go.transform.localPosition=Vector3.zero;
|
||||
go.gameObject.name = "mapAreaPre (".. i ..")"
|
||||
go.transform.localPosition = Vector3.zero;
|
||||
go.gameObject.name = "mapAreaPre (" .. i .. ")"
|
||||
smallListGo[i] = go
|
||||
end
|
||||
go.gameObject:SetActive(false)
|
||||
|
@ -165,28 +163,34 @@ function FightSmallChoosePanel:OnShowPanelData()
|
|||
self.chapterInfo:SetActive(true)
|
||||
end
|
||||
--章节文字显示
|
||||
self.titleText.text = GetLanguageStrById(curMiddleConFigData.Name) .."·"..NumToComplexFont[curMiddleFightId]
|
||||
self.titleText.text = GetLanguageStrById(curMiddleConFigData.Name) .. "·" .. NumToComplexFont[curMiddleFightId]
|
||||
local descs = string.split(GetLanguageStrById(curMiddleConFigData.info), "#")
|
||||
for i = 1, #chaterInfoList do
|
||||
chaterInfoList[i].text = descs[i] or ""
|
||||
end
|
||||
end
|
||||
|
||||
function FightSmallChoosePanel:SingleSmallFightShow(indext)
|
||||
smallListGo[indext]:SetActive(true)
|
||||
local curSmallFightConFig = mainLevelConfig[curDifficulSData[indext]]
|
||||
smallListGo[indext]:GetComponent("RectTransform").anchoredPosition = Vector2.New(curSmallFightConFig.LevelPointPosition[1], curSmallFightConFig.LevelPointPosition[2])
|
||||
Util.GetGameObject(smallListGo[indext].transform, "icon"):SetActive((math.floor((curSmallFightConFig.Id%100)/10))%5 ~= 0)
|
||||
Util.GetGameObject(smallListGo[indext].transform, "icon2"):SetActive((math.floor((curSmallFightConFig.Id%100)/10))%5 == 0)
|
||||
smallListGo[indext]:GetComponent("RectTransform").anchoredPosition = Vector2.New(
|
||||
curSmallFightConFig.LevelPointPosition[1], curSmallFightConFig.LevelPointPosition[2])
|
||||
Util.GetGameObject(smallListGo[indext].transform, "icon"):SetActive((math.floor((curSmallFightConFig.Id % 100) / 10)) %
|
||||
5 ~= 0)
|
||||
Util.GetGameObject(smallListGo[indext].transform, "icon2"):SetActive((math.floor((curSmallFightConFig.Id % 100) / 10)) %
|
||||
5 == 0)
|
||||
if curSmallFightConFig.Id == curSmallFightId then
|
||||
self:SelectRenPos(smallListGo[indext])
|
||||
end
|
||||
end
|
||||
|
||||
function FightSmallChoosePanel:SelectRenPos(_parent)
|
||||
self.selectMap.transform:SetParent(_parent.transform.parent)
|
||||
self.selectMap.transform.localPosition = _parent.transform.localPosition
|
||||
self.selectMap.transform.localScale = Vector3.one
|
||||
--self.selectMap.transform.localPosition = Vector3.zero
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FightSmallChoosePanel:OnClose()
|
||||
end
|
||||
|
@ -206,4 +210,4 @@ function FightSmallChoosePanel:OnDestroy()
|
|||
-- end
|
||||
end
|
||||
|
||||
return FightSmallChoosePanel
|
||||
return FightSmallChoosePanel
|
||||
|
|
|
@ -96,7 +96,7 @@ function PracticeStatePreview:SetSingleData(index, _go, _data)
|
|||
end
|
||||
if _data.RealmDesc then
|
||||
specialText.gameObject:SetActive(true)
|
||||
specialText.text = GetLanguageStrById(GetLanguageStrById(_data.RealmDesc))
|
||||
specialText.text = GetLanguageStrById(_data.RealmDesc)
|
||||
if _data.IsActive == 1 or _data.IsActive == 2 then
|
||||
specialText.text = string.format("<color=#1CC853>%s</color>", GetLanguageStrById(_data.RealmDesc))
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
--传入父脚本模块
|
||||
local parent
|
||||
--传入特效层级
|
||||
local sortingOrder=0
|
||||
local sortingOrder = 0
|
||||
local QiJieStageBuff = ConfigManager.GetConfig(ConfigName.QijieStageBuff)
|
||||
--初始化组件(用于子类重写)
|
||||
function this:InitComponent(gameObject)
|
||||
|
@ -24,10 +24,10 @@ function this:RemoveListener()
|
|||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function this:OnShow(_parent,...)
|
||||
parent=_parent
|
||||
function this:OnShow(_parent, ...)
|
||||
parent = _parent
|
||||
sortingOrder = _parent.sortingOrder
|
||||
local _args = {...}
|
||||
local _args = { ... }
|
||||
local data = _args[1]
|
||||
local pos = _args[2]
|
||||
if pos then
|
||||
|
@ -36,7 +36,7 @@ function this:OnShow(_parent,...)
|
|||
if not this.addTextList then
|
||||
this.addTextList = {}
|
||||
end
|
||||
for k,v in ipairs(this.addTextList) do
|
||||
for k, v in ipairs(this.addTextList) do
|
||||
v.gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1, #data.Buff do
|
||||
|
@ -48,16 +48,16 @@ function this:OnShow(_parent,...)
|
|||
this.addTextList[i].transform.localPosition = Vector3.zero
|
||||
end
|
||||
this.addTextList[i]:SetActive(true)
|
||||
local str = QiJieStageBuff[attri].Describe
|
||||
local str = GetLanguageStrById(QiJieStageBuff[attri].Describe)
|
||||
this.addTextList[i]:GetComponent("Text").text = str
|
||||
this.addTextList[i]:GetComponent("Text").text = string.format("<color=#2E2929>·%s</color>",str)
|
||||
this.addTextList[i]:GetComponent("Text").text = string.format("<color=#2E2929>·%s</color>", str)
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function this:OnClose()
|
||||
if parent then
|
||||
parent.contents:GetComponent("RectTransform").localPosition = Vector2(0,0)
|
||||
parent.contents:GetComponent("RectTransform").localPosition = Vector2(0, 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -66,4 +66,4 @@ function this:OnDestroy()
|
|||
this.addTextList = {}
|
||||
end
|
||||
|
||||
return this
|
||||
return this
|
||||
|
|
|
@ -310,18 +310,22 @@ function GodPrintPopUp:RefreshShow(_type)
|
|||
elseif index == 2 then
|
||||
if equipConfig[soulId].Star >= index - 1 then
|
||||
stringInfo = stringInfo ..
|
||||
"<color=#44C853>" .. curStr .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
"<color=#44C853>" ..
|
||||
curStr .. " " .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
else
|
||||
stringInfo = stringInfo ..
|
||||
"<color=#725949>" .. curStr .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
"<color=#725949>" ..
|
||||
curStr .. " " .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
end
|
||||
else
|
||||
if equipConfig[soulId].Star >= index - 1 then
|
||||
stringInfo = stringInfo ..
|
||||
"<color=#44C853>" .. curStr .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
"<color=#44C853>" ..
|
||||
curStr .. " " .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
else
|
||||
stringInfo = stringInfo ..
|
||||
"<color=#725949>" .. curStr .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
"<color=#725949>" ..
|
||||
curStr .. " " .. string.format(Language[11173], index - 1) .. "</color>\n"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,7 +19,7 @@ function RewardGemSingleShowPopup:InitComponent()
|
|||
|
||||
this.topBar = Util.GetGameObject(self.transform, "bg/topBar")
|
||||
this.itemPos = Util.GetGameObject(self.transform, "bg/topBar/armor/itemPos")
|
||||
this.itemView = SubUIManager.Open(SubUIConfig.ItemView,this.itemPos.transform)
|
||||
this.itemView = SubUIManager.Open(SubUIConfig.ItemView, this.itemPos.transform)
|
||||
this.armorType = Util.GetGameObject(self.transform, "bg/topBar/armor/info/armorType"):GetComponent("Text")
|
||||
this.armorLanTuNum = Util.GetGameObject(self.transform, "bg/topBar/armor/info/armorLanTuNum"):GetComponent("Text")
|
||||
this.effectbaijin = Util.GetGameObject(self.topBar, "fx_zhuangbeijiemian")
|
||||
|
@ -28,13 +28,14 @@ function RewardGemSingleShowPopup:InitComponent()
|
|||
this.itemName = Util.GetGameObject(this.info, "name"):GetComponent("Text")
|
||||
this.armorTitle = Util.GetGameObject(this.info, "armorTitle"):GetComponent("Text")
|
||||
this.armorDesc = Util.GetGameObject(this.info, "armorDesc"):GetComponent("Text")
|
||||
this.equipQuaText = Util.GetGameObject(self.transform, "bg/topBar/armor/equipQuaText"):GetComponent("Text")
|
||||
this.equipQuaText = Util.GetGameObject(self.transform, "bg/topBar/armor/equipQuaText"):GetComponent("Text")
|
||||
this.armorInfo = Util.GetGameObject(self.transform, "bg/topBar/armorInfo")
|
||||
this.armorInfoText = Util.GetGameObject(self.transform, "bg/topBar/armorInfo"):GetComponent("Text")
|
||||
this.howGet = Util.GetGameObject(self.transform, "bg/midBar/layout1")
|
||||
this.scroll = Util.GetGameObject(self.transform, "bg/midBar/scroll")
|
||||
this.equipProGrid = Util.GetGameObject(self.transform, "bg/midBar/scroll/grid")
|
||||
this.equipProGridCom = Util.GetGameObject(self.transform, "bg/midBar/scroll/grid"):GetComponent("VerticalLayoutGroup")
|
||||
this.equipProGridCom = Util.GetGameObject(self.transform, "bg/midBar/scroll/grid"):GetComponent(
|
||||
"VerticalLayoutGroup")
|
||||
this.bottomBar = Util.GetGameObject(self.transform, "bg/bottomBar")
|
||||
this.btnSure = Util.GetGameObject(self.transform, "bg/bottomBar/btnSure")
|
||||
this.btnJump = Util.GetGameObject(self.transform, "bg/bottomBar/btnJump")
|
||||
|
@ -47,12 +48,10 @@ function RewardGemSingleShowPopup:InitComponent()
|
|||
this.proPre = Util.GetGameObject(this.proGrid, "proName")
|
||||
this.proPre:SetActive(false)
|
||||
this.proList = {}
|
||||
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function RewardGemSingleShowPopup:BindEvent()
|
||||
|
||||
Util.AddClick(this.BtnBack, function()
|
||||
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
|
||||
PlayerManager.RewardItemSingleShowPopupIsRoleUpStarLayout2 = false
|
||||
|
@ -63,31 +62,31 @@ function RewardGemSingleShowPopup:BindEvent()
|
|||
PlayerManager.RewardItemSingleShowPopupIsRoleUpStarLayout2 = false
|
||||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(this.btnUse, function()--使用跳转
|
||||
Util.AddClick(this.btnUse, function() --使用跳转
|
||||
JumpManager.GoJump(40056)
|
||||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(this.btnClose, function()--替换,穿戴
|
||||
Util.AddClick(this.btnClose, function() --替换,穿戴
|
||||
self:ClosePanel()
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.SelectGem,this.gemType,this.position)
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.SelectGem, this.gemType, this.position)
|
||||
end)
|
||||
Util.AddClick(this.btnSure, function()--卸下命石
|
||||
NetManager.LifeGridChangeRequest(2,this.gemType,this.position,itemSid,function ()
|
||||
Util.AddClick(this.btnSure, function() --卸下命石
|
||||
NetManager.LifeGridChangeRequest(2, this.gemType, this.position, itemSid, function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Gem.RefreshPanel)
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end)
|
||||
Util.AddClick(this.btnJump, function()--合成
|
||||
if this.openType == 2 then--命格界面中
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.GemCompound,itemSid,this.position)
|
||||
Util.AddClick(this.btnJump, function() --合成
|
||||
if this.openType == 2 then --命格界面中
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.GemCompound, itemSid, this.position)
|
||||
self:ClosePanel()
|
||||
elseif this.openType == 1 then--背包中
|
||||
elseif this.openType == 1 then --背包中
|
||||
local num = BagManager.GetTotalItemNum(itemSid)
|
||||
if num/gemConfig[itemSid].UpgradeNum >= 2 then
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.GemMoreCom,itemSid,num)
|
||||
if num / gemConfig[itemSid].UpgradeNum >= 2 then
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.GemMoreCom, itemSid, num)
|
||||
self:ClosePanel()
|
||||
else
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.GemCompound,itemSid,nil)
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.GemCompound, itemSid, nil)
|
||||
self:ClosePanel()
|
||||
end
|
||||
end
|
||||
|
@ -105,7 +104,7 @@ function RewardGemSingleShowPopup:RemoveListener()
|
|||
end
|
||||
|
||||
function RewardGemSingleShowPopup:OnSortingOrderChange()
|
||||
Util.SetParticleSortLayer(this.effectbaijin,self.sortingOrder + 1)
|
||||
Util.SetParticleSortLayer(this.effectbaijin, self.sortingOrder + 1)
|
||||
end
|
||||
|
||||
--界面打开时调用(用于子类重写)
|
||||
|
@ -124,9 +123,10 @@ function RewardGemSingleShowPopup:OnOpen(...)
|
|||
this.position = data[5]
|
||||
end
|
||||
end
|
||||
|
||||
function RewardGemSingleShowPopup:OnShow()
|
||||
Log("itemSid:"..tostring(itemSid))
|
||||
this.itemName.text =GetLanguageStrById(itemData.config.Name)-- GetStringByEquipQua(itemData.config.Quality, GetLanguageStrById(itemData.config.Name))
|
||||
Log("itemSid:" .. tostring(itemSid))
|
||||
this.itemName.text = GetLanguageStrById(itemData.config.Name) -- GetStringByEquipQua(itemData.config.Quality, GetLanguageStrById(itemData.config.Name))
|
||||
--LogError(GetStringByEquipQua(itemConfigData.Quantity, GetLanguageStrById(itemConfigData.Name)))
|
||||
--this.topBar:GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_di_"..itemData.itemConfig.Quality)
|
||||
this.topBar:GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_di_4")
|
||||
|
@ -137,21 +137,21 @@ function RewardGemSingleShowPopup:OnShow()
|
|||
this.btnJump:SetActive(false)
|
||||
this.bottomBar:SetActive(false)
|
||||
this.btnUse:SetActive(false)
|
||||
if this.openType == 1 then--背包中打开
|
||||
if this.openType == 1 then --背包中打开
|
||||
this.howGet:SetActive(true)
|
||||
this.scroll:SetActive(true)
|
||||
this.btnJump:SetActive(false)
|
||||
this.bottomBar:SetActive(true)
|
||||
this.btnUse:SetActive(true)
|
||||
elseif this.openType == 2 then--装备命石时打开
|
||||
elseif this.openType == 2 then --装备命石时打开
|
||||
this.btnClose:SetActive(true)
|
||||
this.btnSure:SetActive(true)
|
||||
this.btnJump:SetActive(true)
|
||||
this.bottomBar:SetActive(true)
|
||||
if gemConfig[itemSid].Level == 10 then--十级命石不显示合成
|
||||
if gemConfig[itemSid].Level == 10 then --十级命石不显示合成
|
||||
this.btnJump:SetActive(false)
|
||||
end
|
||||
elseif this.openType == 3 then--itemview打开
|
||||
elseif this.openType == 3 then --itemview打开
|
||||
this.howGet:SetActive(true)
|
||||
this.scroll:SetActive(true)
|
||||
this.bottomBar:SetActive(false)
|
||||
|
@ -162,21 +162,21 @@ function RewardGemSingleShowPopup:OnShow()
|
|||
local creatJumpData = function(jumpDataList)
|
||||
local jumpSortData = {}
|
||||
if jumpDataList and #jumpDataList > 0 then
|
||||
for i = 1, #jumpDataList do--为关卡跳转做的排序数据
|
||||
for i = 1, #jumpDataList do --为关卡跳转做的排序数据
|
||||
local jumpData = {}
|
||||
jumpData.id = jumpDataList[i]
|
||||
jumpData.data = JumpConfig[jumpDataList[i]]
|
||||
table.insert(jumpSortData,jumpData)
|
||||
table.insert(jumpSortData, jumpData)
|
||||
end
|
||||
end
|
||||
return jumpSortData
|
||||
end
|
||||
|
||||
|
||||
if this.jumpViewList and #this.jumpViewList > 0 then
|
||||
for i = 1,#this.jumpViewList do
|
||||
for i = 1, #this.jumpViewList do
|
||||
SubUIManager.Close(this.jumpViewList[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
this.jumpViewList = {}
|
||||
|
||||
this.equipQuaText.gameObject:SetActive(true)
|
||||
|
@ -185,28 +185,30 @@ function RewardGemSingleShowPopup:OnShow()
|
|||
this.armorTitle.gameObject:SetActive(false)
|
||||
this.armorDesc.gameObject:SetActive(false)
|
||||
this.armorType.gameObject:SetActive(true)
|
||||
this.armorLanTuNum.text = ""--Language[12192] .. BagManager.GetItemCountById(itemSid)
|
||||
this.armorLanTuNum.text = "" --Language[12192] .. BagManager.GetItemCountById(itemSid)
|
||||
this.armorLanTuNum.gameObject:SetActive(this.openType ~= 2)
|
||||
this.armorType.text ="" --this.getType()--道具类型显示
|
||||
this.armorInfoText.text ="" --string.gsub(GetLanguageStrById(itemConfigData.ItemDescribe), "\\n", "")
|
||||
this.effectbaijin:SetActive(itemData.config.Quality==7)
|
||||
Util.SetParticleSortLayer(this.effectbaijin,self.sortingOrder + 1)
|
||||
this.armorType.text = "" --this.getType()--道具类型显示
|
||||
this.armorInfoText.text = "" --string.gsub(GetLanguageStrById(itemConfigData.ItemDescribe), "\\n", "")
|
||||
this.effectbaijin:SetActive(itemData.config.Quality == 7)
|
||||
Util.SetParticleSortLayer(this.effectbaijin, self.sortingOrder + 1)
|
||||
--显示跳转
|
||||
local jumpDataList = {} --itemConfigData.Jump
|
||||
local jumpSortData = creatJumpData(jumpDataList)
|
||||
for i = 1, #jumpSortData do
|
||||
-- type 大于 10000为活动 直接显示按钮,如果小于1000 为功能 开启才显示
|
||||
if jumpSortData[i].id > 0 and (JumpConfig[jumpSortData[i].id].Type >= 10000 or ActTimeCtrlManager.SingleFuncState(JumpConfig[jumpSortData[i].id].Type)) then
|
||||
local tempView = SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,true,self)
|
||||
local tempView = SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,
|
||||
true, self)
|
||||
if tempView then
|
||||
table.insert(this.jumpViewList,tempView)
|
||||
table.insert(this.jumpViewList, tempView)
|
||||
end
|
||||
end
|
||||
end
|
||||
this.scroll:GetComponent("RectTransform").sizeDelta = Vector2.New(912.8,600)
|
||||
this.scroll:GetComponent("RectTransform").sizeDelta = Vector2.New(912.8, 600)
|
||||
this.equipProGridCom.spacing = 130
|
||||
if jumpDataList and #jumpDataList then
|
||||
this.equipProGrid:GetComponent("RectTransform").sizeDelta = Vector2.New(807.7,this.equipProGridCom.spacing*(#jumpDataList))
|
||||
this.equipProGrid:GetComponent("RectTransform").sizeDelta = Vector2.New(807.7,
|
||||
this.equipProGridCom.spacing * (#jumpDataList))
|
||||
end
|
||||
this.itemView:OnOpen(true, itemData, 1.1, false, false, false, self.sortingOrder)
|
||||
|
||||
|
@ -220,13 +222,13 @@ function this.RedPointCheck()
|
|||
if this.openType == 2 then
|
||||
local numInBag = BagManager.GetTotalItemNum(itemSid)
|
||||
local redPointData = GemManager.GetGemsFromBagByType(gemConfig[itemSid].Type)
|
||||
for key, value in pairs(redPointData) do--红点检测更换
|
||||
for key, value in pairs(redPointData) do --红点检测更换
|
||||
if value.id > itemSid then
|
||||
this.closeRed:SetActive(true)
|
||||
break
|
||||
end
|
||||
end
|
||||
for key, value in pairs(redPointData) do--红点检测合成
|
||||
for key, value in pairs(redPointData) do --红点检测合成
|
||||
if numInBag + 1 >= gemConfig[itemSid].UpgradeNum and gemConfig[itemSid].NextGem > 0 then
|
||||
this.jumpRed:SetActive(true)
|
||||
break
|
||||
|
@ -243,24 +245,25 @@ function this.SetGemProperty()
|
|||
for i = 1, #data do
|
||||
local go = this.proList[i]
|
||||
if not go then
|
||||
go = newObjToParent(this.proPre,this.proGrid)
|
||||
go = newObjToParent(this.proPre, this.proGrid)
|
||||
this.proList[i] = go
|
||||
end
|
||||
go:SetActive(true)
|
||||
local str=""
|
||||
local add=""
|
||||
if data[i][2]==itemData.config.MaxProperty then
|
||||
add=string.format(" <color=#529764FF>%s</color>","(Max)")
|
||||
local str = ""
|
||||
local add = ""
|
||||
if data[i][2] == itemData.config.MaxProperty then
|
||||
add = string.format(" <color=#529764FF>%s</color>", "(Max)")
|
||||
else
|
||||
add=string.format(" <color=#529764FF>%s</color>","("..string.format("%.2f",data[i][2]/itemData.config.MaxProperty*100).."%)")
|
||||
add = string.format(" <color=#529764FF>%s</color>",
|
||||
"(" .. string.format("%.2f", data[i][2] / itemData.config.MaxProperty * 100) .. "%)")
|
||||
end
|
||||
if PropertyConfig[data[i][1]].Style==1 then
|
||||
str=string.format( "%s+%s",PropertyConfig[data[i][1]].Info,data[i][2])
|
||||
elseif PropertyConfig[data[i][1]].Style==2 then
|
||||
LogError("data[i][2]=============="..data[i][2])
|
||||
str=string.format( "%s+%s",PropertyConfig[data[i][1]].Info,data[i][2]/100).."%"
|
||||
if PropertyConfig[data[i][1]].Style == 1 then
|
||||
str = string.format("%s+%s", GetLanguageStrById(PropertyConfig[data[i][1]].Info), data[i][2])
|
||||
elseif PropertyConfig[data[i][1]].Style == 2 then
|
||||
LogError("data[i][2]==============" .. data[i][2])
|
||||
str = string.format("%s+%s", GetLanguageStrById(PropertyConfig[data[i][1]].Info), data[i][2] / 100) .. "%"
|
||||
end
|
||||
go:GetComponent("Text").text = str..add
|
||||
go:GetComponent("Text").text = str .. add
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -268,24 +271,24 @@ end
|
|||
function this.getType()
|
||||
local type = itemConfig[itemSid].ItemBaseType
|
||||
if type == 1 then
|
||||
return Language[11172]..Language[10256]
|
||||
return Language[11172] .. Language[10256]
|
||||
elseif type == 2 then
|
||||
return Language[11172]..Language[10228]
|
||||
return Language[11172] .. Language[10228]
|
||||
elseif type == 4 then
|
||||
return Language[11172]..Language[12193]
|
||||
return Language[11172] .. Language[12193]
|
||||
elseif type == 5 then
|
||||
return Language[11172]..Language[12194]
|
||||
return Language[11172] .. Language[12194]
|
||||
elseif type == 6 then
|
||||
return Language[11172]..Language[10452]
|
||||
return Language[11172] .. Language[10452]
|
||||
elseif type == 7 then
|
||||
return Language[11172]..Language[12195]
|
||||
return Language[11172] .. Language[12195]
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function RewardGemSingleShowPopup:OnClose()
|
||||
if this.jumpViewList and #this.jumpViewList > 0 then
|
||||
for i = 1,#this.jumpViewList do
|
||||
for i = 1, #this.jumpViewList do
|
||||
SubUIManager.Close(this.jumpViewList[i])
|
||||
end
|
||||
end
|
||||
|
@ -296,7 +299,7 @@ end
|
|||
function RewardGemSingleShowPopup:OnDestroy()
|
||||
SubUIManager.Close(this.itemView)
|
||||
if this.jumpViewList and #this.jumpViewList > 0 then
|
||||
for i = 1,#this.jumpViewList do
|
||||
for i = 1, #this.jumpViewList do
|
||||
SubUIManager.Close(this.jumpViewList[i])
|
||||
end
|
||||
end
|
||||
|
@ -305,16 +308,17 @@ function RewardGemSingleShowPopup:OnDestroy()
|
|||
this.gemType = nil
|
||||
this.position = nil
|
||||
this.spLoader:Destroy()
|
||||
|
||||
end
|
||||
function this.WarPowerChange(oldPowerNum,type)
|
||||
|
||||
function this.WarPowerChange(oldPowerNum, type)
|
||||
-- 设置脏数据
|
||||
HeroPropManager.SetFuncPropDirty(Func_Prop_Type.PlayerExtra)
|
||||
--
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.OnBagShowWarPowerChange,oldPowerNum,type)
|
||||
--
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.OnBagShowWarPowerChange, oldPowerNum, type)
|
||||
local newPowerNum = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
|
||||
if oldPowerNum ~= newPowerNum then
|
||||
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldPowerNum,newValue = newPowerNum})
|
||||
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2, { oldValue = oldPowerNum, newValue = newPowerNum })
|
||||
end
|
||||
end
|
||||
return RewardGemSingleShowPopup
|
||||
|
||||
return RewardGemSingleShowPopup
|
||||
|
|
|
@ -508,15 +508,19 @@ function RewardTalismanSingleShowPopup2:SetSkillShow(_infos, _preList, _grid, _l
|
|||
local str = ""
|
||||
if self.position > 6 then
|
||||
if value.lv <= _lv then
|
||||
str = "<color=#1CC853>" .. proper.Desc .. " (" .. value.lv .. Language[12233] .. "</color>"
|
||||
str = "<color=#1CC853>" ..
|
||||
GetLanguageStrById(proper.Desc) .. " (" .. value.lv .. Language[12233] .. "</color>"
|
||||
else
|
||||
str = "<color=#828282>" .. proper.Desc .. " (" .. value.lv .. Language[12233] .. "</color>"
|
||||
str = "<color=#828282>" ..
|
||||
GetLanguageStrById(proper.Desc) .. " (" .. value.lv .. Language[12233] .. "</color>"
|
||||
end
|
||||
else
|
||||
if value.lv <= _lv then
|
||||
str = "<color=#1CC853>" .. proper.Desc .. Language[12234] .. value.lv .. Language[12235] .. "</color>"
|
||||
str = "<color=#1CC853>" ..
|
||||
GetLanguageStrById(proper.Desc) .. Language[12234] .. value.lv .. Language[12235] .. "</color>"
|
||||
else
|
||||
str = "<color=#828282>" .. proper.Desc .. Language[12234] .. value.lv .. Language[12235] .. "</color>"
|
||||
str = "<color=#828282>" ..
|
||||
GetLanguageStrById(proper.Desc) .. Language[12234] .. value.lv .. Language[12235] .. "</color>"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -569,7 +573,7 @@ function RewardTalismanSingleShowPopup2:SetPropertyShow1(_infos, _preList, _grid
|
|||
end
|
||||
else
|
||||
str = str ..
|
||||
GetLanguageStrById(proper.Info) .. "+" .. value.currValue .. string.format(Language[12236], 0, 0)
|
||||
GetLanguageStrById(proper.Info) .. "+" .. value.currValue .. string.format(Language[12236], 0, 0)
|
||||
end
|
||||
obj.transform:GetComponent("Text").text = str
|
||||
obj.gameObject:SetActive(true)
|
||||
|
@ -624,7 +628,9 @@ function RewardTalismanSingleShowPopup2:SetPropertyShow2(_infos, _preList, _grid
|
|||
else
|
||||
string = "<color=#828282>" ..
|
||||
string ..
|
||||
"\n" .. "<size=25>" .. string.format(Language[12237], GetLanguageStrById(attriConfig[index][2])) .. "</size></color>"
|
||||
"\n" ..
|
||||
"<size=25>" ..
|
||||
string.format(Language[12237], GetLanguageStrById(attriConfig[index][2])) .. "</size></color>"
|
||||
end
|
||||
obj.transform:GetComponent("Text").text = string
|
||||
obj.gameObject:SetActive(true)
|
||||
|
|
|
@ -16,9 +16,9 @@ function this.Initialize()
|
|||
this.HeroWithImprintList = {} --英雄身上的神印
|
||||
this.PointsData = {}
|
||||
this.LinesData = {}
|
||||
this.FourQuadrantData = {} --四象心法数据
|
||||
this.FourQuadrantData = {} --四象心法数据
|
||||
this.fourQuadrantUpStarPropMap = {} --四象心法进阶属性加成(职业id:<属性id:属性值>)
|
||||
this.playerSkillList = {} --主角技能列表
|
||||
this.playerSkillList = {} --主角技能列表
|
||||
this.CultivationLevel = 0
|
||||
for key, value in ConfigPairs(SkillBaseConfig) do
|
||||
this.playerSkillList[value.Id] = 0
|
||||
|
@ -278,15 +278,17 @@ end
|
|||
function this.GetPreviewSingleText(id, value)
|
||||
if id > 112 then
|
||||
if PropertyConfig[id].Style == 1 then
|
||||
return string.format("%s", PropertyConfig[id].Info), string.format("+%s", value)
|
||||
return string.format("%s", GetLanguageStrById(PropertyConfig[id].Info)), string.format("+%s", value)
|
||||
elseif PropertyConfig[id].Style == 2 then
|
||||
return string.format("%s", PropertyConfig[id].Info), string.format("+%s", value) .. "%"
|
||||
return string.format("%s", GetLanguageStrById(PropertyConfig[id].Info)), string.format("+%s", value) .. "%"
|
||||
end
|
||||
else
|
||||
if PropertyConfig[id].Style == 1 then
|
||||
return string.format(Language[12460], PropertyConfig[id].Info), string.format("+%s", value)
|
||||
return string.format(Language[12460], GetLanguageStrById(PropertyConfig[id].Info)),
|
||||
string.format("+%s", value)
|
||||
elseif PropertyConfig[id].Style == 2 then
|
||||
return string.format(Language[12460], PropertyConfig[id].Info), string.format("+%s", value) .. "%"
|
||||
return string.format(Language[12460], GetLanguageStrById(PropertyConfig[id].Info)),
|
||||
string.format("+%s", value) .. "%"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -440,7 +442,7 @@ function this.GetLinesData()
|
|||
local x = (this.PointsData[i].Pos.x + this.PointsData[i + 1].Pos.x) / 2
|
||||
data.Pos = Vector3.New(x, 0, 0)
|
||||
local r = math.acos((this.PointsData[i + 1].Pos.x - this.PointsData[i].Pos.x) /
|
||||
(this.PointsData[i + 1].Pos.y - this.PointsData[i].Pos.y))
|
||||
(this.PointsData[i + 1].Pos.y - this.PointsData[i].Pos.y))
|
||||
if (r / math.pi) * 180 > 90 then
|
||||
data.Rota = Vector3.New(0, 0, (r / math.pi) * 180 - 10)
|
||||
else
|
||||
|
@ -642,7 +644,7 @@ function this.HeroCalculateFourQuaWarForce(_professionId)
|
|||
if propertyInfo.propertyNum > 0 then
|
||||
if addAllProVal[propertyInfo.propertyId] then
|
||||
addAllProVal[propertyInfo.propertyId] = addAllProVal[propertyInfo.propertyId] +
|
||||
propertyInfo.propertyNum
|
||||
propertyInfo.propertyNum
|
||||
else
|
||||
addAllProVal[propertyInfo.propertyId] = propertyInfo.propertyNum
|
||||
end
|
||||
|
|
|
@ -147,9 +147,9 @@ function this.CheckGoalIsFinish(_dataId, _obj, _formationList)
|
|||
final = false
|
||||
end
|
||||
end
|
||||
_obj.text = string.format("<color=#BAAF98>%s</color>", goalData.Describe)
|
||||
_obj.text = string.format("<color=#BAAF98>%s</color>", GetLanguageStrById(goalData.Describe))
|
||||
if final then
|
||||
_obj.text = string.format("<color=#27DD65>%s</color>", goalData.Describe)
|
||||
_obj.text = string.format("<color=#27DD65>%s</color>", GetLanguageStrById(goalData.Describe))
|
||||
end
|
||||
return final
|
||||
end
|
||||
|
|
|
@ -98,7 +98,7 @@ end
|
|||
|
||||
-- 编队数据匹配
|
||||
function QiJieShiLianMonsterInfo:FormationAdapter()
|
||||
self.titleText.text = string.format(Language[12491], self.configData.Chapter, self.configData.Stage)
|
||||
self.titleText.text = string.format(Language[12491], GetLanguageStrById(self.configData.Chapter), self.configData.Stage)
|
||||
self.power.text = self.configData.Puwer
|
||||
local bossTeaminfo = monsterGroup[self.configData.MonsterGroup].Contents[1]
|
||||
for i = 1, #heroListGo do
|
||||
|
|
|
@ -236,14 +236,15 @@ end
|
|||
function QiJieShiLianPanel:SetTabBox()
|
||||
local tabList = QiJieShiLianManager.GetTabList()
|
||||
self.ScrollView:SetData(tabList, function(index, go)
|
||||
Util.GetGameObject(go, "Text"):GetComponent("Text").text = tabList[index].Chapter
|
||||
Util.GetGameObject(go, "Text"):GetComponent("Text").text = GetLanguageStrById(tabList[index].Chapter)
|
||||
local state = tabList[index].QijieType == self.configData.QijieType
|
||||
local name = state and "r_hero_xuanze_001" or "r_hero_xuanze_002"
|
||||
Util.GetGameObject(go, "Image"):GetComponent("Image").sprite = self.spLoader:LoadSprite(name)
|
||||
Util.GetGameObject(go, "LockImage"):SetActive(not state)
|
||||
Util.AddOnceClick(go, function()
|
||||
if not state then
|
||||
PopupTipPanel.ShowTip(string.format(Language[12495], NumToWeek[index], tabList[index].Chapter))
|
||||
PopupTipPanel.ShowTip(string.format(Language[12495], NumToWeek[index],
|
||||
GetLanguageStrById(tabList[index].Chapter)))
|
||||
end
|
||||
end)
|
||||
end, false, true)
|
||||
|
@ -256,7 +257,7 @@ function QiJieShiLianPanel:SetTopBar()
|
|||
local text = self.qijieData.curRank > 0 and self.qijieData.curRank or Language[10036]
|
||||
local text2 = self.qijieData.curScore >= 0 and self.qijieData.curScore or "0"
|
||||
self.info.text = string.format(Language[12496], text, text2)
|
||||
self.name.text = string.format(Language[12491], self.configData.Chapter, self.configData.Stage)
|
||||
self.name.text = string.format(Language[12491], GetLanguageStrById(self.configData.Chapter), self.configData.Stage)
|
||||
end
|
||||
|
||||
--设置下方挑战信息和奖励信息
|
||||
|
|
|
@ -171,7 +171,7 @@ function this.SetScrollPre(root, data)
|
|||
SoulPrintSpriteByQuantity[data.Quantity].circleBg2)
|
||||
Util.GetGameObject(root, "circleFrameBg/circleFrame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
|
||||
SoulPrintSpriteByQuantity[data.Quantity].circle)
|
||||
local str = data.Name
|
||||
local str = GetLanguageStrById(data.Name)
|
||||
if GetCurLanguage() == 0 and LengthString(data.Name) >= 5 then
|
||||
str = SubString(data.Name, 4) .. "..."
|
||||
end
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
require("Base/BasePanel")
|
||||
SoulPrintHandBook = Inherit(BasePanel)
|
||||
local this = SoulPrintHandBook
|
||||
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||
local ConfigData = ConfigManager.GetConfig(ConfigName.SpecialConfig)
|
||||
local orginLayer=0--层级
|
||||
local allSoulPrintData={}--所有魂印数据
|
||||
local curIndex = 0--当前选择索引
|
||||
local orginLayer = 0 --层级
|
||||
local allSoulPrintData = {} --所有魂印数据
|
||||
local curIndex = 0 --当前选择索引
|
||||
|
||||
|
||||
local chooseNum = 0
|
||||
|
@ -14,7 +14,7 @@ local tabs = {}
|
|||
local itemData = {}
|
||||
local currentDataList = {}
|
||||
local chooseIdList = {}
|
||||
local list={}
|
||||
local list = {}
|
||||
|
||||
function SoulPrintHandBook:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
|
@ -25,17 +25,17 @@ function SoulPrintHandBook:InitComponent()
|
|||
end
|
||||
this.selectBtn = Util.GetGameObject(this.gameObject, "Tabs/selectBtn")
|
||||
this.selectBtnText = Util.GetGameObject(this.selectBtn.transform, "Text"):GetComponent("Text")
|
||||
this.scrollRoot=Util.GetGameObject(this.gameObject,"ScrollRoot")
|
||||
this.pre=Util.GetGameObject(this.scrollRoot,"Pre")
|
||||
this.scrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scrollRoot.transform,this.pre, nil,--
|
||||
Vector2.New(this.scrollRoot.transform.rect.width,this.scrollRoot.transform.rect.height),1,4,Vector2.New(50,15))
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchoredPosition= Vector2.New(0,0)
|
||||
this.scrollRoot = Util.GetGameObject(this.gameObject, "ScrollRoot")
|
||||
this.pre = Util.GetGameObject(this.scrollRoot, "Pre")
|
||||
this.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.scrollRoot.transform, this.pre, nil, --
|
||||
Vector2.New(this.scrollRoot.transform.rect.width, this.scrollRoot.transform.rect.height), 1, 4,
|
||||
Vector2.New(50, 15))
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchoredPosition = Vector2.New(0, 0)
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchorMin = Vector2.New(0.5, 0.5)
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").anchorMax = Vector2.New(0.5, 0.5)
|
||||
this.scrollView.gameObject:GetComponent("RectTransform").pivot = Vector2.New(0.5, 0.5)
|
||||
this.scrollView.moveTween.MomentumAmount = 1
|
||||
this.scrollView.moveTween.Strength = 2
|
||||
|
||||
end
|
||||
|
||||
function SoulPrintHandBook:BindEvent()
|
||||
|
@ -47,9 +47,9 @@ function SoulPrintHandBook:BindEvent()
|
|||
-- curIndex = 0
|
||||
return
|
||||
end
|
||||
|
||||
curIndex = i
|
||||
|
||||
|
||||
curIndex = i
|
||||
|
||||
this.OnRefresh(curIndex)
|
||||
this:SetSelect()
|
||||
end)
|
||||
|
@ -69,13 +69,14 @@ end
|
|||
|
||||
function SoulPrintHandBook:AddListener()
|
||||
end
|
||||
|
||||
function SoulPrintHandBook:RemoveListener()
|
||||
end
|
||||
|
||||
function SoulPrintHandBook:OnSortingOrderChange()
|
||||
--特效层级重设
|
||||
for _, v in pairs(list) do
|
||||
Util.SetParticleSortLayer(v, this.sortingOrder+1)
|
||||
Util.SetParticleSortLayer(v, this.sortingOrder + 1)
|
||||
end
|
||||
orginLayer = self.sortingOrder
|
||||
end
|
||||
|
@ -86,7 +87,7 @@ end
|
|||
|
||||
function SoulPrintHandBook:OnShow()
|
||||
this.GetAllData()
|
||||
curIndex=4
|
||||
curIndex = 4
|
||||
this.OnRefresh(curIndex)
|
||||
this.SetBottomBarIsActive()
|
||||
this:SetSelect()
|
||||
|
@ -97,9 +98,10 @@ function SoulPrintHandBook:SetSelect()
|
|||
this.selectBtn.transform.localPosition = tabs[curIndex].transform.localPosition
|
||||
this.selectBtnText.text = Util.GetGameObject(tabs[curIndex].transform, "Text"):GetComponent("Text").text
|
||||
end
|
||||
|
||||
function this.GetAllData()
|
||||
allSoulPrintData = {}
|
||||
local allCurSoulPrintData= ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Position",5)
|
||||
local allCurSoulPrintData = ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig, "Position", 5)
|
||||
for i = 1, #allCurSoulPrintData do
|
||||
local curSpiritAnimalBook
|
||||
-- for _, configInfo in ConfigPairs(ConfigManager.GetConfig(ConfigName.SpiritAnimalBook)) do
|
||||
|
@ -113,10 +115,11 @@ function this.GetAllData()
|
|||
-- table.insert(allSoulPrintData,allCurSoulPrintData[i])
|
||||
-- end
|
||||
-- else
|
||||
table.insert(allSoulPrintData,allCurSoulPrintData[i])
|
||||
table.insert(allSoulPrintData, allCurSoulPrintData[i])
|
||||
--end
|
||||
end
|
||||
end
|
||||
|
||||
--特殊的开启条件
|
||||
function this.SetBottomBarIsActive()
|
||||
for i = 1, #tabs do
|
||||
|
@ -135,18 +138,18 @@ end
|
|||
function SoulPrintHandBook:OnDestroy()
|
||||
this.spLoader:Destroy()
|
||||
list = {}
|
||||
this.scrollView=nil
|
||||
this.scrollView = nil
|
||||
end
|
||||
|
||||
local orginLayer2=0
|
||||
local orginLayer2 = 0
|
||||
--打开页面时,页面数据刷新
|
||||
function this.OnRefresh(index)
|
||||
local tempData={}
|
||||
local tempData = {}
|
||||
-- local num = ConfigData[89].Value
|
||||
|
||||
if index==0 then
|
||||
if index == 0 then
|
||||
-- if PlayerManager.level >= tonumber(num) then--达到80级才显示白色魂印
|
||||
tempData=allSoulPrintData
|
||||
tempData = allSoulPrintData
|
||||
-- else
|
||||
-- for i,v in ipairs(allSoulPrintData) do
|
||||
-- if v.Quality ~= 7 then
|
||||
|
@ -155,16 +158,16 @@ function this.OnRefresh(index)
|
|||
-- end
|
||||
-- end
|
||||
else
|
||||
for i,v in ipairs(allSoulPrintData) do
|
||||
if v.Quality==(index+3) then
|
||||
table.insert( tempData, v)
|
||||
for i, v in ipairs(allSoulPrintData) do
|
||||
if v.Quality == (index + 3) then
|
||||
table.insert(tempData, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--预设容器
|
||||
this.scrollView:SetData(tempData,function(index,root)
|
||||
this.SetScrollPre(root,tempData[index])
|
||||
this.scrollView:SetData(tempData, function(index, root)
|
||||
this.SetScrollPre(root, tempData[index])
|
||||
list[root] = root
|
||||
end)
|
||||
this.scrollView:SetIndex(1)
|
||||
|
@ -172,26 +175,29 @@ function this.OnRefresh(index)
|
|||
orginLayer2 = this.sortingOrder
|
||||
orginLayer = this.sortingOrder
|
||||
end
|
||||
|
||||
--设置预设
|
||||
function this.SetScrollPre(root,data)
|
||||
Util.SetParticleSortLayer(root, this.sortingOrder+1)
|
||||
SetSoulEffect(itemConfig[data.Id].Quantity1,root)
|
||||
local frame=Util.GetGameObject(root,"Frame"):GetComponent("Image")
|
||||
local icon=Util.GetGameObject(root,"circleFrameBg/Icon"):GetComponent("Image")
|
||||
local name=Util.GetGameObject(root,"Name"):GetComponent("Text")
|
||||
Util.AddOnceClick(root,function()
|
||||
UIManager.OpenPanel(UIName.SoulPrintPopUp,3,nil,data.Id,nil)
|
||||
function this.SetScrollPre(root, data)
|
||||
Util.SetParticleSortLayer(root, this.sortingOrder + 1)
|
||||
SetSoulEffect(itemConfig[data.Id].Quantity1, root)
|
||||
local frame = Util.GetGameObject(root, "Frame"):GetComponent("Image")
|
||||
local icon = Util.GetGameObject(root, "circleFrameBg/Icon"):GetComponent("Image")
|
||||
local name = Util.GetGameObject(root, "Name"):GetComponent("Text")
|
||||
Util.AddOnceClick(root, function()
|
||||
UIManager.OpenPanel(UIName.SoulPrintPopUp, 3, nil, data.Id, nil)
|
||||
end)
|
||||
|
||||
frame.sprite=this.spLoader:LoadSprite(GetQuantityImageByquality(data.Quality))
|
||||
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[data.Id].ResourceID))
|
||||
Util.GetGameObject(root,"circleFrameBg"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[data.Id].Quantity].circleBg2)
|
||||
Util.GetGameObject(root,"circleFrameBg/circleFrame"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[data.Id].Quantity].circle)
|
||||
local str = data.Name
|
||||
if GetCurLanguage() == 0 and LengthString(data.Name)>=5 then
|
||||
str = SubString(data.Name,4).."..."
|
||||
frame.sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(data.Quality))
|
||||
icon.sprite = this.spLoader:LoadSprite(GetResourcePath(itemConfig[data.Id].ResourceID))
|
||||
Util.GetGameObject(root, "circleFrameBg"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
|
||||
SoulPrintSpriteByQuantity[itemConfig[data.Id].Quantity].circleBg2)
|
||||
Util.GetGameObject(root, "circleFrameBg/circleFrame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
|
||||
SoulPrintSpriteByQuantity[itemConfig[data.Id].Quantity].circle)
|
||||
local str = GetLanguageStrById(data.Name)
|
||||
if GetCurLanguage() == 0 and LengthString(data.Name) >= 5 then
|
||||
str = SubString(data.Name, 4) .. "..."
|
||||
end
|
||||
name.text = str--SubString2(GetLanguageStrById(data.Name),10)
|
||||
name.text = str --SubString2(GetLanguageStrById(data.Name),10)
|
||||
end
|
||||
|
||||
return SoulPrintHandBook
|
||||
return SoulPrintHandBook
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 928fd3985e8c04d4fa22136ad79aee4d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue