【鸿蒙阵修改】
parent
4939dd69b8
commit
ca9a6a933b
|
@ -428,8 +428,9 @@ GameEvent = {
|
||||||
UnLoadData = "HongMeng.UnLoadData",
|
UnLoadData = "HongMeng.UnLoadData",
|
||||||
OnlyRefeshText = "HongMeng.OnlyRefeshText",
|
OnlyRefeshText = "HongMeng.OnlyRefeshText",
|
||||||
--鸿蒙塔消息号
|
--鸿蒙塔消息号
|
||||||
UpHongMengEnvoy = "UpHongMengEnvoy",
|
UpHongMengEnvoy = "HongMeng.UpHongMengEnvoy",
|
||||||
UnLoadHongMengEnvoy = "HongMeng.UnLoadHongMengEnvoy",
|
UnLoadHongMengEnvoy = "HongMeng.UnLoadHongMengEnvoy",
|
||||||
|
UpdateGongMingLv= "HongMeng.UpdateGongMingLv",
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -455,9 +455,15 @@ function this.SetCardSingleData(o, heroId, _pos, _heroData)
|
||||||
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
||||||
-- body
|
-- body
|
||||||
lv.text="<color=#0f0>"..heroData.lv.."</color>"
|
lv.text="<color=#0f0>"..heroData.lv.."</color>"
|
||||||
elseif HarmonyManager.IsGongMing(heroData.dynamicId) and HarmonyManager.hongmengTablet >= 330 then
|
elseif HarmonyManager.IsGongMing(heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||||
-- bod
|
-- bod
|
||||||
lv.text="<color=#ffbe22>"..heroData.lv.."</color>"
|
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||||
|
-- body
|
||||||
|
lv.text="<color=#ffbe22>"..heroData.lv.."</color>"
|
||||||
|
else
|
||||||
|
lv.text=heroData.lv
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
lv.text=heroData.lv
|
lv.text=heroData.lv
|
||||||
end
|
end
|
||||||
|
|
|
@ -95,7 +95,7 @@ end
|
||||||
|
|
||||||
function EnvoyItem:SetItem(go,data)
|
function EnvoyItem:SetItem(go,data)
|
||||||
self.data = data
|
self.data = data
|
||||||
LogGreen("HeroId",data.heroId)
|
-- LogGreen("HeroId",data.heroId)
|
||||||
CheckRedPointStatus(RedPointType.HongMeng_Evory)
|
CheckRedPointStatus(RedPointType.HongMeng_Evory)
|
||||||
if data.heroId ~= "" then
|
if data.heroId ~= "" then
|
||||||
-- body
|
-- body
|
||||||
|
@ -105,12 +105,12 @@ function EnvoyItem:SetItem(go,data)
|
||||||
Util.GetGameObject(go.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroSingleData.heroConfig.Quality,heroSingleData.star))
|
Util.GetGameObject(go.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroSingleData.heroConfig.Quality,heroSingleData.star))
|
||||||
if HeroManager.IsTenTalent(heroSingleData.star) then
|
if HeroManager.IsTenTalent(heroSingleData.star) then
|
||||||
-- body
|
-- body
|
||||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengTablet)
|
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengAdditions[1].value)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",heroSingleData.lv)
|
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",heroSingleData.lv)
|
||||||
end
|
end
|
||||||
|
|
||||||
Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengTablet)
|
--Util.GetGameObject(go.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengAdditions[1].value)
|
||||||
|
|
||||||
Util.GetGameObject(go.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(heroSingleData.icon)
|
Util.GetGameObject(go.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(heroSingleData.icon)
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ function HarmonyPanel:BindEvent()
|
||||||
--共鸣按钮
|
--共鸣按钮
|
||||||
Util.AddClick(self.GongMingBtn,function()
|
Util.AddClick(self.GongMingBtn,function()
|
||||||
local count = HarmonyManager:IsEnvoyCount()
|
local count = HarmonyManager:IsEnvoyCount()
|
||||||
if count >= 6 then
|
if count > 6 then
|
||||||
-- body
|
-- body
|
||||||
UIManager.OpenPanel(UIName.GongMingResultTips)
|
UIManager.OpenPanel(UIName.GongMingResultTips)
|
||||||
else
|
else
|
||||||
|
|
|
@ -34,7 +34,7 @@ function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet
|
||||||
this.hongmengGuards = hongmengGuards
|
this.hongmengGuards = hongmengGuards
|
||||||
--LogGreen("hongmengGuards",#this.hongmengGuards)
|
--LogGreen("hongmengGuards",#this.hongmengGuards)
|
||||||
|
|
||||||
|
|
||||||
this.TowerStartLimit = tonumber(string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,101).Value,"#")[2])
|
this.TowerStartLimit = tonumber(string.split(ConfigManager.GetConfigData(ConfigName.SpecialConfig,101).Value,"#")[2])
|
||||||
-- LogGreen("TowerStartLimit"..HarmonyManager.TowerStartLimit)
|
-- LogGreen("TowerStartLimit"..HarmonyManager.TowerStartLimit)
|
||||||
this.hongmengHeroInfos = hongmengHeroInfos
|
this.hongmengHeroInfos = hongmengHeroInfos
|
||||||
|
@ -61,13 +61,18 @@ function this.UpdateHongMengDataGuards(hongmengGuards)
|
||||||
for i = 1, #this.hongmengGuards do
|
for i = 1, #this.hongmengGuards do
|
||||||
this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp()
|
this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp()
|
||||||
end
|
end
|
||||||
|
if this.hongmengAdditions[1] then
|
||||||
if this.hongmengTablet < this.TowerStartLimit then
|
-- body
|
||||||
-- body
|
if this.hongmengAdditions[1].heroTid == 0 then
|
||||||
this:SetInitList()
|
-- body
|
||||||
else
|
this:SetTowerInit()
|
||||||
this:SetTowerInit()
|
elseif this.hongmengAdditions[1].heroTid == -1 then
|
||||||
end
|
-- body
|
||||||
|
else
|
||||||
|
this:SetInitList()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos)
|
function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos)
|
||||||
|
@ -76,40 +81,56 @@ function this.UpdateHongMengDataHeroInfos(hongmengHeroInfos)
|
||||||
this.hongmengHeroInfos[i].time = this.hongmengHeroInfos[i].time + GetTimeStamp()
|
this.hongmengHeroInfos[i].time = this.hongmengHeroInfos[i].time + GetTimeStamp()
|
||||||
end
|
end
|
||||||
|
|
||||||
if this.hongmengTablet < this.TowerStartLimit then
|
if this.hongmengAdditions[1] then
|
||||||
-- body
|
-- body
|
||||||
this:SetInitList()
|
if this.hongmengAdditions[1].heroTid == 0 then
|
||||||
else
|
-- body
|
||||||
this:SetTowerInit()
|
this:SetTowerInit()
|
||||||
|
elseif this.hongmengAdditions[1].heroTid == -1 then
|
||||||
|
-- body
|
||||||
|
else
|
||||||
|
this:SetInitList()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.UpdateHongMengDataAdditions(hongmengAdditions)
|
function this.UpdateHongMengDataAdditions(hongmengAdditions)
|
||||||
this.hongmengAdditions = hongmengAdditions
|
this.hongmengAdditions = hongmengAdditions
|
||||||
|
|
||||||
for i = 1, #this.hongmengAdditions do
|
for i = 1, #this.hongmengAdditions do
|
||||||
|
print(this.hongmengAdditions[i].heroTid)
|
||||||
|
print(this.hongmengAdditions[i].value)
|
||||||
|
end
|
||||||
|
for i = 1, #this.hongmengAdditions do
|
||||||
|
|
||||||
if this.hongmengAdditions[i].additionType == HarmonyAddType.AddEquip then
|
if this.hongmengAdditions[i].additionType == HarmonyAddType.AddEquip then
|
||||||
if this.hongmengAdditions[i].value ~= -1 then
|
if this.hongmengAdditions[i].value > 0 then
|
||||||
local curEquipIdList = {}
|
local curEquipIdList = {}
|
||||||
local curEquipConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Star",this.hongmengAdditions[i].value)
|
local curEquipConfigs = ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipConfig,"Star",this.hongmengAdditions[i].value)
|
||||||
for i = 1, #curEquipConfigs do
|
for i = 1, #curEquipConfigs do
|
||||||
|
|
||||||
table.insert(curEquipIdList,curEquipConfigs[i].Id)
|
table.insert(curEquipIdList,curEquipConfigs[i].Id)
|
||||||
end
|
end
|
||||||
this.HarmonyUpdateEquipData(curEquipIdList, "")
|
this.HarmonyUpdateEquipData(curEquipIdList, "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if this.hongmengAdditions[1].additionTypetion == 0 then
|
if this.hongmengAdditions[1] then
|
||||||
-- body
|
-- body
|
||||||
|
if this.hongmengAdditions[1].heroTid == 0 then
|
||||||
end
|
-- body
|
||||||
if this.hongmengTablet < this.TowerStartLimit then
|
this:SetTowerInit()
|
||||||
-- body
|
elseif this.hongmengAdditions[1].heroTid == -1 then
|
||||||
this:SetInitList()
|
-- body
|
||||||
else
|
else
|
||||||
this:SetTowerInit()
|
this:SetInitList()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
-- if this.hongmengTablet < this.TowerStartLimit then
|
||||||
|
-- -- body
|
||||||
|
|
||||||
|
-- else
|
||||||
|
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
--初始化共鸣列表数据
|
--初始化共鸣列表数据
|
||||||
|
@ -293,8 +314,6 @@ function this:IsEnvoy(did)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
-- 设置、获取鸿蒙守卫的列表
|
-- 设置、获取鸿蒙守卫的列表
|
||||||
|
@ -383,7 +402,7 @@ function this.GetHongMengUpData()
|
||||||
|
|
||||||
for key, value in ConfigPairs(HongmengUp) do
|
for key, value in ConfigPairs(HongmengUp) do
|
||||||
-- body
|
-- body
|
||||||
if value.HongmengLevel == this.hongmengTablet+1 then
|
if value.HongmengLevel == this.hongmengAdditions[1].value + 1 then
|
||||||
-- body
|
-- body
|
||||||
|
|
||||||
return ConfigManager.TryGetConfigData(ConfigName.HongmengUp,key)
|
return ConfigManager.TryGetConfigData(ConfigName.HongmengUp,key)
|
||||||
|
@ -528,6 +547,7 @@ end
|
||||||
|
|
||||||
function this.RefreshOpenBoxPoint()
|
function this.RefreshOpenBoxPoint()
|
||||||
local tab = ConfigManager.GetConfig(ConfigName.Hongmeng)
|
local tab = ConfigManager.GetConfig(ConfigName.Hongmeng)
|
||||||
|
local keys = GameDataBase.SheetBase.GetKeys(this.tab)
|
||||||
local Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi)
|
local Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi)
|
||||||
local DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal)
|
local DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal)
|
||||||
if #this.hongmengHeroInfos<=0 then
|
if #this.hongmengHeroInfos<=0 then
|
||||||
|
@ -543,15 +563,20 @@ end
|
||||||
|
|
||||||
function this.RefreshEnvoyPoint()
|
function this.RefreshEnvoyPoint()
|
||||||
-- body
|
-- body
|
||||||
if this.hongmengTablet >= this.TowerStartLimit then
|
if this.hongmengAdditions[1].heroTid == 0 then
|
||||||
-- body
|
-- body
|
||||||
for i = 1, #this.hongmengGuards do
|
local sum = this:HongMengTowerUpLimit()
|
||||||
|
if this.hongmengAdditions[1].value > sum then
|
||||||
-- body
|
-- body
|
||||||
if this.hongmengGuards[i].heroId == "" then
|
for i = 1, #this.hongmengGuards do
|
||||||
-- body
|
-- body
|
||||||
return true
|
if this.hongmengGuards[i].heroId == "" then
|
||||||
|
-- body
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
@ -559,23 +584,30 @@ end
|
||||||
|
|
||||||
function this.RefreshUpTowerPoint()
|
function this.RefreshUpTowerPoint()
|
||||||
-- body
|
-- body
|
||||||
local sum = this:HongMengTowerUpLimit()
|
|
||||||
if this.hongmengTablet > this.TowerStartLimit + sum * 5 then
|
if this.hongmengAdditions[1].heroTid == 0 then
|
||||||
-- body
|
-- body
|
||||||
return false
|
local sum = this:HongMengTowerUpLimit()
|
||||||
else
|
if this.hongmengAdditions[1].value > sum then
|
||||||
local data = this.GetHongMengUpData()
|
|
||||||
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
|
|
||||||
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
|
|
||||||
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then
|
|
||||||
-- body
|
-- body
|
||||||
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then
|
return false
|
||||||
return true
|
else
|
||||||
|
local data = this.GetHongMengUpData()
|
||||||
|
-- LogGreen(data.LevelUp[1][2].." "..data.LevelUp[2][2])
|
||||||
|
-- LogYellow(BagManager.GetTotalItemNum(UpViewRechargeType.Gold))
|
||||||
|
if data and BagManager.GetTotalItemNum(UpViewRechargeType.Gold) >= data.LevelUp[1][2] then
|
||||||
|
-- body
|
||||||
|
if BagManager.GetTotalItemNum(UpViewRechargeType.GrowthAmulet) >= data.LevelUp[2][2] then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
else
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
--票战力
|
--票战力
|
||||||
local oldPowerNum = 0
|
local oldPowerNum = 0
|
||||||
|
|
|
@ -119,7 +119,14 @@ function GongMingResultTips:OnOpen(skinId)
|
||||||
|
|
||||||
-- body
|
-- body
|
||||||
else
|
else
|
||||||
Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
|
if data[i].value ~= -1 then
|
||||||
|
-- body
|
||||||
|
print(data[i].heroTid )
|
||||||
|
Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
|
||||||
|
else
|
||||||
|
Util.GetGameObject(this.TextAll,"textFa"):GetComponent("Text").text =string.format("<color=red>无</color>")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--else
|
--else
|
||||||
|
|
|
@ -94,7 +94,7 @@ function HongMengEnvoyPanel:BindEvent()
|
||||||
--二级共鸣弹窗
|
--二级共鸣弹窗
|
||||||
local count = HarmonyManager:IsEnvoyCount()
|
local count = HarmonyManager:IsEnvoyCount()
|
||||||
LogGreen(count)
|
LogGreen(count)
|
||||||
if count >= 6 then
|
if count > 6 then
|
||||||
-- body
|
-- body
|
||||||
UIManager.OpenPanel(UIName.GongMingResultTips)
|
UIManager.OpenPanel(UIName.GongMingResultTips)
|
||||||
else
|
else
|
||||||
|
@ -127,17 +127,19 @@ function HongMengEnvoyPanel:BindEvent()
|
||||||
LogGreen("回调函数")
|
LogGreen("回调函数")
|
||||||
Gold = Gold - data.LevelUp[1][2]
|
Gold = Gold - data.LevelUp[1][2]
|
||||||
GrowthAmulet = GrowthAmulet - data.LevelUp[2][2]
|
GrowthAmulet = GrowthAmulet - data.LevelUp[2][2]
|
||||||
HarmonyManager.hongmengTablet = HarmonyManager.hongmengTablet + 1
|
HarmonyManager.hongmengAdditions[1].value = HarmonyManager.hongmengAdditions[1].value + 1
|
||||||
self.TextGold.text = Gold
|
self.TextGold.text = Gold
|
||||||
self.TextGrowthAmulet.text = GrowthAmulet
|
self.TextGrowthAmulet.text = GrowthAmulet
|
||||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||||
self.GradeText.text =
|
self.GradeText.text =
|
||||||
string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5)
|
string.format("%d/%d", HarmonyManager.hongmengAdditions[1].value, sum)
|
||||||
--检测红点
|
--检测红点 UpdateGongMingLv
|
||||||
CheckRedPointStatus(RedPointType.HongMeng_UpTower)
|
|
||||||
for i = 1, #self.EnvoyItemList do
|
for i = 1, #self.EnvoyItemList do
|
||||||
self.EnvoyItemList[i]:UpdateFun()
|
self.EnvoyItemList[i]:UpdateFun()
|
||||||
end
|
end
|
||||||
|
Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.UpdateGongMingLv)
|
||||||
|
CheckRedPointStatus(RedPointType.HongMeng_UpTower)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
@ -176,7 +178,7 @@ function HongMengEnvoyPanel:RunTimerFun()
|
||||||
end
|
end
|
||||||
function HongMengEnvoyPanel:IsUpBtnGray()
|
function HongMengEnvoyPanel:IsUpBtnGray()
|
||||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit + sum * 5 then
|
if HarmonyManager.hongmengAdditions[1].value >= sum then
|
||||||
-- body
|
-- body
|
||||||
Util.SetGray(self.UpBtn, true)
|
Util.SetGray(self.UpBtn, true)
|
||||||
self.imageGame:SetActive(false)
|
self.imageGame:SetActive(false)
|
||||||
|
@ -346,12 +348,12 @@ function HongMengEnvoyPanel:OnOpen(equipSId)
|
||||||
self.TextGrowthAmulet.text = GrowthAmulet
|
self.TextGrowthAmulet.text = GrowthAmulet
|
||||||
local sum = HarmonyManager:HongMengTowerUpLimit()
|
local sum = HarmonyManager:HongMengTowerUpLimit()
|
||||||
|
|
||||||
self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengTablet, HarmonyManager.TowerStartLimit + sum * 5)
|
self.GradeText.text = string.format("%d/%d", HarmonyManager.hongmengAdditions[1].value, sum)
|
||||||
self:IsUpBtnGray()
|
self:IsUpBtnGray()
|
||||||
self:InitTextMum()
|
self:InitTextMum()
|
||||||
|
|
||||||
self:RunTimerFun()
|
self:RunTimerFun()
|
||||||
self.timerEffect:Start()
|
-- self.timerEffect:Start()
|
||||||
end
|
end
|
||||||
function HongMengEnvoyPanel:InitTextMum()
|
function HongMengEnvoyPanel:InitTextMum()
|
||||||
local HeroCount = 0
|
local HeroCount = 0
|
||||||
|
|
|
@ -75,7 +75,7 @@ function HongMengUnLoadPanel:SetItem(go,data,index)
|
||||||
Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroSingleData.heroConfig.Quality,heroSingleData.star))
|
Util.GetGameObject(go.transform, "frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroSingleData.heroConfig.Quality,heroSingleData.star))
|
||||||
if index == 0 then
|
if index == 0 then
|
||||||
-- body
|
-- body
|
||||||
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",HarmonyManager.hongmengTablet)
|
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("<color=#0f0>%d</color>",heroSingleData.lv)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("%d",heroSingleData.oriLv)
|
Util.GetGameObject(go.transform, "lv/Text"):GetComponent("Text").text = string.format("%d",heroSingleData.oriLv)
|
||||||
end
|
end
|
||||||
|
|
|
@ -94,16 +94,11 @@ function this:InitBox()
|
||||||
local key = keys[index]
|
local key = keys[index]
|
||||||
-- print(index)
|
-- print(index)
|
||||||
this.SingleBoxDataShow(go, this.tab[key], index)
|
this.SingleBoxDataShow(go, this.tab[key], index)
|
||||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
ItemList[go] ={}
|
|
||||||
ItemList[go].index = index
|
|
||||||
|
|
||||||
ItemList[go].TimerText = TimerText
|
|
||||||
|
|
||||||
ItemList[go].Empty = Empty
|
|
||||||
end)
|
end)
|
||||||
|
print(LengthOfTable(ItemList))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,26 +109,33 @@ function this.RunTimerFun()
|
||||||
local refreshFunc = function()
|
local refreshFunc = function()
|
||||||
|
|
||||||
for key, value in pairs(ItemList) do
|
for key, value in pairs(ItemList) do
|
||||||
if value.index <= #HarmonyManager.hongmengHeroInfos then
|
if value.index <= #HarmonyManager.hongmengHeroInfos and value.index <= LengthOfTable(ItemList) then
|
||||||
--value.TimerText.text = ""
|
--value.TimerText.text = "" value.index <= #HarmonyManager.hongmengHeroInfos and
|
||||||
-- print("倒计时开启 .."..HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp())
|
-- print("倒计时开启 .."..HarmonyManager.hongmengHeroInfos[value].time - GetTimeStamp())
|
||||||
if value.TimerText ~=nil and value.Empty ~=nil then
|
if value.TimerText ~=nil and value.Empty ~=nil then
|
||||||
-- body
|
-- body
|
||||||
if HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp() > 0 then
|
if HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp() > 0 then
|
||||||
if value.Empty ~=nil then
|
if value.Empty ~=nil then
|
||||||
-- body
|
-- body
|
||||||
print(value.Empty," ")
|
--print(value.Empty," ")
|
||||||
if value.Empty.activeSelf == false then
|
if value.Empty.activeSelf == false then
|
||||||
-- body
|
-- body
|
||||||
value.Empty:SetActive(true)
|
value.Empty:SetActive(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp())
|
local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp())
|
||||||
|
--print(" ~~~~~ ",value.TimerText," xxxxx",time_content)
|
||||||
value.TimerText.text = string.format("<color=#ffbc22>%s</color>\n<color=#bd922a>后恢复</color>",time_content)
|
value.TimerText.text = string.format("<color=#ffbc22>%s</color>\n<color=#bd922a>后恢复</color>",time_content)
|
||||||
else
|
else
|
||||||
HarmonyManager.hongmengHeroInfos[value.index].time = 0
|
|
||||||
value.TimerText.text = ""
|
HarmonyManager.hongmengHeroInfos[value.index].time = 0
|
||||||
|
|
||||||
|
if value.TimerText then
|
||||||
|
-- body
|
||||||
|
value.TimerText.text = ""
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -155,6 +157,11 @@ function this.SingleBoxDataShow(go,boxData,index)
|
||||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
local redPoint = Util.GetGameObject(go.transform,"Box/Empty/redPoint")
|
local redPoint = Util.GetGameObject(go.transform,"Box/Empty/redPoint")
|
||||||
|
|
||||||
|
ItemList[go] ={}
|
||||||
|
ItemList[go].index = index
|
||||||
|
ItemList[go].TimerText = TimerText
|
||||||
|
ItemList[go].Empty = Empty
|
||||||
|
|
||||||
Empty:SetActive(true)
|
Empty:SetActive(true)
|
||||||
mask:SetActive(true)
|
mask:SetActive(true)
|
||||||
|
@ -311,10 +318,10 @@ end
|
||||||
function this:OnOpen()
|
function this:OnOpen()
|
||||||
|
|
||||||
this:AwakeLength()
|
this:AwakeLength()
|
||||||
|
ItemList = {}
|
||||||
this:InitBox()
|
this:InitBox()
|
||||||
this.RunTimerFun()
|
this.RunTimerFun()
|
||||||
this.timerEffect:Start()
|
--this.timerEffect:Start()
|
||||||
end
|
end
|
||||||
function this.SingleItemDataShow(clone,Itemdata)
|
function this.SingleItemDataShow(clone,Itemdata)
|
||||||
--LogGreen(clone.name.."||"..Itemdata.heroConfig.Id)
|
--LogGreen(clone.name.."||"..Itemdata.heroConfig.Id)
|
||||||
|
@ -363,14 +370,14 @@ function this:Refesh(id)
|
||||||
this.ScrollView:SetData(keys,function (index, go)
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
local key = keys[index]
|
local key = keys[index]
|
||||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
ItemList[go] ={}
|
-- ItemList[go] ={}
|
||||||
ItemList[go].index = index
|
-- ItemList[go].index = index
|
||||||
|
|
||||||
ItemList[go].TimerText = TimerText
|
-- ItemList[go].TimerText = TimerText
|
||||||
|
|
||||||
ItemList[go].Empty = Empty
|
-- ItemList[go].Empty = Empty
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
function this:OpenBoxFun()
|
function this:OpenBoxFun()
|
||||||
|
@ -421,37 +428,37 @@ function this:UpdateHero(Herodata)
|
||||||
this.ScrollView:SetData(keys,function (index, go)
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
local key = keys[index]
|
local key = keys[index]
|
||||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
ItemList[go] ={}
|
-- ItemList[go] ={}
|
||||||
ItemList[go].index = index
|
-- ItemList[go].index = index
|
||||||
|
|
||||||
ItemList[go].TimerText = TimerText
|
-- ItemList[go].TimerText = TimerText
|
||||||
|
|
||||||
ItemList[go].Empty = Empty
|
-- ItemList[go].Empty = Empty
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:GetItemList(index)
|
-- function this:GetItemList(index)
|
||||||
-- body
|
-- -- body
|
||||||
for key, value in pairs(ItemList) do
|
-- for key, value in pairs(ItemList) do
|
||||||
-- body
|
-- -- body
|
||||||
if value == index then
|
-- if value == index then
|
||||||
-- body
|
-- -- body
|
||||||
return key
|
-- return key
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
function this:UnLoadFun(msg)
|
function this:UnLoadFun(msg)
|
||||||
HeroCount = HeroCount - 1
|
HeroCount = HeroCount - 1
|
||||||
|
|
||||||
for key, value in pairs(ItemList) do
|
for key, value in pairs(ItemList) do
|
||||||
if value == TempItem then
|
if value.index == TempItem then
|
||||||
-- body
|
-- body
|
||||||
HarmonyManager.hongmengHeroInfos[value].time = msg.leftTime + GetTimeStamp()
|
HarmonyManager.hongmengHeroInfos[value.index].time = msg.leftTime + GetTimeStamp()
|
||||||
|
|
||||||
HarmonyManager.hongmengHeroInfos[value].heroId = ""
|
HarmonyManager.hongmengHeroInfos[value.index].heroId = ""
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -480,16 +487,34 @@ function this:UnLoadFun(msg)
|
||||||
this.ScrollView:SetData(keys,function (index, go)
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
local key = keys[index]
|
local key = keys[index]
|
||||||
this.SingleBoxDataShow(go, this.tab[key],index)
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
ItemList[go] ={}
|
-- ItemList[go] ={}
|
||||||
ItemList[go].index = index
|
-- ItemList[go].index = index
|
||||||
|
|
||||||
ItemList[go].TimerText = TimerText
|
-- ItemList[go].TimerText = TimerText
|
||||||
|
|
||||||
ItemList[go].Empty = Empty
|
-- ItemList[go].Empty = Empty
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function this:OnlyRefeshHeroLv()
|
||||||
|
ItemList = {}
|
||||||
|
local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度
|
||||||
|
this.ScrollView:SetData(keys,function (index, go)
|
||||||
|
local key = keys[index]
|
||||||
|
this.SingleBoxDataShow(go, this.tab[key],index)
|
||||||
|
-- local TimerText = Util.GetGameObject(go.transform,"Box/Empty/Image/Text"):GetComponent("Text")
|
||||||
|
-- local Empty = Util.GetGameObject(go.transform,"Box/Empty")
|
||||||
|
-- ItemList[go] ={}
|
||||||
|
-- ItemList[go].index = index
|
||||||
|
|
||||||
|
-- ItemList[go].TimerText = TimerText
|
||||||
|
|
||||||
|
-- ItemList[go].Empty = Empty
|
||||||
|
end)
|
||||||
|
|
||||||
|
end
|
||||||
--界面关闭时调用(用于子类重写)
|
--界面关闭时调用(用于子类重写)
|
||||||
function this:OnClose()
|
function this:OnClose()
|
||||||
if this.timerEffect then
|
if this.timerEffect then
|
||||||
|
@ -506,6 +531,8 @@ function this:AddListener()
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
||||||
|
|
||||||
|
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UpdateGongMingLv,self.OnlyRefeshHeroLv,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:RemoveListener()
|
function this:RemoveListener()
|
||||||
|
@ -514,6 +541,8 @@ function this:RemoveListener()
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UnLoadData,self.UnLoadFun,self)
|
||||||
|
|
||||||
|
Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UpdateGongMingLv,self.OnlyRefeshHeroLv,self)
|
||||||
end
|
end
|
||||||
function this:OnShow(...)
|
function this:OnShow(...)
|
||||||
-- body
|
-- body
|
||||||
|
|
|
@ -18,22 +18,31 @@ HeroData.__get__.lv = function(self)
|
||||||
if temp_lv > 0 and HarmonyManager.IsInfo(self.dynamicId) then
|
if temp_lv > 0 and HarmonyManager.IsInfo(self.dynamicId) then
|
||||||
|
|
||||||
--LogGreen(tostring(HeroManager.IsElevenStar(self.star)))
|
--LogGreen(tostring(HeroManager.IsElevenStar(self.star)))
|
||||||
if HeroManager.IsTenTalent(self.star) and HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit then
|
print(self._star.." "..tostring(HeroManager.IsTenTalent(self._star)).." "..HarmonyManager.hongmengAdditions[1].heroTid..self.heroConfig.ReadingName)
|
||||||
|
if HeroManager.IsTenTalent(self._star) and HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||||
-- body
|
-- body
|
||||||
endLv = HarmonyManager.hongmengTablet
|
|
||||||
else
|
endLv = HarmonyManager.hongmengAdditions[1].value
|
||||||
|
print(endLv," "..self.heroConfig.ReadingName)
|
||||||
|
else
|
||||||
local curlvEen = HeroManager.heroLvEnd[self.id]
|
local curlvEen = HeroManager.heroLvEnd[self.id]
|
||||||
--print(curlvEen," "..self.heroConfig.ReadingName)
|
--
|
||||||
endLv = temp_lv > curlvEen and curlvEen or temp_lv
|
endLv = temp_lv > curlvEen and curlvEen or temp_lv
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return endLv
|
return endLv
|
||||||
elseif HarmonyManager.hongmengTablet>= HarmonyManager.TowerStartLimit and HarmonyManager:IsEnvoy(self.dynamicId) then
|
elseif HarmonyManager.hongmengAdditions[1] and HarmonyManager:IsEnvoy(self.dynamicId) then
|
||||||
|
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||||
|
-- body
|
||||||
|
return HarmonyManager.hongmengAdditions[1].value
|
||||||
|
else
|
||||||
|
return self._lv
|
||||||
|
end
|
||||||
-- body
|
-- body
|
||||||
--self._lv = HarmonyManager.hongmengTablet
|
--self._lv = HarmonyManager.hongmengTablet
|
||||||
|
|
||||||
return HarmonyManager.hongmengTablet
|
|
||||||
else
|
else
|
||||||
return self._lv
|
return self._lv
|
||||||
end
|
end
|
||||||
|
|
|
@ -479,7 +479,7 @@ function this.ExecuteLoading()
|
||||||
--[[[34] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end,
|
--[[[34] =]] function() HeroManager.CheckRepeatTreasure(LoadingPanel.OnStep) end,
|
||||||
--[[[34] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end,
|
--[[[34] =]] function() XiaoYaoManager.GetOpenMapData(LoadingPanel.OnStep) end,
|
||||||
function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end,
|
function() NetManager.GetHeroSkinData(LoadingPanel.OnStep) end,
|
||||||
--function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end,
|
function() NetManager.HongMengInfoResponse(LoadingPanel.OnStep) end,
|
||||||
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
|
--[[[35] =]] function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||||
|
|
||||||
if AppConst.isGuide then
|
if AppConst.isGuide then
|
||||||
|
|
|
@ -61,8 +61,10 @@ local mainDynamicActivityIcon = {
|
||||||
[9] = "r_zjm_huodongicon-xuanjimiaosuan", ----玄机妙算
|
[9] = "r_zjm_huodongicon-xuanjimiaosuan", ----玄机妙算
|
||||||
[10] = "r_zjm_huodongicon-xianglongfuhu", ----降龙伏虎
|
[10] = "r_zjm_huodongicon-xianglongfuhu", ----降龙伏虎
|
||||||
[11] = "r_zjm_huodongicon-qikaidesheng", ----旗开得胜
|
[11] = "r_zjm_huodongicon-qikaidesheng", ----旗开得胜
|
||||||
[12] = "r_zjm_huodongicon-qikaidesheng",
|
[12] = "r_zjm_huodongicon-bianhuanmoce", ----变幻莫测
|
||||||
[13] = "r_zjm_huodongicon-qikaidesheng",
|
[13] = "r_zjm_huodongicon-bowenduoshi", ----博文多识
|
||||||
|
[14] = "r_zjm_huodongicon-tianxiangjiren", ----天相吉人
|
||||||
|
[15] = "r_zjm_huodongicon-suoxiangpimi", ----所向披靡
|
||||||
}
|
}
|
||||||
function this:AddFuncItem(btnGO, pos)
|
function this:AddFuncItem(btnGO, pos)
|
||||||
return {go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos}
|
return {go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos}
|
||||||
|
@ -234,6 +236,7 @@ function this:InitComponent()
|
||||||
-- 无尽
|
-- 无尽
|
||||||
this.btnEndLess = Util.GetGameObject(self.gameObject, "LeftDown/btnRoot/btnEndLess")
|
this.btnEndLess = Util.GetGameObject(self.gameObject, "LeftDown/btnRoot/btnEndLess")
|
||||||
this.btnEndLess:SetActive(false)
|
this.btnEndLess:SetActive(false)
|
||||||
|
|
||||||
--鸿蒙
|
--鸿蒙
|
||||||
this.btnHongMeng=Util.GetGameObject(self.gameObject,"RightDown/btnHongMeng")
|
this.btnHongMeng=Util.GetGameObject(self.gameObject,"RightDown/btnHongMeng")
|
||||||
this.HongMengRedPoint = Util.GetGameObject(this.btnHongMeng,"redPoint")
|
this.HongMengRedPoint = Util.GetGameObject(this.btnHongMeng,"redPoint")
|
||||||
|
@ -283,7 +286,6 @@ function this:InitComponent()
|
||||||
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:AddFuncItem(this.btnWaiDi, 0),
|
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:AddFuncItem(this.btnWaiDi, 0),
|
||||||
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:AddFuncItem(this.btnCompoundHero, 0),--神将合成、置换
|
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:AddFuncItem(this.btnCompoundHero, 0),--神将合成、置换
|
||||||
[FUNCTION_OPEN_TYPE.POKEMON] = this:AddFuncItem(this.btnPokemon, -1200),--神将合成、置换
|
[FUNCTION_OPEN_TYPE.POKEMON] = this:AddFuncItem(this.btnPokemon, -1200),--神将合成、置换
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.operateNewText = {
|
this.operateNewText = {
|
||||||
|
@ -305,7 +307,6 @@ function this:InitComponent()
|
||||||
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:InsertNewText(this.btnWaiDi),
|
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:InsertNewText(this.btnWaiDi),
|
||||||
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:InsertNewText(this.btnCompoundHero),--神将合成、置换
|
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:InsertNewText(this.btnCompoundHero),--神将合成、置换
|
||||||
[FUNCTION_OPEN_TYPE.POKEMON] = this:InsertNewText(this.btnPokemon),--神将合成、置换
|
[FUNCTION_OPEN_TYPE.POKEMON] = this:InsertNewText(this.btnPokemon),--神将合成、置换
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- 红点
|
-- 红点
|
||||||
|
@ -331,7 +332,7 @@ function this:InitComponent()
|
||||||
this.rpColorfulWorld = Util.GetGameObject(this.btnColorfulWorld, "redPoint")
|
this.rpColorfulWorld = Util.GetGameObject(this.btnColorfulWorld, "redPoint")
|
||||||
this.rpCompoundHero = Util.GetGameObject(this.btnCompoundHero, "redPoint")--神将合成、置换
|
this.rpCompoundHero = Util.GetGameObject(this.btnCompoundHero, "redPoint")--神将合成、置换
|
||||||
this.rpPokemon = Util.GetGameObject(this.btnPokemon, "redPoint")--灵兽
|
this.rpPokemon = Util.GetGameObject(this.btnPokemon, "redPoint")--灵兽
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform)
|
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform)
|
||||||
|
@ -394,7 +395,7 @@ function this:InitComponent()
|
||||||
this.GuideEffectGo.transform.localScale = Vector3.one
|
this.GuideEffectGo.transform.localScale = Vector3.one
|
||||||
Util.GetGameObject(this.GuideEffectGo, "GameObject"):SetActive(false)
|
Util.GetGameObject(this.GuideEffectGo, "GameObject"):SetActive(false)
|
||||||
this.GuideJumpEffectGo = poolManager:LoadAsset("GuideEffect", PoolManager.AssetType.GameObject)
|
this.GuideJumpEffectGo = poolManager:LoadAsset("GuideEffect", PoolManager.AssetType.GameObject)
|
||||||
--this.GuideJumpEffectGo.transform:SetParent(this.mainTaskJumpImage.transform)
|
-- this.GuideJumpEffectGo.transform:SetParent(this.mainTaskJumpImage.transform)
|
||||||
this.GuideJumpEffectGo.transform.localPosition = Vector3.zero
|
this.GuideJumpEffectGo.transform.localPosition = Vector3.zero
|
||||||
this.GuideJumpEffectGo.transform.localScale = Vector3.one
|
this.GuideJumpEffectGo.transform.localScale = Vector3.one
|
||||||
Util.GetGameObject(this.GuideJumpEffectGo, "GameObject"):SetActive(false)
|
Util.GetGameObject(this.GuideJumpEffectGo, "GameObject"):SetActive(false)
|
||||||
|
@ -406,6 +407,7 @@ function this:InitComponent()
|
||||||
this.btnFunHide[FUNCTION_OPEN_TYPE.GOODFRIEND] = this.btnFriend
|
this.btnFunHide[FUNCTION_OPEN_TYPE.GOODFRIEND] = this.btnFriend
|
||||||
this.btnFunHide[FUNCTION_OPEN_TYPE.ALLRANKING] = this.btnRank
|
this.btnFunHide[FUNCTION_OPEN_TYPE.ALLRANKING] = this.btnRank
|
||||||
this.btnFunHide[FUNCTION_OPEN_TYPE.HongMengZhen] = this.btnHongMeng
|
this.btnFunHide[FUNCTION_OPEN_TYPE.HongMengZhen] = this.btnHongMeng
|
||||||
|
|
||||||
--this.btnFunGray[FUNCTION_OPEN_TYPE.NORMALCARBON] = this.btnFuBen
|
--this.btnFunGray[FUNCTION_OPEN_TYPE.NORMALCARBON] = this.btnFuBen
|
||||||
--this.btnFunGray[FUNCTION_OPEN_TYPE.MONSTER_COMING] = this.btnMonster
|
--this.btnFunGray[FUNCTION_OPEN_TYPE.MONSTER_COMING] = this.btnMonster
|
||||||
--this.btnFunGray[FUNCTION_OPEN_TYPE.ADVENTURE] = this.btnMijing
|
--this.btnFunGray[FUNCTION_OPEN_TYPE.ADVENTURE] = this.btnMijing
|
||||||
|
@ -885,9 +887,9 @@ function this:BindEvent()
|
||||||
Util.AddClick(this.btnDemonSlayer, function()
|
Util.AddClick(this.btnDemonSlayer, function()
|
||||||
UIManager.OpenPanel(UIName.DemonSlayerPanel)
|
UIManager.OpenPanel(UIName.DemonSlayerPanel)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Util.AddClick(this.btnHongMeng,function()
|
Util.AddClick(this.btnHongMeng,function()
|
||||||
if HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
if HarmonyManager:HongMengTowerUpLimit() > 0 then
|
||||||
-- body
|
-- body
|
||||||
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
|
UIManager.OpenPanel(UIName.HongMengEnvoyPanel)
|
||||||
else
|
else
|
||||||
|
@ -1194,7 +1196,7 @@ function this:OnShow()
|
||||||
-- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
-- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
||||||
--end
|
--end
|
||||||
CheckRedPointStatus(RedPointType.RankingSort)
|
CheckRedPointStatus(RedPointType.RankingSort)
|
||||||
if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then
|
if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5)
|
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5)
|
||||||
PlayerManager.IsGetFiveStarHero = false
|
PlayerManager.IsGetFiveStarHero = false
|
||||||
end
|
end
|
||||||
|
@ -1479,7 +1481,6 @@ function this.TimeFormat()
|
||||||
if dynamicAct then
|
if dynamicAct then
|
||||||
if isRefeshIcon then
|
if isRefeshIcon then
|
||||||
local curindex = GlobalActConfig[dynamicAct].ShowArt
|
local curindex = GlobalActConfig[dynamicAct].ShowArt
|
||||||
print(curindex," ",mainDynamicActivityIcon[curindex])
|
|
||||||
Util.GetGameObject(this.btnDynamicActivity,"Image"):GetComponent("Image").sprite = Util.LoadSprite(mainDynamicActivityIcon[curindex])
|
Util.GetGameObject(this.btnDynamicActivity,"Image"):GetComponent("Image").sprite = Util.LoadSprite(mainDynamicActivityIcon[curindex])
|
||||||
isRefeshIcon = false
|
isRefeshIcon = false
|
||||||
end
|
end
|
||||||
|
|
|
@ -4793,11 +4793,12 @@ end
|
||||||
-- 鸿蒙阵 游戏开始 拿到的数据
|
-- 鸿蒙阵 游戏开始 拿到的数据
|
||||||
function this.HongMengInfoResponse(func)
|
function this.HongMengInfoResponse(func)
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.HONGMENG_GET_INFO_REQUEST,MessageTypeProto_pb.HONGMENG_GET_INFO_RESPONSE,nil,function(buffer)
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.HONGMENG_GET_INFO_REQUEST,MessageTypeProto_pb.HONGMENG_GET_INFO_RESPONSE,nil,function(buffer)
|
||||||
local data = buffer:DataByte()
|
LogGreen("请求鸿蒙阵数据")
|
||||||
local msg = HeroInfoProto_pb.GetHongmengInfoResponse()
|
-- local data = buffer:DataByte()
|
||||||
msg:ParseFromString(data)
|
-- local msg = HeroInfoProto_pb.GetHongmengInfoResponse()
|
||||||
-- print("接收数据成功")
|
-- msg:ParseFromString(data)
|
||||||
HarmonyManager.InitHongMengData(msg.hongmengGuards,msg.hongmengHeroInfos,msg.hongmengTablet,msg.hongmengAdditions)
|
-- -- print("接收数据成功")
|
||||||
|
-- HarmonyManager.InitHongMengData(msg.hongmengGuards,msg.hongmengHeroInfos,msg.hongmengTablet,msg.hongmengAdditions)
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
|
|
|
@ -124,9 +124,14 @@ function this.SingleHeroDataShow(go,_heroData)
|
||||||
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
||||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||||
GongMingMask:SetActive(true)
|
GongMingMask:SetActive(true)
|
||||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
|
||||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||||
GongMingMask:SetActive(true)
|
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||||
|
-- body
|
||||||
|
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||||
|
GongMingMask:SetActive(true)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Util.AddOnceClick(GongMingMask, function()
|
Util.AddOnceClick(GongMingMask, function()
|
||||||
|
|
|
@ -155,9 +155,13 @@ function this.SingleHeroDataShow(go,_heroData)
|
||||||
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
||||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||||
GongMingMask:SetActive(true)
|
GongMingMask:SetActive(true)
|
||||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) then
|
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||||
GongMingMask:SetActive(true)
|
-- body
|
||||||
|
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||||
|
GongMingMask:SetActive(true)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Util.AddOnceClick(GongMingMask, function()
|
Util.AddOnceClick(GongMingMask, function()
|
||||||
|
|
|
@ -241,7 +241,7 @@ function this:UpdateHeroUpLvAndBreakMaterialShow()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager.hongmengTablet >=HarmonyManager.TowerStartLimit)
|
local isGongMing = HarmonyManager.IsChangeColor(curHeroData.dynamicId) or (HarmonyManager:IsEnvoy(curHeroData.dynamicId) and HarmonyManager.hongmengAdditions[1].heroTid == 0)
|
||||||
if isGongMing then
|
if isGongMing then
|
||||||
this.gongmingText:SetActive(true)
|
this.gongmingText:SetActive(true)
|
||||||
this.upLv:SetActive(false)
|
this.upLv:SetActive(false)
|
||||||
|
|
|
@ -266,8 +266,14 @@ function this.SingleHeroDataShow(_go,_heroData)
|
||||||
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
if HarmonyManager.IsChangeColor(heroData.dynamicId) then
|
||||||
-- body
|
-- body
|
||||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||||
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengTablet >= HarmonyManager.TowerStartLimit then
|
elseif HarmonyManager:IsEnvoy(heroData.dynamicId) and HarmonyManager.hongmengAdditions[1] then
|
||||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
if HarmonyManager.hongmengAdditions[1].heroTid == 0 then
|
||||||
|
-- body
|
||||||
|
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||||
|
|
||||||
|
else
|
||||||
|
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = heroData.lv
|
||||||
|
end
|
||||||
else
|
else
|
||||||
|
|
||||||
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = heroData.lv
|
Util.GetGameObject(_go.transform, "card/lv/Text"):GetComponent("Text").text = heroData.lv
|
||||||
|
|
Loading…
Reference in New Issue