森罗快速点击服务器报错问题修复

dev_chengFeng
ZhangBiao 2020-08-05 21:12:50 +08:00
parent 456ab0aa92
commit 54783bef35
4 changed files with 14 additions and 3 deletions

View File

@ -102,6 +102,7 @@ GameEvent = {
-- 刷新英雄血量
RefreshHeroHp="Map.RefreshHeroHp",
StopWalk="Map.StopWalk",
MaskState = "Map.MaskState"
},
Event = {
PointTrigger = "Event.PointTrigger",

View File

@ -132,6 +132,7 @@ function this:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Map.MapDataChange, this.OnMapDataChange)
Game.GlobalEvent:AddEvent(GameEvent.Map.StopWalk, this.StopWalking)
Game.GlobalEvent:AddEvent(GameEvent.FoodBuff.OnFoodBuffStateChanged, this.RefreshBuffShow)
Game.GlobalEvent:AddEvent(GameEvent.Map.MaskState, this.MaskState)
missionView.AddListener()
playerView.AddListener()
@ -151,6 +152,7 @@ function this:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Map.MapDataChange, this.OnMapDataChange)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.StopWalk, this.StopWalking)
Game.GlobalEvent:RemoveEvent(GameEvent.FoodBuff.OnFoodBuffStateChanged, this.RefreshBuffShow)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.MaskState, this.MaskState)
missionView.RemoveListener()
playerView.RemoveListener()
@ -247,9 +249,9 @@ end
function this.InitCarbonSet()
-- 面板遮罩
this.Mask:SetActive(true)
this.MaskState(1)
local timer = Timer.New(function()
this.Mask:SetActive(false)
this.MaskState(0)
end, 2.5)
timer:Start()
--如果是在序章
@ -258,6 +260,11 @@ function this.InitCarbonSet()
end
--设置遮罩开关 1 是开 其他都是关
function this.MaskState(state)
this.Mask:SetActive(state == 1)
end
-- 根据副本的类型显示组件
function this.InitCompShow(type)
this.leftUp:SetActive(type == 2)

View File

@ -231,7 +231,8 @@ function this.UpdatePowerValue()
this.powerPercent.text = _value
this.sliderValue.fillAmount = _value / 100
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.OnTempBagChanged)
-- LogPurple("战斗结束")
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState,0)
-- -1时召唤boss
if powerValue == -1 then
this.bossEffect:SetActive(true)--进图显示召唤boss

View File

@ -465,6 +465,8 @@ function this.EdgeEventTrigger(u, v)
end
Log(Language[11304] .. MapManager.mapPointList[pos])
-- LogGreen("事件开始")
Game.GlobalEvent:DispatchEvent(GameEvent.Map.MaskState,1)
--如果英雄阵亡 无法选择其进行战斗
local num = #MapManager.trialHeroInfo