轩辕 提交

dev_chengFeng
jiaoyangna 2020-08-12 19:58:09 +08:00
parent 39fb3d113c
commit a9ebd162ec
5 changed files with 29 additions and 17 deletions

View File

@ -223,20 +223,25 @@ function this.ExecuteFightBattle(id,type,func)
if func then
func()
end
if this.levelData[this.curType].state == 1 then
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,this.curType)
else
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
end
if result.result == 0 then
if result.result == 0 then
if this.levelData[this.curType].state == 1 then
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,this.curType)
else
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
end
elseif result.result == 1 then
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
this.levelData[this.curType].passId = id
this.UpdateLevelState(this.curType)
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.freeTimeId, 1)
this.levelData[this.curType].passId = id
this.UpdateLevelState(this.curType)
PrivilegeManager.RefreshPrivilegeUsedTimes(XuanYuanMirrorManager.freeTimeId, 1)
if this.levelData[this.curType].state == 1 then
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,this.curType)
else
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel)
end
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
end)
end
end)
else
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()

View File

@ -144,7 +144,7 @@ this.UpdateCarbonContent = function()
if state then
UIManager.OpenPanel(UIName.XuanYuanMirrorPanelList,k)
else
PopupTipPanel.ShowTip(type[k].neme.."未开启!")
PopupTipPanel.ShowTip(type[k].name.."未开启!")
end
end)
end

View File

@ -198,6 +198,8 @@ function this:SetLevelData(go, data)
local tip = Util.GetGameObject(go, "Tip"):GetComponent("Text")
tip.gameObject:SetActive(true)
local itemId = storeData.Cost[1][1] --消耗道具
if data.state == 0 then
tip.gameObject:SetActive(false)
else
@ -209,7 +211,12 @@ function this:SetLevelData(go, data)
if XuanYuanMirrorManager.freeTime < 1 then
costNumText.gameObject:SetActive(true)
costIcon.gameObject:SetActive(true)
costNumText.text =string.format("<color=#%s>%s</color>", colorText.color[data.state], costNum)
costIcon.sprite = SetIcon(itemId)
if BagManager.GetItemCountById(itemId) < costNum then
costNumText.text =string.format("<color=#%s>%s</color>", "E23823", costNum)
else
costNumText.text =string.format("<color=#%s>%s</color>", colorText.color[data.state], costNum)
end
end
end
@ -222,7 +229,7 @@ function this:SetLevelData(go, data)
PopupTipPanel.ShowTip(Language[10342])
return
end
local itemId = storeData.Cost[1][1] --消耗道具
if BagManager.GetItemCountById(itemId) < costNum and XuanYuanMirrorManager.freeTime <= 0 then
PopupTipPanel.ShowTip(string.format(Language[10343], itemConfig[itemId].Name))
return
@ -245,7 +252,7 @@ function this:SetLevelData(go, data)
end)
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.XUANYUAN_MIRROR, curType, data)
end
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.XuanYuanBuyTimes,costNum,func)
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.XuanYuanBuyTimes,costNum,func,itemConfig[itemId].Name)
else
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.XUANYUAN_MIRROR, curType, data)
end

View File

@ -114,7 +114,7 @@ end
function this.SiTuaTionInfoIndication(buffer)
local data = buffer:DataByte()
local msg = MapInfoProto_pb.SituationChallengeResponse()
local msg = MapInfoProto_pb.GetAllSituationInfoResponse()
msg:ParseFromString(data)
LogGreen("5点到了开始刷新了,发了消息GameEvent.FunctionCtrl.OnXuanYuanFunctionClose")
XuanYuanMirrorManager.UpdateMirrorState(msg)

View File

@ -41,7 +41,7 @@ function this:OnShow(_parent,...)
parent=_parent
sortingOrder =_parent.sortingOrder
local args = {...}
this.bodyText.text =string.format("是否消耗%s妖晶购买一次挑战次数?",args[1])
this.bodyText.text =string.format("是否消耗<color=#0BE102>%s</color>%s购买一次挑战次数?",args[1],args[3])
func = args[2]
if XuanYuanMirrorManager.GetBuyTimesTip() then
this.root:SetActive(false)