【ID1009632】

【优化】修改无尽副本对话ui
dev_chengFeng
jiaoyangna 2021-07-06 19:01:27 +08:00
parent 735f694270
commit 05ef24c89c
5 changed files with 21 additions and 23 deletions

View File

@ -628,10 +628,10 @@ function this.IsAllDead()
return true
end
-- 是否所有都死翘翘
-- 是否所有都满血
function this.IsAllFullHp()
for i, v in pairs(this.allHeroBlood) do
if v.curHp < 1 then
if v.percentHp < 1 then
return false
end
end

View File

@ -130,8 +130,6 @@ end
--界面打开时调用(用于子类重写)
function MapOptionPanel:OnOpen(...)
Log("MapOptionPanel:OnOpen")
--this.HideJumpBtn()
isFirstOpen = true
local data = {...}
if data then
@ -141,23 +139,23 @@ function MapOptionPanel:OnOpen(...)
if not showValues then return end
options = data[4]
-- 根据panelType 决定处理方式
if not panleType then return end
local isOptionPanel = panleType == 4
this.PanelInit(isOptionPanel)
if isFirstOpen then
this.SetBg()
end
this.RefreshPanel()
if panleType == 3 then
nextOptId = options[1]
jumpId = options[2]
this.RefreshPanel()
jumpId = options[2]
elseif panleType == 4 then
-- 初始化动画
this.InitAnimi()
elseif panleType == 11 then
nextOptId = options[1]
end
else
Log("传入的参数为空!!")
@ -204,14 +202,11 @@ end
-- 设置面板显示的初始状态
function this.PanelInit(isOptionPanel)
this.dialogueRoot:SetActive(not isOptionPanel)
this.optionRoot:SetActive(isOptionPanel)
this.btnNext:SetActive(not isOptionPanel)
this.nextRoot:SetActive(not isOptionPanel)
this.jumpRoot:SetActive(not isOptionPanel)
this.nameFrame:SetActive(not isOptionPanel)
if not isOptionPanel then
this.ReSetLive2d()
this.ResetBtnState()
end
end
@ -219,7 +214,6 @@ end
-- 设置背景图
function this.SetBg()
local id = MapManager.mapPointId
Log(string.format("当前地图点的ID%s", MapManager.mapPointId))
local resPath = mapEventPointConfig[id].EventPointBg
if not resPath then return end
this.bg.sprite = this.spLoader:LoadSprite(resPath)
@ -229,7 +223,7 @@ end
-- 打开面板的时候刷新一次数据
function this.RefreshPanel()
-- 判断是否是一次性界面
if not jumpId or jumpId == 0 or GuideManager.IsInMainGuide() then
if not jumpId or jumpId == 0 or GuideManager.IsInMainGuide() then
this.jumpRoot:SetActive(false)
else
this.jumpRoot:SetActive(true)
@ -279,6 +273,8 @@ function this.ShowLive2d(resId, live2dDir)
if not resId then Log(Language[11249] ) return end
if resId == 0 then
this.imgGap:SetActive(false)
this.nameFrame:SetActive(false)
this.dialogueRoot:SetActive(false)
this.RoleName.text = ""
this.ReSetLive2d()
lastLive2DId = 0
@ -287,7 +283,6 @@ function this.ShowLive2d(resId, live2dDir)
this.imgGap:SetActive(true)
end
Log("资源ID" .. resId)
local data = artResConfig[resId]
local roleSex = NameManager.roleSex
@ -310,6 +305,12 @@ function this.ShowLive2d(resId, live2dDir)
else
live2dRoot = this.left2dRoot
end
LogGreen("roleName:"..roleName)
if not roleName or roleName == "" then
this.nameFrame:SetActive(false)
else
this.nameFrame:SetActive(true)
end
this.RoleName.text = string.gsub(roleName, Language[11252], NameManager.roleName)
end
@ -318,6 +319,7 @@ function this.ShowLive2d(resId, live2dDir)
StoryManager.InitEffect()
ClearChild(this.effectRoot)
this.mottoImg:SetActive(resId == 999)
this.dialogueRoot:SetActive(true)
if lastLive2DId ~= resId and resId ~= 999 then -- 动态加载一次立绘
this.ReSetLive2d()
if setId and setId ~= 0 then -- 优化版立绘表现
@ -343,9 +345,6 @@ end
function this.AsideSpeak(isDark)
this.mask:SetActive(isDark)
if isDark then
this.RoleName.text = ""
this.ReSetLive2d()
-- (this.effectRoClearChildot)
ClearChild(this.effectRoot)
ClearChild(this.scenceEffect)
StoryManager.InitEffect()
@ -442,7 +441,6 @@ function this.InitData()
this.textMask:SetActive(true)
this.btnRoot:SetActive(true)
this.RoleName.text = ""
-- 显示按钮
btnNum = #options

View File

@ -127,7 +127,7 @@ function EndLessMapView:BindEvent()
return
end
MsgPanel.ShowTwo("是否消耗一枚九元露复活所有神将并将血量恢复为100%", function()end, function()
NetManager.UseAddHpItemRequest(-1,function ()
NetManager.UseAddHpItemRequest(tostring(-1),function ()
PopupTipPanel.ShowTip("已将所有神将复活并恢复至满血!")
this:OnShow()
end)

View File

@ -449,7 +449,7 @@ local funcList = {
function this.EventPointTrigger(eventId)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)
MyPCall(function ()
--Log("EventPointTrigger中得到的事件ID " .. eventId)
Log("EventPointTrigger中得到的事件ID " .. eventId)
if eventId == 0 or eventId < 0 then
return
end

View File

@ -353,7 +353,7 @@ function this.JumpEventPoint(eventId, optionId, panel, func)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 1, optionId)
end)
elseif jumpType == 1 or jumpType == 2 or jumpType == 3 then --读取,刷新事件点
elseif jumpType == 1 or jumpType == 2 or jumpType == 3 or jumpType == 11 then --读取,刷新事件点
NetManager.EventUpdateRequest(eventId, optionId, function (e)
MissionManager.EventPointTrigger(e)
Log(" 后端返回事件点ID " .. e)