【心魔试炼、幸运探宝】星级特效显示、高级探宝时间显示000000
parent
00bd84f77c
commit
6bbf30e344
|
|
@ -206,9 +206,9 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, monsterconfig.MonsterId)
|
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, monsterconfig.MonsterId)
|
||||||
|
|
||||||
local bg=Util.GetGameObject(o,"Bg1"):GetComponent("Image")
|
local bg=Util.GetGameObject(o,"Bg1"):GetComponent("Image")
|
||||||
bg.sprite = this.spLoader:LoadSprite(GetHeroCardStarBg[heroConfig.Star])
|
bg.sprite = this.spLoader:LoadSprite(GetHeroCardStarBg[monsterconfig.Star])
|
||||||
local fg=Util.GetGameObject(o,"Bg2"):GetComponent("Image")
|
local fg=Util.GetGameObject(o,"Bg2"):GetComponent("Image")
|
||||||
fg.sprite = this.spLoader:LoadSprite(GetHeroCardStarFg[heroConfig.Star])
|
fg.sprite = this.spLoader:LoadSprite(GetHeroCardStarFg[monsterconfig.Star])
|
||||||
|
|
||||||
-- local live=Util.GetGameObject(o,"Mask/Live")
|
-- local live=Util.GetGameObject(o,"Mask/Live")
|
||||||
local lv=Util.GetGameObject(o,"lv/Text"):GetComponent("Text")
|
local lv=Util.GetGameObject(o,"lv/Text"):GetComponent("Text")
|
||||||
|
|
@ -217,7 +217,7 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
local pro=Util.GetGameObject(o,"Pro/Image"):GetComponent("Image")
|
local pro=Util.GetGameObject(o,"Pro/Image"):GetComponent("Image")
|
||||||
pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
|
pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
|
||||||
local starGrid=Util.GetGameObject(o,"StarGrid")
|
local starGrid=Util.GetGameObject(o,"StarGrid")
|
||||||
SetCardStars(starGrid,heroConfig.Star)
|
SetCardStars(starGrid,monsterconfig.Star)
|
||||||
local name=Util.GetGameObject(o,"Name/Text"):GetComponent("Text")
|
local name=Util.GetGameObject(o,"Name/Text"):GetComponent("Text")
|
||||||
name.text=heroConfig.ReadingName
|
name.text=heroConfig.ReadingName
|
||||||
|
|
||||||
|
|
@ -231,7 +231,7 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
live.transform.localPosition = Vector3.zero
|
live.transform.localPosition = Vector3.zero
|
||||||
|
|
||||||
local zs = Util.GetGameObject(o, "zs")
|
local zs = Util.GetGameObject(o, "zs")
|
||||||
local zsName = GetHeroCardStarZs[heroConfig.Star]
|
local zsName = GetHeroCardStarZs[monsterconfig.Star]
|
||||||
if zsName == "" then
|
if zsName == "" then
|
||||||
zs:SetActive(false)
|
zs:SetActive(false)
|
||||||
else
|
else
|
||||||
|
|
@ -239,19 +239,18 @@ function this.SetCardSingleData(o,monsterId, _pos)
|
||||||
zs:GetComponent("Image").sprite = this.spLoader:LoadSprite(zsName)
|
zs:GetComponent("Image").sprite = this.spLoader:LoadSprite(zsName)
|
||||||
end
|
end
|
||||||
|
|
||||||
if heroConfig.Star > 9 then
|
local effect = Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai")
|
||||||
Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai").gameObject:SetActive(true)
|
effect.gameObject:SetActive(monsterconfig.Star > 9)
|
||||||
else
|
Util.SetParticleSortLayer(effect.gameObject, sortingOrder + 1)
|
||||||
Util.GetGameObject(o,"UI_Effect_jinkuang_KaPai").gameObject:SetActive(false)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnClose()
|
function this:OnClose()
|
||||||
|
sortingOrder = 0
|
||||||
rewardData = {}
|
rewardData = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:OnDestroy()
|
function this:OnDestroy()
|
||||||
|
sortingOrder = 0
|
||||||
this.spLoader:Destroy()
|
this.spLoader:Destroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -678,7 +678,7 @@ function this.RefreshBtnCountDown()
|
||||||
if BagManager.GetItemCountById(63)>0 then
|
if BagManager.GetItemCountById(63)>0 then
|
||||||
--显示免费刷新
|
--显示免费刷新
|
||||||
this.SetRefreshBtnShowState(true)
|
this.SetRefreshBtnShowState(true)
|
||||||
this.freeRefreshTime.text=" 0:00:00"
|
this.freeRefreshTime.text=" "
|
||||||
else
|
else
|
||||||
--显示道具刷新
|
--显示道具刷新
|
||||||
this.SetRefreshBtnShowState(false)
|
this.SetRefreshBtnShowState(false)
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,7 @@ end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function MonsterCampNewPanel:OnShow()
|
function MonsterCampNewPanel:OnShow()
|
||||||
|
this.sortingOrder = self.sortingOrder
|
||||||
this.OnShowPanel()
|
this.OnShowPanel()
|
||||||
end
|
end
|
||||||
function this.OnShowPanel()
|
function this.OnShowPanel()
|
||||||
|
|
@ -229,7 +230,7 @@ function this.SingleDataShow(go, data)
|
||||||
local singledata = MonsterCampSingleWave:New(go)
|
local singledata = MonsterCampSingleWave:New(go)
|
||||||
go:GetComponent("RectTransform").sizeDelta=Vector2.New(screenwidth,380)
|
go:GetComponent("RectTransform").sizeDelta=Vector2.New(screenwidth,380)
|
||||||
singledata:InitComponent(go,data)
|
singledata:InitComponent(go,data)
|
||||||
singledata:OnOpen()
|
singledata:OnOpen(this.sortingOrder)
|
||||||
return singledata
|
return singledata
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,19 +18,17 @@ function MonsterCampSingleWave:InitComponent(go,_data)
|
||||||
self.hero = Util.GetGameObject(go,"bg/Hero")
|
self.hero = Util.GetGameObject(go,"bg/Hero")
|
||||||
self.frame=Util.GetGameObject(self.hero,"Bg1"):GetComponent("Image")
|
self.frame=Util.GetGameObject(self.hero,"Bg1"):GetComponent("Image")
|
||||||
self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("RawImage")
|
self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("RawImage")
|
||||||
-- self.icon=Util.GetGameObject(self.hero, "Mask/icon"):GetComponent("Image")
|
|
||||||
self.lv = Util.GetGameObject(self.hero, "lv/Text"):GetComponent("Text")
|
self.lv = Util.GetGameObject(self.hero, "lv/Text"):GetComponent("Text")
|
||||||
self.pro = Util.GetGameObject(self.hero, "Pro/Image"):GetComponent("Image")
|
self.pro = Util.GetGameObject(self.hero, "Pro/Image"):GetComponent("Image")
|
||||||
self.fg = Util.GetGameObject(self.hero,"Bg2"):GetComponent("Image")
|
self.fg = Util.GetGameObject(self.hero,"Bg2"):GetComponent("Image")
|
||||||
--self.starGrid = Util.GetGameObject(self.hero,"starGrid")
|
|
||||||
self.starGrid = Util.GetGameObject(self.hero,"StarGrid")
|
self.starGrid = Util.GetGameObject(self.hero,"StarGrid")
|
||||||
self.name=Util.GetGameObject(self.hero,"Name/Text"):GetComponent("Text")
|
self.name=Util.GetGameObject(self.hero,"Name/Text"):GetComponent("Text")
|
||||||
|
self.effect = Util.GetGameObject(self.hero,"UI_Effect_jinkuang_KaPai")
|
||||||
|
|
||||||
|
|
||||||
self.reward = Util.GetGameObject(go,"bg/rewardRect")
|
self.reward = Util.GetGameObject(go,"bg/rewardRect")
|
||||||
self.fight = Util.GetGameObject(go,"bg/fight")
|
self.fight = Util.GetGameObject(go,"bg/fight")
|
||||||
self.pass = Util.GetGameObject(go,"bg/pass"):GetComponent("Image")
|
self.pass = Util.GetGameObject(go,"bg/pass"):GetComponent("Image")
|
||||||
-- self.title = Util.GetGameObject(go,"bg/leftLayout/title"):GetComponent("Image")
|
|
||||||
self.rewardText = Util.GetGameObject(self.reward,"Text"):GetComponent("Text")
|
self.rewardText = Util.GetGameObject(self.reward,"Text"):GetComponent("Text")
|
||||||
self.fightBtnIcon = Util.GetGameObject(self.fight,"layout/icon"):GetComponent("Image")
|
self.fightBtnIcon = Util.GetGameObject(self.fight,"layout/icon"):GetComponent("Image")
|
||||||
self.fightBtnNum = Util.GetGameObject(self.fight,"layout/num"):GetComponent("Text")
|
self.fightBtnNum = Util.GetGameObject(self.fight,"layout/num"):GetComponent("Text")
|
||||||
|
|
@ -38,7 +36,7 @@ function MonsterCampSingleWave:InitComponent(go,_data)
|
||||||
self.fightBtnMask = Util.GetGameObject(self.fight,"mask"):GetComponent("Image")
|
self.fightBtnMask = Util.GetGameObject(self.fight,"mask"):GetComponent("Image")
|
||||||
self.bg = Util.GetGameObject(go,"bg"):GetComponent("Image")
|
self.bg = Util.GetGameObject(go,"bg"):GetComponent("Image")
|
||||||
self.rewardGrid = Util.GetGameObject(self.reward,"grid")
|
self.rewardGrid = Util.GetGameObject(self.reward,"grid")
|
||||||
|
|
||||||
self.btn=Util.GetGameObject(go,"bg/btn")
|
self.btn=Util.GetGameObject(go,"bg/btn")
|
||||||
self.data = _data
|
self.data = _data
|
||||||
Util.GetGameObject(self.hero, "finishImage"):GetComponent("Image").sprite = self.spLoader:LoadSprite("s_silingshilian_yitongguan_zh")
|
Util.GetGameObject(self.hero, "finishImage"):GetComponent("Image").sprite = self.spLoader:LoadSprite("s_silingshilian_yitongguan_zh")
|
||||||
|
|
@ -50,8 +48,8 @@ function MonsterCampSingleWave:InitComponent(go,_data)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MonsterCampSingleWave:OnOpen()
|
function MonsterCampSingleWave:OnOpen(_sortingOrder)
|
||||||
self:UpdatePrivilage()
|
self:UpdatePrivilage()
|
||||||
self.Id.text = "第"..self.data.Id.."层"
|
self.Id.text = "第"..self.data.Id.."层"
|
||||||
self.power.text = self.data.Force
|
self.power.text = self.data.Force
|
||||||
self.bg.sprite = self.spLoader:LoadSprite("s_silingshilian_shiliandi")
|
self.bg.sprite = self.spLoader:LoadSprite("s_silingshilian_shiliandi")
|
||||||
|
|
@ -66,30 +64,10 @@ function MonsterCampSingleWave:OnOpen()
|
||||||
self.reward.gameObject:SetActive(true)
|
self.reward.gameObject:SetActive(true)
|
||||||
else
|
else
|
||||||
self.reward.gameObject:SetActive(false)
|
self.reward.gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
|
self.effect.gameObject:SetActive(false)--因为穿透,所以关闭了
|
||||||
|
Util.SetParticleSortLayer(self.effect.gameObject, _sortingOrder + 1)
|
||||||
|
|
||||||
-- if self.data.Id < MonsterCampManager.monsterWave then
|
|
||||||
-- self.fight.gameObject:SetActive(false)
|
|
||||||
-- self.reward.gameObject:SetActive(false)
|
|
||||||
-- else
|
|
||||||
-- self.fight.gameObject:SetActive(true)
|
|
||||||
-- self.rewardText.text = "挑战奖励"
|
|
||||||
|
|
||||||
-- self:SetIcon()
|
|
||||||
-- self.rewardData = self.data.RewardShow
|
|
||||||
-- if self.rewardData and #self.rewardData then
|
|
||||||
-- self:InitShowReward()
|
|
||||||
-- self.reward.gameObject:SetActive(true)
|
|
||||||
-- else
|
|
||||||
-- self.reward.gameObject:SetActive(false)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- Util.AddOnceClick(self.pass.gameObject, function()
|
|
||||||
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
|
||||||
-- end)
|
|
||||||
-- Util.AddOnceClick(self.hero, function()
|
|
||||||
-- UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
|
||||||
-- end)
|
|
||||||
Util.AddOnceClick(self.btn, function()
|
Util.AddOnceClick(self.btn, function()
|
||||||
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.data.Id)
|
||||||
end)
|
end)
|
||||||
|
|
@ -103,7 +81,7 @@ function MonsterCampSingleWave:OnOpen()
|
||||||
self:UpdatePrivilage()
|
self:UpdatePrivilage()
|
||||||
CheckRedPointStatus(RedPointType.EpicExplore_MoppingUp)
|
CheckRedPointStatus(RedPointType.EpicExplore_MoppingUp)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
if self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡
|
if self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡
|
||||||
LogGreen(self.freeTimes..self.buyTimes)
|
LogGreen(self.freeTimes..self.buyTimes)
|
||||||
|
|
@ -129,42 +107,6 @@ function MonsterCampSingleWave:OnOpen()
|
||||||
elseif self.data.Id == MonsterCampManager.monsterWave then--挑战
|
elseif self.data.Id == MonsterCampManager.monsterWave then--挑战
|
||||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.MONSTER_CAMP)
|
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.MONSTER_CAMP)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- if self.data.Id == MonsterCampManager.monsterWave - 1 then
|
|
||||||
-- LogGreen(self.freeTimes..self.buyTimes)
|
|
||||||
-- if self.freeTimes <=0 and self.buyTimes <= 0 then
|
|
||||||
-- PopupTipPanel.ShowTip("今日已无扫荡次数!")
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
-- LogGreen(self.itemId.." "..self.costNum)
|
|
||||||
-- if self.freeTimes <= 0 then
|
|
||||||
-- if BagManager.GetItemCountById(self.itemId) < self.costNum then
|
|
||||||
-- PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[self.itemId].Name))
|
|
||||||
-- return
|
|
||||||
-- end
|
|
||||||
-- MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数?",self.costNum,itemConfig[self.itemId].Name),function() end,function()
|
|
||||||
-- ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,self.storeDataId,1,function()
|
|
||||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(self.trailData.buyTimeId, 1)
|
|
||||||
-- x()
|
|
||||||
-- end)
|
|
||||||
-- end,"取消","确定")
|
|
||||||
-- else
|
|
||||||
-- x()
|
|
||||||
-- end
|
|
||||||
-- elseif self.data.Id == self.trailData.monsterWave + 1 then
|
|
||||||
-- if self.trailData.canFightTime > 0 then
|
|
||||||
-- if LengthOfTable(FormationManager.GetWuJinFormationHeroIds(self.trailData.fourElementType + 1700)) > 0 then
|
|
||||||
-- MonsterCampManager.ExecuteFightBattle(self.data.Id,0,nil,self.trailData.fourElementType)
|
|
||||||
-- else
|
|
||||||
-- -- UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.FOUR_ELEMENT, self.trailData.fourElementType,self.data.Id)
|
|
||||||
-- UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.MONSTER_CAMP)
|
|
||||||
-- end
|
|
||||||
-- else
|
|
||||||
-- PopupTipPanel.ShowTip("今日已无可挑战层数!")
|
|
||||||
-- end
|
|
||||||
-- --UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.FourElementMonster,self.trailData.fourElementType,self.data.Id)
|
|
||||||
-- end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
-- 初始化奖励显示
|
-- 初始化奖励显示
|
||||||
|
|
@ -194,7 +136,6 @@ function MonsterCampSingleWave:SingleHeroDataShow(monConfig,heroData)
|
||||||
self.icon.transform.localPosition = Vector3.zero
|
self.icon.transform.localPosition = Vector3.zero
|
||||||
self.lv.text = monConfig.Level
|
self.lv.text = monConfig.Level
|
||||||
self.pro.sprite= self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName))
|
self.pro.sprite= self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.PropertyName))
|
||||||
--self.icon.sprite = self.spLoader:LoadSprite(heroData.painting)
|
|
||||||
SetCardStars(self.starGrid,monConfig.Star)
|
SetCardStars(self.starGrid,monConfig.Star)
|
||||||
self.fg.sprite = self.spLoader:LoadSprite(GetHeroCardStarFg[monConfig.Star])
|
self.fg.sprite = self.spLoader:LoadSprite(GetHeroCardStarFg[monConfig.Star])
|
||||||
self.name.text = heroData.ReadingName
|
self.name.text = heroData.ReadingName
|
||||||
|
|
@ -202,7 +143,6 @@ end
|
||||||
|
|
||||||
function MonsterCampSingleWave:UpdatePrivilage()
|
function MonsterCampSingleWave:UpdatePrivilage()
|
||||||
self.storeDataId,self.itemId,self.costNum = MonsterCampManager.MonsterCampGetCost()
|
self.storeDataId,self.itemId,self.costNum = MonsterCampManager.MonsterCampGetCost()
|
||||||
-- self.freeTimes,self.buyTimes = MonsterCampManager.GetTimeTip(self.trailData.fourElementType)
|
|
||||||
self.freeTimes = MonsterCampManager.GetCanBattleCount()
|
self.freeTimes = MonsterCampManager.GetCanBattleCount()
|
||||||
self.buyTimes = MonsterCampManager.GetCanBuyBattleCount()
|
self.buyTimes = MonsterCampManager.GetCanBuyBattleCount()
|
||||||
self:SetIcon()
|
self:SetIcon()
|
||||||
|
|
@ -219,7 +159,6 @@ function MonsterCampSingleWave:SetIcon()
|
||||||
if self.data.Id < MonsterCampManager.monsterWave - 1 then
|
if self.data.Id < MonsterCampManager.monsterWave - 1 then
|
||||||
self.finishImage.gameObject:SetActive(true)
|
self.finishImage.gameObject:SetActive(true)
|
||||||
elseif self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡
|
elseif self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡
|
||||||
-- self.rewardText.text = "扫荡奖励"
|
|
||||||
self.fight.gameObject:SetActive(true)
|
self.fight.gameObject:SetActive(true)
|
||||||
self.hero.transform.localPosition = Vector3.New(0,3,0)
|
self.hero.transform.localPosition = Vector3.New(0,3,0)
|
||||||
if self.freeTimes > 0 then
|
if self.freeTimes > 0 then
|
||||||
|
|
@ -235,8 +174,8 @@ function MonsterCampSingleWave:SetIcon()
|
||||||
self.fightBtnIcon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[self.itemId].ResourceID))
|
self.fightBtnIcon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[self.itemId].ResourceID))
|
||||||
if self.buyTimes < 1 then
|
if self.buyTimes < 1 then
|
||||||
Util.SetGray(self.fight,true)
|
Util.SetGray(self.fight,true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif self.data.Id == MonsterCampManager.monsterWave then--挑战
|
elseif self.data.Id == MonsterCampManager.monsterWave then--挑战
|
||||||
self.fight.gameObject:SetActive(true)
|
self.fight.gameObject:SetActive(true)
|
||||||
self.hero.transform.localPosition = Vector3.New(0,3,0)
|
self.hero.transform.localPosition = Vector3.New(0,3,0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue