parent
735f694270
commit
05ef24c89c
|
|
@ -628,10 +628,10 @@ function this.IsAllDead()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 是否所有都死翘翘
|
-- 是否所有都满血
|
||||||
function this.IsAllFullHp()
|
function this.IsAllFullHp()
|
||||||
for i, v in pairs(this.allHeroBlood) do
|
for i, v in pairs(this.allHeroBlood) do
|
||||||
if v.curHp < 1 then
|
if v.percentHp < 1 then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,6 @@ end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
function MapOptionPanel:OnOpen(...)
|
function MapOptionPanel:OnOpen(...)
|
||||||
Log("MapOptionPanel:OnOpen")
|
|
||||||
--this.HideJumpBtn()
|
|
||||||
isFirstOpen = true
|
isFirstOpen = true
|
||||||
local data = {...}
|
local data = {...}
|
||||||
if data then
|
if data then
|
||||||
|
|
@ -141,23 +139,23 @@ function MapOptionPanel:OnOpen(...)
|
||||||
if not showValues then return end
|
if not showValues then return end
|
||||||
options = data[4]
|
options = data[4]
|
||||||
|
|
||||||
|
|
||||||
-- 根据panelType 决定处理方式
|
-- 根据panelType 决定处理方式
|
||||||
if not panleType then return end
|
if not panleType then return end
|
||||||
local isOptionPanel = panleType == 4
|
local isOptionPanel = panleType == 4
|
||||||
|
|
||||||
this.PanelInit(isOptionPanel)
|
this.PanelInit(isOptionPanel)
|
||||||
|
|
||||||
if isFirstOpen then
|
if isFirstOpen then
|
||||||
this.SetBg()
|
this.SetBg()
|
||||||
end
|
end
|
||||||
|
this.RefreshPanel()
|
||||||
if panleType == 3 then
|
if panleType == 3 then
|
||||||
nextOptId = options[1]
|
nextOptId = options[1]
|
||||||
jumpId = options[2]
|
jumpId = options[2]
|
||||||
this.RefreshPanel()
|
|
||||||
elseif panleType == 4 then
|
elseif panleType == 4 then
|
||||||
-- 初始化动画
|
-- 初始化动画
|
||||||
this.InitAnimi()
|
this.InitAnimi()
|
||||||
|
elseif panleType == 11 then
|
||||||
|
nextOptId = options[1]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Log("传入的参数为空!!")
|
Log("传入的参数为空!!")
|
||||||
|
|
@ -204,14 +202,11 @@ end
|
||||||
|
|
||||||
-- 设置面板显示的初始状态
|
-- 设置面板显示的初始状态
|
||||||
function this.PanelInit(isOptionPanel)
|
function this.PanelInit(isOptionPanel)
|
||||||
this.dialogueRoot:SetActive(not isOptionPanel)
|
|
||||||
this.optionRoot:SetActive(isOptionPanel)
|
this.optionRoot:SetActive(isOptionPanel)
|
||||||
this.btnNext:SetActive(not isOptionPanel)
|
this.btnNext:SetActive(not isOptionPanel)
|
||||||
this.nextRoot:SetActive(not isOptionPanel)
|
this.nextRoot:SetActive(not isOptionPanel)
|
||||||
this.jumpRoot:SetActive(not isOptionPanel)
|
|
||||||
this.nameFrame:SetActive(not isOptionPanel)
|
|
||||||
if not isOptionPanel then
|
if not isOptionPanel then
|
||||||
this.ReSetLive2d()
|
|
||||||
this.ResetBtnState()
|
this.ResetBtnState()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -219,7 +214,6 @@ end
|
||||||
-- 设置背景图
|
-- 设置背景图
|
||||||
function this.SetBg()
|
function this.SetBg()
|
||||||
local id = MapManager.mapPointId
|
local id = MapManager.mapPointId
|
||||||
Log(string.format("当前地图点的ID%s", MapManager.mapPointId))
|
|
||||||
local resPath = mapEventPointConfig[id].EventPointBg
|
local resPath = mapEventPointConfig[id].EventPointBg
|
||||||
if not resPath then return end
|
if not resPath then return end
|
||||||
this.bg.sprite = this.spLoader:LoadSprite(resPath)
|
this.bg.sprite = this.spLoader:LoadSprite(resPath)
|
||||||
|
|
@ -229,7 +223,7 @@ end
|
||||||
-- 打开面板的时候刷新一次数据
|
-- 打开面板的时候刷新一次数据
|
||||||
function this.RefreshPanel()
|
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)
|
this.jumpRoot:SetActive(false)
|
||||||
else
|
else
|
||||||
this.jumpRoot:SetActive(true)
|
this.jumpRoot:SetActive(true)
|
||||||
|
|
@ -279,6 +273,8 @@ function this.ShowLive2d(resId, live2dDir)
|
||||||
if not resId then Log(Language[11249] ) return end
|
if not resId then Log(Language[11249] ) return end
|
||||||
if resId == 0 then
|
if resId == 0 then
|
||||||
this.imgGap:SetActive(false)
|
this.imgGap:SetActive(false)
|
||||||
|
this.nameFrame:SetActive(false)
|
||||||
|
this.dialogueRoot:SetActive(false)
|
||||||
this.RoleName.text = ""
|
this.RoleName.text = ""
|
||||||
this.ReSetLive2d()
|
this.ReSetLive2d()
|
||||||
lastLive2DId = 0
|
lastLive2DId = 0
|
||||||
|
|
@ -287,7 +283,6 @@ function this.ShowLive2d(resId, live2dDir)
|
||||||
this.imgGap:SetActive(true)
|
this.imgGap:SetActive(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
Log("资源ID" .. resId)
|
|
||||||
local data = artResConfig[resId]
|
local data = artResConfig[resId]
|
||||||
local roleSex = NameManager.roleSex
|
local roleSex = NameManager.roleSex
|
||||||
|
|
||||||
|
|
@ -310,6 +305,12 @@ function this.ShowLive2d(resId, live2dDir)
|
||||||
else
|
else
|
||||||
live2dRoot = this.left2dRoot
|
live2dRoot = this.left2dRoot
|
||||||
end
|
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)
|
this.RoleName.text = string.gsub(roleName, Language[11252], NameManager.roleName)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -318,6 +319,7 @@ function this.ShowLive2d(resId, live2dDir)
|
||||||
StoryManager.InitEffect()
|
StoryManager.InitEffect()
|
||||||
ClearChild(this.effectRoot)
|
ClearChild(this.effectRoot)
|
||||||
this.mottoImg:SetActive(resId == 999)
|
this.mottoImg:SetActive(resId == 999)
|
||||||
|
this.dialogueRoot:SetActive(true)
|
||||||
if lastLive2DId ~= resId and resId ~= 999 then -- 动态加载一次立绘
|
if lastLive2DId ~= resId and resId ~= 999 then -- 动态加载一次立绘
|
||||||
this.ReSetLive2d()
|
this.ReSetLive2d()
|
||||||
if setId and setId ~= 0 then -- 优化版立绘表现
|
if setId and setId ~= 0 then -- 优化版立绘表现
|
||||||
|
|
@ -343,9 +345,6 @@ end
|
||||||
function this.AsideSpeak(isDark)
|
function this.AsideSpeak(isDark)
|
||||||
this.mask:SetActive(isDark)
|
this.mask:SetActive(isDark)
|
||||||
if isDark then
|
if isDark then
|
||||||
this.RoleName.text = ""
|
|
||||||
this.ReSetLive2d()
|
|
||||||
-- (this.effectRoClearChildot)
|
|
||||||
ClearChild(this.effectRoot)
|
ClearChild(this.effectRoot)
|
||||||
ClearChild(this.scenceEffect)
|
ClearChild(this.scenceEffect)
|
||||||
StoryManager.InitEffect()
|
StoryManager.InitEffect()
|
||||||
|
|
@ -442,7 +441,6 @@ function this.InitData()
|
||||||
|
|
||||||
this.textMask:SetActive(true)
|
this.textMask:SetActive(true)
|
||||||
this.btnRoot:SetActive(true)
|
this.btnRoot:SetActive(true)
|
||||||
this.RoleName.text = ""
|
|
||||||
|
|
||||||
-- 显示按钮
|
-- 显示按钮
|
||||||
btnNum = #options
|
btnNum = #options
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ function EndLessMapView:BindEvent()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
MsgPanel.ShowTwo("是否消耗一枚九元露,复活所有神将并将血量恢复为100%?", function()end, function()
|
MsgPanel.ShowTwo("是否消耗一枚九元露,复活所有神将并将血量恢复为100%?", function()end, function()
|
||||||
NetManager.UseAddHpItemRequest(-1,function ()
|
NetManager.UseAddHpItemRequest(tostring(-1),function ()
|
||||||
PopupTipPanel.ShowTip("已将所有神将复活并恢复至满血!")
|
PopupTipPanel.ShowTip("已将所有神将复活并恢复至满血!")
|
||||||
this:OnShow()
|
this:OnShow()
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@ local funcList = {
|
||||||
function this.EventPointTrigger(eventId)
|
function this.EventPointTrigger(eventId)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)
|
||||||
MyPCall(function ()
|
MyPCall(function ()
|
||||||
--Log("EventPointTrigger中得到的事件ID " .. eventId)
|
Log("EventPointTrigger中得到的事件ID " .. eventId)
|
||||||
if eventId == 0 or eventId < 0 then
|
if eventId == 0 or eventId < 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -353,7 +353,7 @@ function this.JumpEventPoint(eventId, optionId, panel, func)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 1, optionId)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Map.ProgressChange, 1, optionId)
|
||||||
|
|
||||||
end)
|
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)
|
NetManager.EventUpdateRequest(eventId, optionId, function (e)
|
||||||
MissionManager.EventPointTrigger(e)
|
MissionManager.EventPointTrigger(e)
|
||||||
Log(" 后端返回事件点ID " .. e)
|
Log(" 后端返回事件点ID " .. e)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue