【工會技能】长按升级bug

dev_chengFeng
zhangqiang 2020-12-31 15:29:08 +08:00
parent 694320d99c
commit 7402a7ce6c
1 changed files with 6 additions and 23 deletions

View File

@ -94,10 +94,10 @@ function GuildSkillUpLvPopup:BindEvent()
end
--长按升级抬起状态
this._onPointerUp = function(Pointgo, data)
LogPink("连续升级抬起请求升级 "..tostring(_isLongPress))
-- LogPink("连续升级抬起请求升级 "..tostring(_isLongPress))
if _isLongPress then--and isTriggerLongClick
--连续升级抬起请求升级
LogPink("连续升级抬起请求升级 ")
-- LogPink("连续升级抬起请求升级 ")
this.LongLvUpClick(oldLv)
end
_isClicked = false
@ -105,7 +105,6 @@ function GuildSkillUpLvPopup:BindEvent()
end
this.upLvTrigger.onPointerDown = this.upLvTrigger.onPointerDown + this._onPointerDown
this.upLvTrigger.onPointerUp = this.upLvTrigger.onPointerUp + this._onPointerUp
FixedUpdateBeat:Add(this.OnUpdate, self)--长按方法注册
Util.AddClick(this.btnRest,function()
@ -120,6 +119,7 @@ function GuildSkillUpLvPopup:BindEvent()
this.OnClickTabBtn(curIndex,true)
this.RefreshTabRedPoint()
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
oldWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
end)
end)
end
@ -136,6 +136,7 @@ function GuildSkillUpLvPopup:OnOpen(_curIndex)
GuildSkillManager.UpdataHeroProList = {}
curIndex = _curIndex or 1
tabRedPotList = {}
FixedUpdateBeat:Add(this.OnUpdate, self)--长按方法注册
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
@ -151,7 +152,6 @@ function this.OnUpdate()
if _isClicked then
if Time.realtimeSinceStartup - this.timePressStarted > 0.4 then
_isLongPress = true
-- LogPink("_isReqLvUp "..tostring(_isReqLvUp))
if not _isReqLvUp then
_isReqLvUp = true
this.LvUpClick(false)
@ -300,6 +300,7 @@ function this.LongLvUpClick(oldLv)
this.OnClickTabBtn(curIndex,true)
this.RefreshTabRedPoint(curIndex)
_isReqLvUp = false
newWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
if oldWarPowerValue ~= newWarPowerValue then
UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPowerValue,newValue = newWarPowerValue})
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
@ -318,32 +319,14 @@ function this.LvUpClick(isSingleLvUp)
PopupTipPanel.ShowTip(ConfigManager.GetConfigData(ConfigName.ItemConfig,materialNoId).Name..Language[11085])
if not isSingleLvUp then
this.LongLvUpClick(oldLv)
_isClicked = false
_isLongPress = false
end
return
end
-- NetManager.SinGleGuildSkillUpLv(curIndex,function(msg)
-- PopupTipPanel.ShowTip(Language[11086])
-- GuildSkillManager.SetSkillDataLv(curIndex,curSeletSkill.id,curSeletSkill.level + 1)
-- this.OnClickTabBtn(curIndex,true)
-- this.RefreshTabRedPoint(curIndex)
-- newWarPowerValue = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
-- if oldWarPowerValue ~= newWarPowerValue then
-- UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = oldWarPowerValue,newValue = newWarPowerValue})
-- Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
-- oldWarPowerValue = newWarPowerValue
-- end
-- Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
-- -- CheckRedPointStatus(RedPointType.Guild_Skill)
-- end)
if isMaxLv then
if not isSingleLvUp then
this.LongLvUpClick(oldLv)
_isClicked = false
_isLongPress = false
end
return
end
@ -361,7 +344,7 @@ function this.LvUpClick(isSingleLvUp)
oldWarPowerValue = newWarPowerValue
end
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnChangeName)
-- CheckRedPointStatus(RedPointType.Guild_Skill)
-- CheckRedPointStatus(RedPointType.Guild_Skill)
end)
else
--前端先扣除材料