From b10719a2fad734ae6fa5f8c497fca4dabac445f3 Mon Sep 17 00:00:00 2001 From: vurtne14 Date: Tue, 24 Sep 2024 20:25:20 +0800 Subject: [PATCH] 1 --- .../View/GeneralBigPopup_IncarnationDes.lua | 4 +- .../Incarnation/IncarnationManager.lua | 329 +++++++++--------- .../Modules/Incarnation/IncarnationPanel.lua | 4 +- .../~Lua/Modules/Popup/PlayerInfoPopup.lua | 14 +- .../Modules/TailsManSoul/TailsManSouPanel.lua | 261 ++++++++------ Assets/Scripts/GameInit/GameStart.cs | 2 +- 6 files changed, 326 insertions(+), 288 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes.lua b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes.lua index 31e656cfa8..e4301706bf 100644 --- a/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes.lua +++ b/Assets/ManagedResources/~Lua/Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes.lua @@ -71,13 +71,13 @@ function this:OnShow(_parent,_Data) attriList[i].proGroup.gameObject:SetActive(true) if data[i].title and data[i].title ~= "" then attriList[i].title.gameObject:SetActive(true) - attriList[i].titleCom.text = data[i].title + attriList[i].titleCom.text = GetLanguageStrById(data[i].title) else attriList[i].title.gameObject:SetActive(false) end for j = 1, #data[i].pro do attriList[i].pro[j].gameObject:SetActive(true) - attriList[i].TextCom[j].text = data[i].pro[j] + attriList[i].TextCom[j].text = GetLanguageStrById(data[i].pro[j]) end if data[i].tip and data[i].tip ~= "" then attriList[i].tip.gameObject:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua b/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua index 6f1fa1458e..a6adee107a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationManager.lua @@ -4,22 +4,22 @@ local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) local ChangingCard = ConfigManager.GetConfig(ConfigName.ChangingCard) local PassiveSkillConfig = ConfigManager.GetConfig(ConfigName.PlayerSkill) local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig) -this.itemDataList = {} --state -1 未拥有 0 已有未激活 1激活未上阵 2上阵 +this.itemDataList = {} --state -1 未拥有 0 已有未激活 1激活未上阵 2上阵 this.SingleIncarnationPro = {} this.SingleIncarnationProDes = "" -this.incarnationForceLv=1 --化身之力等级id +this.incarnationForceLv = 1 --化身之力等级id function this.Initialize() this.InitItemDataList() end function this.InitItemDataList() - for k,v in ConfigPairs(ChangingCard) do + for k, v in ConfigPairs(ChangingCard) do this.CreatEmptyItemData(v.Id) end - local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig,138) - local strs = string.split(config.Value,"|") - for i = 1,#strs do - local str = string.split(strs[i],"#") + local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig, 138) + local strs = string.split(config.Value, "|") + for i = 1, #strs do + local str = string.split(strs[i], "#") local proId = tonumber(str[1]) local proNum = tonumber(str[2]) if not this.SingleIncarnationPro[proId] then @@ -28,12 +28,12 @@ function this.InitItemDataList() this.SingleIncarnationPro[proId] = this.SingleIncarnationPro[proId] + proNum end this.SingleIncarnationProDes = "" - this.SingleIncarnationProDes = this.GetproDesStr(this.SingleIncarnationProDes,this.SingleIncarnationPro) + this.SingleIncarnationProDes = this.GetproDesStr(this.SingleIncarnationProDes, this.SingleIncarnationPro) Game.GlobalEvent:AddEvent(GameEvent.Bag.GetNewItemIncarnation, this.GetbagIncarnationData) end function this.CreatEmptyItemData(id) - if id==nil then + if id == nil then return end if ChangingCard[id].IsOpen == 0 then @@ -43,105 +43,112 @@ function this.CreatEmptyItemData(id) if not this.itemDataList[id] then this.itemDataList[id] = {} this.itemDataList[id].id = id - this.itemDataList[id].level=1 - this.itemDataList[id].star=0 + this.itemDataList[id].level = 1 + this.itemDataList[id].star = 0 this.itemDataList[id].itemId = ChangingCard[id].CardId this.itemDataList[id].name = itemConfig[ChangingCard[id].CardId].Name - this.itemDataList[id].state = -1 + this.itemDataList[id].state = -1 this.itemDataList[id].pos = 0 this.itemDataList[id].property = itemConfig[ChangingCard[id].CardId].PropertyName this.itemDataList[id].quality = itemConfig[ChangingCard[id].CardId].Quantity this.itemDataList[id].icon = itemConfig[ChangingCard[id].CardId].ResourceID this.itemDataList[id].heroId = ChangingCard[id].desc2 - this.itemDataList[id].proDatas =this.GetChangeCardProperty(id) + this.itemDataList[id].proDatas = this.GetChangeCardProperty(id) this.itemDataList[id].skillDatas = ChangingCard[id].Skill[1] - - end + end end -function this.GetproDesStr(_str,dataList) +function this.GetproDesStr(_str, dataList) local str = _str - for k,v in pairs(dataList) do - str = str..PropertyConfig[k].Info.."+"..GetPropertyFormatStrOne(PropertyConfig[k].Style,v).." " + for k, v in pairs(dataList) do + str = str .. GetLanguageStrById(PropertyConfig[k].Info) .. + "+" .. GetPropertyFormatStrOne(PropertyConfig[k].Style, v) .. " " end return str end + --获取化身卡指定星级的技能描述 -function this.GetSkillDesStr(id,Star) - local skillId= ChangingCard[id].Skill[Star+1] - local skillDes= PassiveSkillConfig[skillId].Desc +function this.GetSkillDesStr(id, Star) + local skillId = ChangingCard[id].Skill[Star + 1] + local skillDes = PassiveSkillConfig[skillId].Desc return skillDes end + ---获取属性信息和技能信息 function this.GetCardPropDesStr(id) local proDesList = {} local str = Language[11618] - str = this.GetproDesStr(str,this.itemDataList[id].proDatas) - table.insert(proDesList,str) - local skillDes = PassiveSkillConfig[this.itemDataList[id].skillDatas].Desc - table.insert(proDesList,skillDes) + str = this.GetproDesStr(str, this.itemDataList[id].proDatas) + table.insert(proDesList, str) + local skillDes = GetLanguageStrById(PassiveSkillConfig[this.itemDataList[id].skillDatas].Desc) + table.insert(proDesList, skillDes) return proDesList end -function this.GetproDesLst(dataList,_color) +function this.GetproDesLst(dataList, _color) local lis1 = {} - for k,v in pairs(dataList) do - table.insert(lis1,{str = string.format("%s+%s",_color,PropertyConfig[k].Info,GetPropertyFormatStrOne(PropertyConfig[k].Style,v)) ,sort = PropertyConfig[k].SortId}) + for k, v in pairs(dataList) do + table.insert(lis1, + { + str = string.format("%s+%s", _color, GetLanguageStrById(PropertyConfig[k].Info), + GetPropertyFormatStrOne(PropertyConfig[k].Style, v)), + sort = PropertyConfig[k].SortId + }) end - table.sort(lis1,function(a,b) + table.sort(lis1, function(a, b) return a.sort < b.sort end) local list = {} - for i = 1,#lis1 do - table.insert(list,lis1[i].str) + for i = 1, #lis1 do + table.insert(list, lis1[i].str) end return list end -- 初始化赋值操作 _incarnationForceLv化身之力等级id -function this.SetItemDataList(dataList,_incarnationForceLv) - for i = 1,#dataList do +function this.SetItemDataList(dataList, _incarnationForceLv) + for i = 1, #dataList do local state = dataList[i].status if dataList[i].status == 0 then state = 1 elseif dataList[i].status == 1 then state = 2 end - this.SetItemDataByid(dataList[i].id,state,dataList[i].index) - this.SetLevel(dataList[i].id,dataList[i].level) - this.SetStar(dataList[i].id,dataList[i].star) + this.SetItemDataByid(dataList[i].id, state, dataList[i].index) + this.SetLevel(dataList[i].id, dataList[i].level) + this.SetStar(dataList[i].id, dataList[i].star) this.SetSkillData(dataList[i].id) this.SetPropDatas(dataList[i].id) end - this.incarnationForceLv=_incarnationForceLv + this.incarnationForceLv = _incarnationForceLv HeroPropManager.SetFuncPropDirty(Func_Prop_Type.Incarnation) end function this.GetbagIncarnationData() local data = BagManager.GetDataByItemType(ItemType.Incarnation) - for i = 1,#data do + for i = 1, #data do this.SetItemDataByCardId(data[i].id) end end function this.SetItemDataByCardId(id) - local config = ConfigManager.TryGetConfigDataByKey(ConfigName.ChangingCard,"CardId",id) + local config = ConfigManager.TryGetConfigDataByKey(ConfigName.ChangingCard, "CardId", id) if config then if this.itemDataList[config.Id] and this.itemDataList[config.Id].state < 1 then if BagManager.GetItemCountById(id) > 0 then - this.SetItemDataByid(config.Id,0,0) + this.SetItemDataByid(config.Id, 0, 0) else - this.SetItemDataByid(config.Id,-1,0) + this.SetItemDataByid(config.Id, -1, 0) end end end end -function this.SetItemDataByid(id,state,pos) +function this.SetItemDataByid(id, state, pos) if not this.itemDataList[id] then this.CreatEmptyItemData(id) - if PlayerManager.handBook[8] and CheckListIsContainValue1(PlayerManager.handBook[8],id)==false then - table.insert(PlayerManager.handBook[8],id) + if PlayerManager.handBook[8] and CheckListIsContainValue1(PlayerManager.handBook[8], id) == false then + table.insert(PlayerManager.handBook[8], id) TianShuMiJuanManger.CheckFetterStatus(8) end end @@ -150,37 +157,37 @@ function this.SetItemDataByid(id,state,pos) CheckRedPointStatus(this.itemDataList[id].property + 43801) end -function this.SetLevel(id,level) - if level<=0 then - this.itemDataList[id].level=1 - else - this.itemDataList[id].level=level +function this.SetLevel(id, level) + if level <= 0 then + this.itemDataList[id].level = 1 + else + this.itemDataList[id].level = level end end -function this.SetStar(id,star) - this.itemDataList[id].star=star +function this.SetStar(id, star) + this.itemDataList[id].star = star end + --设置激活技能数据 function this.SetSkillData(id) - local changeCardData=this.itemDataList[id] - changeCardData.skillDatas = ChangingCard[id].Skill[changeCardData.star+1] + local changeCardData = this.itemDataList[id] + changeCardData.skillDatas = ChangingCard[id].Skill[changeCardData.star + 1] end + --设置变身卡所有属性加成 function this.SetPropDatas(id) - this.itemDataList[id].proDatas =this.GetChangeCardProperty(id) + this.itemDataList[id].proDatas = this.GetChangeCardProperty(id) end function this.GetStatusByItemId(id) - local config = ConfigManager.TryGetConfigDataByKey(ConfigName.ChangingCard,"CardId",id) + local config = ConfigManager.TryGetConfigDataByKey(ConfigName.ChangingCard, "CardId", id) if config then return this.itemDataList[config.Id].state end return -1 end - - local sortData = { [-1] = 0, [0] = 2, @@ -191,12 +198,12 @@ local sortData = { --根据属性获取化身数据 function this.GetItemDataListByPro(property) local datas = {} - for k,v in pairs(this.itemDataList) do + for k, v in pairs(this.itemDataList) do if v.property == property then - table.insert(datas,v) + table.insert(datas, v) end end - table.sort(datas,function(a,b) + table.sort(datas, function(a, b) if sortData[a.state] == sortData[b.state] then if a.quality == b.quality then return a.id < b.id @@ -212,20 +219,21 @@ end --获取化身之力属性加成 function this.GetIncarnationPower() - local id =this.incarnationForceLv - if id==0 then - id=1 + local id = this.incarnationForceLv + if id == 0 then + id = 1 end - local lvConfig=ConfigManager.GetConfigData(ConfigName.ChangingForce,id) - local proList=lvConfig.PropList + local lvConfig = ConfigManager.GetConfigData(ConfigName.ChangingForce, id) + local proList = lvConfig.PropList return proList end + ---获取身外化身所有属性加成 function this.GetIncarnationTotalPro() local proList = {} - for k,v in pairs(this.itemDataList) do + for k, v in pairs(this.itemDataList) do if v.state > 0 then - for k,v in pairs(v.proDatas) do + for k, v in pairs(v.proDatas) do if not proList[k] then proList[k] = 0 end @@ -235,13 +243,13 @@ function this.GetIncarnationTotalPro() end end --主角等级表加的属性 - local playerConfig=ConfigManager.TryGetConfigData(ConfigName.PlayerLevelConfig,PlayerManager.level) + local playerConfig = ConfigManager.TryGetConfigData(ConfigName.PlayerLevelConfig, PlayerManager.level) if playerConfig and playerConfig.PlayerPropList then for key, v in pairs(playerConfig.PlayerPropList) do if proList[v[1]] then - proList[v[1]]=proList[v[1]]+v[2] + proList[v[1]] = proList[v[1]] + v[2] else - proList[v[1]]=v[2] + proList[v[1]] = v[2] end end end @@ -263,7 +271,7 @@ end --获取已上阵的变身卡 --界面获取 function this.GetIncarnationData1() local datas = {} - for k,v in pairs(this.itemDataList) do + for k, v in pairs(this.itemDataList) do if v.state == 2 then datas[v.pos] = v end @@ -274,9 +282,9 @@ end --获取已上阵的变身卡 --战斗获取 function this.GetIncarnationData() local datas = {} - for k,v in pairs(this.itemDataList) do + for k, v in pairs(this.itemDataList) do if v.state == 2 then - table.insert(datas,v.id) + table.insert(datas, v.id) end end return datas @@ -284,7 +292,7 @@ end --获取已上阵的变身卡 --战斗获取 function this.GetIncarnationDataById(id) - for k,v in pairs(this.itemDataList) do + for k, v in pairs(this.itemDataList) do if v.itemId == id then return v end @@ -302,15 +310,15 @@ function this.CheckRedData(red) elseif red == RedPointType.incarnation_demon then list = this.GetItemDataListByPro(3) elseif red == RedPointType.incarnation_Kong then - list = this.GetItemDataListByPro(5) + list = this.GetItemDataListByPro(5) else list = this.GetItemDataListByPro(4) end - for k,v in pairs(list) do - if v.state == 0 then + for k, v in pairs(list) do + if v.state == 0 then return true end - if v.state>0 and (this.CheckCardUpLvRedData(v.id) or this.CheckCardUpStarRedData(v.id)) then + if v.state > 0 and (this.CheckCardUpLvRedData(v.id) or this.CheckCardUpStarRedData(v.id)) then return true end end @@ -319,11 +327,12 @@ end --检测化身卡是否可以升级 function this.CheckCardUpLvRedData(id) - local poolId= ChangingCard[id].LevelUpPool - local level= this.itemDataList[id].level - local upExp= ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel,"PoolId",poolId,"Level",level).Exp + local poolId = ChangingCard[id].LevelUpPool + local level = this.itemDataList[id].level + local upExp = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel, "PoolId", poolId, "Level", level) + .Exp if upExp then - if BagManager.GetItemCountById(upExp[1])>=upExp[2] then + if BagManager.GetItemCountById(upExp[1]) >= upExp[2] then return true end end @@ -332,29 +341,30 @@ end --检测化身卡是否可以升星 function this.CheckCardUpStarRedData(id) - local star= this.itemDataList[id].star - LogError("id======================"..id.." star=="..star) - local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",ChangingCard[id].Star,"Level",star) - local isShow=true - if starConfig and star=0 then - local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",cardConfig.Star,"Level",star) + if star >= 0 then + local starConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar, "PoolId", + cardConfig.Star, "Level", star) local startProp -- if star==1 then -- startProp=cardConfig.Star1UpProps @@ -428,38 +439,38 @@ function this.GetChangeCardProperty(cardId,isNextLv,isNextStar) -- elseif star==5 then -- startProp=cardConfig.Star5UpProps -- end - startProp=starConfig.Exp - for k,v in pairs(startProp) do + startProp = starConfig.Exp + for k, v in pairs(startProp) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end - end - for k,v in pairs(starConfig.PlayerPropList) do + for k, v in pairs(starConfig.PlayerPropList) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end end end - - if level>0 then - local cardLvConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel,"Level",level,"PoolId",cardConfig.LevelUpPool) - for k,v in pairs(cardLvConfig.PropList) do + + if level > 0 then + local cardLvConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel, "Level", level, + "PoolId", cardConfig.LevelUpPool) + for k, v in pairs(cardLvConfig.PropList) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end end - for k,v in pairs(cardLvConfig.PlayerPropList) do + for k, v in pairs(cardLvConfig.PlayerPropList) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end end end @@ -479,13 +490,13 @@ function this.GetChangeCardProperty(cardId,isNextLv,isNextStar) return nil end -function this.GetChangeCardPropertyAdd(cardId,level,star) - local cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,cardId) - local propList={} - for k,v in pairs(cardConfig.PropList) do - propList[v[1]]=v[2] +function this.GetChangeCardPropertyAdd(cardId, level, star) + local cardConfig = ConfigManager.GetConfigData(ConfigName.ChangingCard, cardId) + local propList = {} + for k, v in pairs(cardConfig.PropList) do + propList[v[1]] = v[2] end - if star>=0 then + if star >= 0 then local startProp -- if star==1 then -- startProp=cardConfig.Star1UpProps @@ -494,39 +505,39 @@ function this.GetChangeCardPropertyAdd(cardId,level,star) -- elseif star==3 then -- startProp=cardConfig.Star3UpProps -- end - local starConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar,"PoolId",cardConfig.Star,"Level",star) - for k,v in pairs(starConfig.Exp) do + local starConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardStar, "PoolId", cardConfig.Star, + "Level", star) + for k, v in pairs(starConfig.Exp) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end - end - for k,v in pairs(starConfig.PlayerPropList) do + for k, v in pairs(starConfig.PlayerPropList) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end - end end - if level>0 then - local cardLvConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel,"Level",level,"PoolId",cardConfig.LevelUpPool) - for k,v in pairs(cardLvConfig.PropList) do + if level > 0 then + local cardLvConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel, "Level", level, + "PoolId", cardConfig.LevelUpPool) + for k, v in pairs(cardLvConfig.PropList) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end end - for k,v in pairs(cardLvConfig.PlayerPropList) do + for k, v in pairs(cardLvConfig.PlayerPropList) do if propList[v[1]] then - propList[v[1]]=propList[v[1]]+v[2] + propList[v[1]] = propList[v[1]] + v[2] else - propList[v[1]]=v[2] + propList[v[1]] = v[2] end end end @@ -543,6 +554,4 @@ function this.GetChangeCardPropertyAdd(cardId,level,star) return propList end - - -return this \ No newline at end of file +return this diff --git a/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationPanel.lua b/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationPanel.lua index cf7874d7eb..b304d300bf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Incarnation/IncarnationPanel.lua @@ -216,7 +216,7 @@ function IncarnationPanel:RefreshUpList() self.upLayoutItemList[i].lv.gameObject:SetActive(PracticeManager.PracticeLevel < tonumber(limits[i])) --local xiuxian=ConfigManager.GetConfigData(ConfigName.XiuXianConfig,tonumber(limits[i])) if xiuxian then - self.upLayoutItemList[i].lv.text = xiuxian[tonumber(limits[i])].RealmName .. Language[11622] + self.upLayoutItemList[i].lv.text = GetLanguageStrById(xiuxian[tonumber(limits[i])].RealmName) .. Language[11622] end end for k, v in pairs(self.upLayoutData) do @@ -336,7 +336,7 @@ function IncarnationPanel:SetSingleData(go, data, index) end go.gameObject:SetActive(true) self.itemPreList[go].bg.sprite = self.spLoader:LoadSprite(GetIncarnationDiImage[data.quality]) - self.itemPreList[go].nameText.text = data.name + self.itemPreList[go].nameText.text = GetLanguageStrById(data.name) --self.itemPreList[go].nameText.text = string.format("%s",GetIncarnationNameColor[data.quality], data.name) --if data.quality == 7 then -- self.itemPreList[go].nameText1.gameObject:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua index 21649e20e9..92db1763e1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua @@ -355,11 +355,11 @@ local titleLive function this.RefreshPlayerInfo(data) local curname = "" if data.serverName and data.serverName ~= "" then - curname = data.serverName .. " " .. data.name + curname = data.serverName .. " " .. GetLanguageStrById(data.name) elseif this.serverName and this.serverName ~= "" then - curname = this.serverName .. " " .. data.name + curname = this.serverName .. " " .. GetLanguageStrById(data.name) else - curname = data.name + curname = GetLanguageStrById(data.name) end this.memName.text = PracticeManager.SetNameColor(curname, data.practiceLevel) --data.name if (data.guildName ~= "") then @@ -369,10 +369,10 @@ function this.RefreshPlayerInfo(data) end if data.arenaLvId > 0 then this.rankName.gameObject:SetActive(true) - this.rankName.text = ConfigManager.GetConfigData(ConfigName.ArenaLevel, data.arenaLvId).ArenaLevelName + this.rankName.text = GetLanguageStrById(ConfigManager.GetConfigData(ConfigName.ArenaLevel, data.arenaLvId).ArenaLevelName) else this.rankName.gameObject:SetActive(true) - this.rankName.text = ArenaManager.GetArenaMyRankName() + this.rankName.text = GetLanguageStrById(ArenaManager.GetArenaMyRankName()) end -- 头像 @@ -429,7 +429,7 @@ end -- 编队数据匹配 function this.FormationAdapter(teamInfo) --====================编队信息====================== - this.formationTip.text = _ViewConfig[this._ViewType].tip + this.formationTip.text = GetLanguageStrById(_ViewConfig[this._ViewType].tip) -- 战斗力 this.memPower.text = teamInfo.totalForce for i, demon in ipairs(this.Demons) do @@ -707,7 +707,7 @@ function this.huashenInfoShow(teamInfo, Grid) end this.ItemList[i]:OnOpen(false, { ChangingCard[value.id].CardId, 0, 0, value.level, value.star }, 1, false, false, false, this.sortingOrder) - Util.GetGameObject(item, "Name"):GetComponent("Text").text = ItemConfig[ChangingCard[value.id].CardId].Name + Util.GetGameObject(item, "Name"):GetComponent("Text").text = GetLanguageStrById(ItemConfig[ChangingCard[value.id].CardId].Name) Util.GetGameObject(item, "lvbg/levelText"):GetComponent("Text").text = value.level Util.GetGameObject(item, "lvbg"):SetActive(true) local starGrid = Util.GetGameObject(item, "starGrid") diff --git a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua index ae88de4cc0..502a8c937c 100644 --- a/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TailsManSoul/TailsManSouPanel.lua @@ -4,51 +4,65 @@ local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig) local this = TailsManSouPanel local redPointList = {} local tabsRedpoints = {} -local tabs={} -local tabsImg = {"r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"} -local special=ConfigManager.GetConfigData(ConfigName.SpecialConfig,177) -local pro=tonumber(special.Value)/100 +local tabs = {} +local tabsImg = { "r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh" } +local special = ConfigManager.GetConfigData(ConfigName.SpecialConfig, 177) +local pro = tonumber(special.Value) / 100 -- Tab管理器 local TabBox = require("Modules/Common/TabBox") local tabData = { - [1] = { --金色 - default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = Language[10202], - rpType = RedPointType.tailsmanSoul_gold,quality = 5 + [1] = { --金色 + default = "r_hero_xuanze_002", + lock = "r_hero_xuanze_002", + select = "r_hero_xuanze_001", + tabName = Language[10202], + rpType = RedPointType.tailsmanSoul_gold, + quality = 5 }, - [2] = { --红色 - default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = Language[10203], - rpType = RedPointType.tailsmanSoul_red,quality = 6 + [2] = { --红色 + default = "r_hero_xuanze_002", + lock = "r_hero_xuanze_002", + select = "r_hero_xuanze_001", + tabName = Language[10203], + rpType = RedPointType.tailsmanSoul_red, + quality = 6 }, - [3] = { --白金 - default = "r_hero_xuanze_002", lock = "r_hero_xuanze_002", select = "r_hero_xuanze_001",tabName = Language[12896], - rpType = RedPointType.tailsmanSoul_whiteGold,bg = "t_tianshumijuan_lingshouditu",quality = 7 + [3] = { --白金 + default = "r_hero_xuanze_002", + lock = "r_hero_xuanze_002", + select = "r_hero_xuanze_001", + tabName = Language[12896], + rpType = RedPointType.tailsmanSoul_whiteGold, + bg = "t_tianshumijuan_lingshouditu", + quality = 7 }, } local curData = {} local curPage = 1 local proId = 1 -local addLv=0 +local addLv = 0 --初始化组件(用于子类重写) function TailsManSouPanel:InitComponent() this.spLoader = SpriteLoader.New() self.itemPreList = {} - self.bg = Util.GetGameObject(self.gameObject,"bg"):GetComponent("Image") + self.bg = Util.GetGameObject(self.gameObject, "bg"):GetComponent("Image") --self.tabbox = Util.GetGameObject(self.gameObject,"bg/tabbox") - self.btnBack = Util.GetGameObject(self.gameObject,"bg/btnBack") - self.selectBtn = Util.GetGameObject(self.gameObject,"bg/Tabs/selectBtn") - self.fetterItem = Util.GetGameObject(self.gameObject,"fetterItem") - local grid = Util.GetGameObject(self.gameObject,"bg/fetterGrid") + self.btnBack = Util.GetGameObject(self.gameObject, "bg/btnBack") + self.selectBtn = Util.GetGameObject(self.gameObject, "bg/Tabs/selectBtn") + self.fetterItem = Util.GetGameObject(self.gameObject, "fetterItem") + local grid = Util.GetGameObject(self.gameObject, "bg/fetterGrid") local v21 = grid.transform.rect - self.scroll = SubUIManager.Open(SubUIConfig.ScrollCycleView,grid.transform,self.fetterItem,nil,Vector2.New(v21.width, v21.height), 1, 1, Vector2.New(0,25)) + self.scroll = SubUIManager.Open(SubUIConfig.ScrollCycleView, grid.transform, self.fetterItem, nil, + Vector2.New(v21.width, v21.height), 1, 1, Vector2.New(0, 25)) self.scroll.moveTween.MomentumAmount = 1 self.scroll.moveTween.Strength = 2 - self.empty = Util.GetGameObject(self.gameObject,"bg/NoneImage") - self.addBtn = Util.GetGameObject(self.gameObject,"bg/add") - self.starAddBtn = Util.GetGameObject(self.gameObject,"bg/starAdd") + self.empty = Util.GetGameObject(self.gameObject, "bg/NoneImage") + self.addBtn = Util.GetGameObject(self.gameObject, "bg/add") + self.starAddBtn = Util.GetGameObject(self.gameObject, "bg/starAdd") self.starAddBtn:SetActive(false) self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform) - self.effectJin = Util.GetGameObject(self.gameObject,"bg/effect/UI_effect_RecruitPanel_particle_jin") - self.effectHong = Util.GetGameObject(self.gameObject,"bg/effect/UI_effect_RecruitPanel_particle_hong") + self.effectJin = Util.GetGameObject(self.gameObject, "bg/effect/UI_effect_RecruitPanel_particle_jin") + self.effectHong = Util.GetGameObject(self.gameObject, "bg/effect/UI_effect_RecruitPanel_particle_hong") for i = 1, 5 do tabs[i] = Util.GetGameObject(self.transform, "bg/Tabs/grid/Btn" .. i) @@ -63,12 +77,12 @@ end --绑定事件(用于子类重写) function TailsManSouPanel:BindEvent() - BindRedPointObject(RedPointType.tailsmanSoul_gold,tabsRedpoints[1].gameObject) - BindRedPointObject(RedPointType.tailsmanSoul_red,tabsRedpoints[2].gameObject) - BindRedPointObject(RedPointType.tailsmanSoul_whiteGold,tabsRedpoints[3].gameObject) - BindRedPointObject(RedPointType.tailsmanSoul_blue,tabsRedpoints[4].gameObject) - BindRedPointObject(RedPointType.tailsmanSoul_whiteBlue,tabsRedpoints[5].gameObject) - for i = 1,5 do + BindRedPointObject(RedPointType.tailsmanSoul_gold, tabsRedpoints[1].gameObject) + BindRedPointObject(RedPointType.tailsmanSoul_red, tabsRedpoints[2].gameObject) + BindRedPointObject(RedPointType.tailsmanSoul_whiteGold, tabsRedpoints[3].gameObject) + BindRedPointObject(RedPointType.tailsmanSoul_blue, tabsRedpoints[4].gameObject) + BindRedPointObject(RedPointType.tailsmanSoul_whiteBlue, tabsRedpoints[5].gameObject) + for i = 1, 5 do Util.AddClick(tabs[i], function() if i == proId then return @@ -85,38 +99,45 @@ function TailsManSouPanel:BindEvent() end) Util.AddClick(self.addBtn, function() local li = TailsManSoulManager.GetTailsmanTotalPro() - local li2= TailsManSoulManager.GetTailsmanTotalProNoAdd() + local li2 = TailsManSoulManager.GetTailsmanTotalProNoAdd() if not li or #li < 1 then PopupTipPanel.ShowTip(Language[12897]) return end - local s = function(data,data2) + local s = function(data, data2) local lis1 = {} - for k,v in pairs(data) do - table.insert(lis1,{str = string.format(Language[12898],propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v),GetPropertyFormatStr(propertyConfig[k].Style,v-data2[k]),addLv*pro),sort = propertyConfig[k].SortId}) + for k, v in pairs(data) do + table.insert(lis1, + { + str = string.format(Language[12898], GetLanguageStrById(propertyConfig[k].Info), + GetPropertyFormatStr(propertyConfig[k].Style, v), + GetPropertyFormatStr(propertyConfig[k].Style, v - data2[k]), addLv * pro), + sort = propertyConfig + [k].SortId + }) end - table.sort(lis1,function(a,b) + table.sort(lis1, function(a, b) return a.sort < b.sort end) local list2 = {} - for i = 1,#lis1 do - table.insert(list2,lis1[i].str) + for i = 1, #lis1 do + table.insert(list2, lis1[i].str) end return list2 end local data = {} local singData = {} - singData.title = Language[12899] - singData.pro = s(li,li2) + singData.title = Language[12899] + singData.pro = s(li, li2) singData.tip = "" - table.insert(data,singData) + table.insert(data, singData) -- for i = 1 ,#data do -- LogGreen("data[i]:"..data[i].title.." #pro:"..#data[i].pro) -- for k,v in ipairs(data[i].pro) do -- LogGreen("data[i]:"..v) -- end -- end - UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.IncarnationDes2,data) + UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.IncarnationDes2, data) -- local li = TailsManSoulManager.GetTailsmanTotalPro() -- local li2 = {} @@ -135,13 +156,16 @@ function TailsManSouPanel:BindEvent() singData.title = Language[12900] singData.pro = {} local star = TailsManSoulManager.GetTotalStar() - local s = function(skillList,starNum) - local proStr = "" - for k,v in ipairs(skillList) do + local s = function(skillList, starNum) + local proStr = "" + for k, v in ipairs(skillList) do if proStr == "" then - proStr = string.format("%s+%s",string.gsub(propertyConfig[v[1]].Info,Language[12901], ""),GetPropertyFormatStr(propertyConfig[v[1]].Style,v[2])) + proStr = string.format("%s+%s", string.gsub(propertyConfig[v[1]].Info, Language[12901], ""), + GetPropertyFormatStr(propertyConfig[v[1]].Style, v[2])) else - proStr = proStr.. string.format(",%s+%s",string.gsub(propertyConfig[v[1]].Info,Language[12901], ""),GetPropertyFormatStr(propertyConfig[v[1]].Style,v[2])) + proStr = proStr .. + string.format(",%s+%s", string.gsub(propertyConfig[v[1]].Info, Language[12901], ""), + GetPropertyFormatStr(propertyConfig[v[1]].Style, v[2])) end end @@ -150,15 +174,15 @@ function TailsManSouPanel:BindEvent() if star >= starNum then color = "00FF00" end - str = string.format(Language[12902],color,star,starNum,proStr) + str = string.format(Language[12902], color, star, starNum, proStr) return str end - for k,v in ConfigPairs(ConfigManager.GetConfig(ConfigName.TrumpStar)) do - local str = s(v.PropListShow,v.StarNum) - table.insert(singData.pro,str) + for k, v in ConfigPairs(ConfigManager.GetConfig(ConfigName.TrumpStar)) do + local str = s(v.PropListShow, v.StarNum) + table.insert(singData.pro, str) end - table.insert(data,singData) - UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ShenHunShuXing,data) + table.insert(data, singData) + UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.ShenHunShuXing, data) end) -- self.tabBox = TabBox.New() -- self.tabBox:SetTabAdapter(self.SetTabAdapter) @@ -166,9 +190,9 @@ function TailsManSouPanel:BindEvent() -- self.tabBox:SetChangeTabCallBack(self.SetChangeTabCallBack) end -function TailsManSouPanel:RefreshList(istop,isAnim) +function TailsManSouPanel:RefreshList(istop, isAnim) self.datas = IncarnationManager.GetItemDataListByPro(proId) - self.scroll:ForeachItemGO(function(index,go) + self.scroll:ForeachItemGO(function(index, go) go.gameObject:SetActive(false) end) if not self.datas or #self.datas < 1 then @@ -177,9 +201,9 @@ function TailsManSouPanel:RefreshList(istop,isAnim) else self.empty.gameObject:SetActive(false) self.scroll.gameObject:SetActive(true) - self.scroll:SetData(self.datas,function(index,go) - self:SetSingleData(go,self.datas[index],index) - end,istop,isAnim) + self.scroll:SetData(self.datas, function(index, go) + self:SetSingleData(go, self.datas[index], index) + end, istop, isAnim) end end @@ -189,7 +213,7 @@ function TailsManSouPanel:SetSelectBtn() self.selectBtn.transform:SetAsFirstSibling() end --- function TailsManSouPanel.SetTabAdapter(newTab, index, status) +-- function TailsManSouPanel.SetTabAdapter(newTab, index, status) -- local img = Util.GetGameObject(newTab.gameObject,"img"):GetComponent("Image") -- local redpot = Util.GetGameObject(newTab.gameObject,"redpot") -- local tabName = Util.GetGameObject(newTab.gameObject,"Text"):GetComponent("Text") @@ -207,11 +231,11 @@ end -- lock.gameObject:SetActive(true) -- else -- lock.gameObject:SetActive(false) --- end +-- end -- newTab.gameObject:SetActive(true) -- end --- function TailsManSouPanel.TabIsLockCheck(index) +-- function TailsManSouPanel.TabIsLockCheck(index) -- return false -- end @@ -233,7 +257,7 @@ end --界面打开时调用(用于子类重写) function TailsManSouPanel:OnOpen(...) - local args = {...} + local args = { ... } curPage = args[1] or 2 end @@ -243,27 +267,25 @@ function TailsManSouPanel:OnShow() --self.tabBox:Init(self.tabbox.gameObject, tabs, curPage) curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(proId) self:RefreshData() - addLv=0 - for i=1,5 do + addLv = 0 + for i = 1, 5 do local curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(i) - for j=1,#curData do + for j = 1, #curData do --LogError("curData.lv=========="..curData[j].lv) - if curData[j].lv>0 then - addLv=addLv+curData[j].lv + if curData[j].lv > 0 then + addLv = addLv + curData[j].lv end - end end self.effectJin.gameObject:SetActive(tabData[curPage].quality == 5) self.effectHong.gameObject:SetActive(tabData[curPage].quality == 6) - Util.SetParticleSortLayer(self.effectJin.gameObject,self.sortingOrder + 1) - Util.SetParticleSortLayer(self.effectHong.gameObject,self.sortingOrder + 1) + Util.SetParticleSortLayer(self.effectJin.gameObject, self.sortingOrder + 1) + Util.SetParticleSortLayer(self.effectHong.gameObject, self.sortingOrder + 1) end - function TailsManSouPanel:RefreshData() self:SetSelectBtn() - self.scroll:ForeachItemGO(function(index,go) + self.scroll:ForeachItemGO(function(index, go) go.gameObject:SetActive(false) end) if not curData or #curData < 1 then @@ -272,73 +294,80 @@ function TailsManSouPanel:RefreshData() else self.empty.gameObject:SetActive(false) self.scroll.gameObject:SetActive(true) - self.scroll:SetData(curData,function(index,go) - self:SetSingleData(go,curData[index],index) + self.scroll:SetData(curData, function(index, go) + self:SetSingleData(go, curData[index], index) end) self.scroll:SetIndex(1) end end - - -function TailsManSouPanel:SetSingleData(go,data,index) +function TailsManSouPanel:SetSingleData(go, data, index) if not self.itemPreList[go] then self.itemPreList[go] = {} - self.itemPreList[go].obj = Util.GetGameObject(go,"go") + self.itemPreList[go].obj = Util.GetGameObject(go, "go") --self.itemPreList[go].effect = Util.GetGameObject(self.itemPreList[go].obj,"ui-fabao") - self.itemPreList[go].bg = Util.GetGameObject(self.itemPreList[go].obj,"bg"):GetComponent("Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin + self.itemPreList[go].bg = Util.GetGameObject(self.itemPreList[go].obj, "bg"):GetComponent("Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin --self.itemPreList[go].tip = Util.GetGameObject(self.itemPreList[go].bg.transform,"slider/tip"):GetComponent("Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin - self.itemPreList[go].mask1 = Util.GetGameObject(self.itemPreList[go].bg.transform,"slider/mask1"):GetComponent("Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin - self.itemPreList[go].mask2 = Util.GetGameObject(self.itemPreList[go].bg.transform,"slider/mask2"):GetComponent("Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin - self.itemPreList[go].nameText = Util.GetGameObject(self.itemPreList[go].obj,"bg/nameDi"):GetComponent("Image") --名字图片 根据表读取 - self.itemPreList[go].slider = Util.GetGameObject(self.itemPreList[go].obj,"bg/slider"):GetComponent("Slider") - self.itemPreList[go].progress = Util.GetGameObject(self.itemPreList[go].slider.transform,"progress"):GetComponent("Text") - self.itemPreList[go].red = Util.GetGameObject(self.itemPreList[go].bg.transform,"red") + self.itemPreList[go].mask1 = Util.GetGameObject(self.itemPreList[go].bg.transform, "slider/mask1"):GetComponent( + "Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin + self.itemPreList[go].mask2 = Util.GetGameObject(self.itemPreList[go].bg.transform, "slider/mask2"):GetComponent( + "Image") --根据品质变化的图片 f_fabaojuling_zhujiemianbaijin f_fabaojuling_zhujiemianhong f_fabaojuling_zhujiemianjin + self.itemPreList[go].nameText = Util.GetGameObject(self.itemPreList[go].obj, "bg/nameDi"):GetComponent("Image") --名字图片 根据表读取 + self.itemPreList[go].slider = Util.GetGameObject(self.itemPreList[go].obj, "bg/slider"):GetComponent("Slider") + self.itemPreList[go].progress = Util.GetGameObject(self.itemPreList[go].slider.transform, "progress") + :GetComponent("Text") + self.itemPreList[go].red = Util.GetGameObject(self.itemPreList[go].bg.transform, "red") self.itemPreList[go].iconList = {} - for i = 1,4 do + for i = 1, 4 do self.itemPreList[go].iconList[i] = {} - self.itemPreList[go].iconList[i].go = Util.GetGameObject(self.itemPreList[go].bg.transform,"compGrid/iconDi"..i) - self.itemPreList[go].iconList[i].icon = Util.GetGameObject(self.itemPreList[go].iconList[i].go.transform,"icon"):GetComponent("Image") - self.itemPreList[go].iconList[i].effecthong = Util.GetGameObject(self.itemPreList[go].iconList[i].go,"UI_Effect_Kuang_HongSe") - self.itemPreList[go].iconList[i].effectjin = Util.GetGameObject(self.itemPreList[go].iconList[i].go,"UI_Effect_Kuang_JinSe") + self.itemPreList[go].iconList[i].go = Util.GetGameObject(self.itemPreList[go].bg.transform, + "compGrid/iconDi" .. i) + self.itemPreList[go].iconList[i].icon = Util.GetGameObject(self.itemPreList[go].iconList[i].go.transform, + "icon"):GetComponent("Image") + self.itemPreList[go].iconList[i].effecthong = Util.GetGameObject(self.itemPreList[go].iconList[i].go, + "UI_Effect_Kuang_HongSe") + self.itemPreList[go].iconList[i].effectjin = Util.GetGameObject(self.itemPreList[go].iconList[i].go, + "UI_Effect_Kuang_JinSe") end end self.itemPreList[go].data = data if not data then go.gameObject:SetActive(false) - return + return end go.gameObject:SetActive(true) - self.itemPreList[go].bg.sprite = this.spLoader:LoadSprite(GetTailsmanSoulDiImage[self.itemPreList[go].data.quality].bg) + self.itemPreList[go].bg.sprite = this.spLoader:LoadSprite(GetTailsmanSoulDiImage[self.itemPreList[go].data.quality] + .bg) --self.itemPreList[go].tip.sprite = this.spLoader:LoadSprite(GetTailsmanSoulDiImage[self.itemPreList[go].data.quality].tip) self.itemPreList[go].mask1.sprite = this.spLoader:LoadSprite("f_fabaojuling_huawenbaijin") self.itemPreList[go].mask2.sprite = this.spLoader:LoadSprite("f_fabaojuling_huawenbaijin") self.itemPreList[go].nameText.sprite = this.spLoader:LoadSprite(GetResourcePath(self.itemPreList[go].data.icon)) - self.itemPreList[go].slider.value = self.itemPreList[go].data.lv/self.itemPreList[go].data.maxLv - self.itemPreList[go].progress.text = self.itemPreList[go].data.lv.."/"..self.itemPreList[go].data.maxLv + self.itemPreList[go].slider.value = self.itemPreList[go].data.lv / self.itemPreList[go].data.maxLv + self.itemPreList[go].progress.text = self.itemPreList[go].data.lv .. "/" .. self.itemPreList[go].data.maxLv self.itemPreList[go].red.gameObject:SetActive(self:CheckRedPoint(self.itemPreList[go].data.trumpList)) --self.itemPreList[go].effect:SetActive(self.itemPreList[go].data.quality == 6) - - for i = 1,math.max(#data.trumpList,#self.itemPreList[go].iconList) do + + for i = 1, math.max(#data.trumpList, #self.itemPreList[go].iconList) do if not data.trumpList[i] then self.itemPreList[go].iconList[i].go.gameObject:SetActive(false) else self.itemPreList[go].iconList[i].go.gameObject:SetActive(true) - self.itemPreList[go].iconList[i].icon.sprite = this.spLoader:LoadSprite(GetResourcePath(data.trumpList[i].config.Icon)) + self.itemPreList[go].iconList[i].icon.sprite = this.spLoader:LoadSprite(GetResourcePath(data.trumpList[i] + .config.Icon)) end self.itemPreList[go].iconList[i].effecthong.gameObject:SetActive(data.trumpList[i].config.Quality == 6) self.itemPreList[go].iconList[i].effectjin.gameObject:SetActive(data.trumpList[i].config.Quality == 5) end - Util.SetParticleSortLayer(go,self.sortingOrder + 1) + Util.SetParticleSortLayer(go, self.sortingOrder + 1) --Util.SetParticleSortLayer(self.itemPreList[go].effect,self.sortingOrder + 1) - Util.AddOnceClick(go,function() - UIManager.OpenPanel(UIName.TailsmanSoulMainPanel,self.itemPreList[go].data.id) + Util.AddOnceClick(go, function() + UIManager.OpenPanel(UIName.TailsmanSoulMainPanel, self.itemPreList[go].data.id) end) end function TailsManSouPanel:CheckRedPoint(data) - for k,v in pairs(data) do - local costId,num = TailsManSoulManager.GetTailsmanCost(v.id,v.lv) + for k, v in pairs(data) do + local costId, num = TailsManSoulManager.GetTailsmanCost(v.id, v.lv) if num and num > 0 then if BagManager.GetItemCountById(costId) >= num then return true @@ -350,35 +379,35 @@ end --界面层级发生改变(用于子类重写) function TailsManSouPanel:OnSortingOrderChange() - for k,v in pairs(self.itemPreList) do - Util.SetParticleSortLayer(k,self.sortingOrder + 1) + for k, v in pairs(self.itemPreList) do + Util.SetParticleSortLayer(k, self.sortingOrder + 1) end - Util.SetParticleSortLayer(self.effectJin.gameObject,self.sortingOrder + 1) - Util.SetParticleSortLayer(self.effectHong.gameObject,self.sortingOrder + 1) + Util.SetParticleSortLayer(self.effectJin.gameObject, self.sortingOrder + 1) + Util.SetParticleSortLayer(self.effectHong.gameObject, self.sortingOrder + 1) end --界面关闭时调用(用于子类重写) function TailsManSouPanel:OnClose() - + end --界面销毁时调用(用于子类重写) function TailsManSouPanel:OnDestroy() - proId=1 + proId = 1 this.spLoader:Destroy() - for k,v in pairs(redPointList) do - ClearRedPointObject(k,v) + for k, v in pairs(redPointList) do + ClearRedPointObject(k, v) end SubUIManager.Close(self.scroll) self.itemPreList = {} redPointList = {} SubUIManager.Close(self.UpView) curPage = 1 - ClearRedPointObject(RedPointType.tailsmanSoul_gold,tabsRedpoints[1].gameObject) - ClearRedPointObject(RedPointType.tailsmanSoul_red,tabsRedpoints[2].gameObject) - ClearRedPointObject(RedPointType.tailsmanSoul_whiteGold,tabsRedpoints[3].gameObject) - ClearRedPointObject(RedPointType.tailsmanSoul_blue,tabsRedpoints[4].gameObject) - ClearRedPointObject(RedPointType.tailsmanSoul_whiteBlue,tabsRedpoints[5].gameObject) + ClearRedPointObject(RedPointType.tailsmanSoul_gold, tabsRedpoints[1].gameObject) + ClearRedPointObject(RedPointType.tailsmanSoul_red, tabsRedpoints[2].gameObject) + ClearRedPointObject(RedPointType.tailsmanSoul_whiteGold, tabsRedpoints[3].gameObject) + ClearRedPointObject(RedPointType.tailsmanSoul_blue, tabsRedpoints[4].gameObject) + ClearRedPointObject(RedPointType.tailsmanSoul_whiteBlue, tabsRedpoints[5].gameObject) end -return TailsManSouPanel \ No newline at end of file +return TailsManSouPanel diff --git a/Assets/Scripts/GameInit/GameStart.cs b/Assets/Scripts/GameInit/GameStart.cs index 0c56cf1774..2d4736522f 100644 --- a/Assets/Scripts/GameInit/GameStart.cs +++ b/Assets/Scripts/GameInit/GameStart.cs @@ -75,7 +75,7 @@ public class GameStart : MonoBehaviour void playSplash() { - bool isShowSplash = true; + bool isShowSplash = false; if (isShowSplash) { #if UNITY_IOS