【命格】提交

dev_chengFeng
ZhangBiao 2021-12-10 17:18:18 +08:00
parent 94c98be0e5
commit ad589aa449
9 changed files with 41 additions and 25 deletions

View File

@ -970,7 +970,9 @@ RedPointType = {
Huaxutan_CompoundHero = 8031,--化虚坛英雄合成红点
--修行
Practice = 500,--主界面下方按钮
Practice_main = 5000,--主界面下方按钮
Practice = 500,--主界面下方tab按钮——修行
Gem = 600,--主界面下方tab按钮——命石
Practice_upgrade = 5001,--突破按钮
Practice_imprint = 5002,--神印按钮
Practice_fourQua = 5003,--四象心法

View File

@ -121,7 +121,7 @@ function BagPanel:BindEvent()
end)
Util.AddClick(this.oneKey, function()
local list,num = GemManager.OneKeyConpound()
LogGreen("金币:"..tostring(num))
-- LogGreen("金币:"..tostring(num))
for key, value in pairs(list) do
LogPink("key:"..tostring(key).." Value:"..tostring(value))
end

View File

@ -124,7 +124,13 @@ function this.OneKeyConpound()
break
end
end
return finalList,totalMoney
local tempList = {}
for key, value in pairs(finalList) do--存在数据为0的情况剔除
if value > 0 then
tempList[key] = value
end
end
return tempList,totalMoney
end
--一键合成循环

View File

@ -37,6 +37,11 @@ function Gem:InitComponent()
self.helpPosition=self.helpBtn:GetComponent("RectTransform").localPosition
self.additionBtn = Util.GetGameObject(self.gameObject, "additionBtn")
self.curType = 1
--页签
self.tab = Util.GetGameObject(self.gameObject, "Tab")
self.practice_tab = Util.GetGameObject(self.tab, "tab1/Redpot")
self.gem_tab = Util.GetGameObject(self.tab, "tab2/Redpot")
end
function Gem:BindEvent()
@ -61,6 +66,8 @@ function Gem:BindEvent()
end
end)
BindRedPointObject(RedPointType.Practice,self.practice_tab)
BindRedPointObject(RedPointType.Gem,self.gem_tab)
end
function Gem:AddListener()
@ -216,6 +223,8 @@ function Gem:OnDestroy()
self.spLoader:Destroy()
SubUIManager.Close(self.UpView)
SubUIManager.Close(self.BtView)
ClearRedPointObject(RedPointType.Practice,self.practice_tab)
ClearRedPointObject(RedPointType.Gem,self.gem_tab)
self.UpView = nil
self.BtView = nil
if self.playerInfoView then

View File

@ -279,9 +279,7 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.HongMeng_OpenBox,RedPointType.HongMeng)
RPData:SetParent(RedPointType.HongMeng_UpTower,RedPointType.HongMeng)
--建木神树
RPData:SetParent(RedPointType.Sacred,RedPointType.Sacred_roleInfo)
RPData:SetParent(RedPointType.Sacred_roleInfo,RedPointType.Practice)
--天枢密卷
RPData:SetParent(RedPointType.Hero_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.SoulPrint_Fetter,RedPointType.TianShuMiJuan)
RPData:SetParent(RedPointType.TianShuPokemon_Fetter,RedPointType.TianShuMiJuan)
@ -299,10 +297,14 @@ function this.InitRedPointAllRelate()
--化虚坛
RPData:SetParent(RedPointType.Huaxutan_CompoundHero,RedPointType.Huaxutan)
--主角修行
RPData:SetParent(RedPointType.Practice,RedPointType.Practice_main)
RPData:SetParent(RedPointType.Practice_upgrade,RedPointType.Practice)
RPData:SetParent(RedPointType.Practice_imprint,RedPointType.Practice)
RPData:SetParent(RedPointType.Practice_fourQua,RedPointType.Practice)
RPData:SetParent(RedPointType.Practice_Cultivation,RedPointType.Practice)
--建木神树
RPData:SetParent(RedPointType.Sacred,RedPointType.Sacred_roleInfo)
RPData:SetParent(RedPointType.Sacred_roleInfo,RedPointType.Practice)
--主界面右上角
RPData:SetParent(RedPointType.FirstRecharge,RedPointType.RightUp2)
RPData:SetParent(RedPointType.DailyRecharge,RedPointType.RightUp2)
@ -330,11 +332,15 @@ function this.InitRedPointAllRelate()
RPData:SetParent(RedPointType.tailsmanSoul_red,RedPointType.tailsmanSoul)
RPData:SetParent(RedPointType.tailsmanSoul_whiteGold,RedPointType.tailsmanSoul)
--身外化身
RPData:SetParent(RedPointType.incarnation_people,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_buddish,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_demon,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation_taoist,RedPointType.incarnation)
RPData:SetParent(RedPointType.incarnation,RedPointType.Practice)
RPData:SetParent(RedPointType.Gem,RedPointType.Practice_main)
for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.ActivityGroups)) do
if v.RpType > 0 and v.RpTypeParent > 0 then

View File

@ -148,12 +148,9 @@ function RewardGemSingleShowPopup:OnShow()
if this.openType == 1 then--背包中打开
this.howGet:SetActive(true)
this.scroll:SetActive(true)
this.btnJump:SetActive(true)
this.btnJump:SetActive(gemConfig[itemSid].Level ~= 10)
this.bottomBar:SetActive(true)
this.btnUse:SetActive(true)
if gemConfig[itemSid].Level == 10 then--十级命石不显示合成
this.bottomBar:SetActive(false)
end
elseif this.openType == 2 then--装备命石时打开
this.btnClose:SetActive(true)
this.btnSure:SetActive(true)

View File

@ -45,7 +45,7 @@ function this:Refresh()
self.money.text = self.args[2]
local list = {}
for key, value in pairs(self.args[1]) do
-- LogGreen("id:"..tostring(key).." num:"..tostring(value))
LogGreen("id:"..tostring(key).." num:"..tostring(value))
local data = {}
data.id = key
data.num = value
@ -55,29 +55,20 @@ function this:Refresh()
return a.id < b.id
end)
local grid = nil
local itemList = nil
if #list > 5 then
grid = self.grid1
itemList = self.itemList1
self.grid1:SetActive(true)
self.grid2:SetActive(false)
for key, value in pairs(self.itemList1) do
value:SetActive(false)
end
else
grid = self.grid2
itemList = self.itemList2
self.grid1:SetActive(false)
self.grid2:SetActive(true)
for key, value in pairs(self.itemList2) do
value:SetActive(false)
end
self.grid2:SetActive(true)
end
for i = 1, #list do
local go = itemList[i]
local go = self.itemList1[i]
if not go then
go = SubUIManager.Open(SubUIConfig.ItemView,grid.transform)
itemList[i] = go
self.itemList1[i] = go
end
go:OnOpen(false, {list[i].id,list[i].num}, 1, false,false,false,self.parent.sortingOrder + 1)
go.gameObject:SetActive(true)
@ -90,7 +81,6 @@ end
function this:OnDestroy()
this.spLoader:Destroy()
self.itemList1 = {}
self.itemList2 = {}
end
return this

View File

@ -86,6 +86,8 @@ function Practice:InitComponent()
--页签
self.tab = Util.GetGameObject(self.gameObject, "Tab")
self.btnGem = Util.GetGameObject(self.tab, "tab2")
self.practice_tab = Util.GetGameObject(self.tab, "tab1/Redpot")
self.gem_tab = Util.GetGameObject(self.tab, "tab2/Redpot")
end
@ -177,6 +179,8 @@ function Practice:BindEvent()
BindRedPointObject(RedPointType.Practice_fourQua,self.fourQuadrantRedPoint)
BindRedPointObject(RedPointType.Sacred_roleInfo,self.treeRed)
BindRedPointObject(RedPointType.incarnation,self.incarnationBtnRed)
BindRedPointObject(RedPointType.Practice,self.practice_tab)
BindRedPointObject(RedPointType.Gem,self.gem_tab)
end
function Practice:BtnClickEvent()
NetManager.UpPracticeLevelRequest(function ()
@ -495,6 +499,8 @@ function Practice:OnDestroy()
ClearRedPointObject(RedPointType.Practice_Cultivation,self.cultivationRed)
ClearRedPointObject(RedPointType.tailsmanSoul,self.talsmanSoulBtnRed)
ClearRedPointObject(RedPointType.incarnation,self.incarnationBtnRed)
ClearRedPointObject(RedPointType.Practice,self.practice_tab)
ClearRedPointObject(RedPointType.Gem,self.gem_tab)
for i = 1, 4 do
ClearRedPointObject(500+i*100,Util.GetGameObject(self.Practice, "SkillObj/skill"..i.."/red"))
end

View File

@ -47,7 +47,7 @@ function this:InitComponent()
[PanelTypeView.Carbon] = {node = self.BtnCarbon, funcId = {17, 18, 30, 46, 67}, rpType = RedPointType.ExploreMain, clickFunc = self.OpenCarbon},
[PanelTypeView.GongHui] = {node = self.BtnGongHui, funcId = {4}, rpType = RedPointType.Guild, clickFunc = self.OpenGuild},
-- [PanelTypeView.TeQuan] = {node = self.BtnTeQuan, funcId = {}, rpType = RedPointType.VipPrivilege, clickFunc = self.OpenVIP},
[PanelTypeView.Practice] = {node = self.BtnPractice, funcId = {108}, rpType = RedPointType.Practice, clickFunc = self.OpenPractice},
[PanelTypeView.Practice] = {node = self.BtnPractice, funcId = {108}, rpType = RedPointType.Practice_main, clickFunc = self.OpenPractice},
}
end