好感度新手引导修改提交
parent
c778c334e5
commit
ea52d01112
|
@ -471,6 +471,31 @@ function this.ExecuteBehavior(beType, beArgs)
|
|||
Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnUpdateData, OnUpdateData)
|
||||
end
|
||||
Game.GlobalEvent:AddEvent(GameEvent.UI.OnUpdateData, OnUpdateData)
|
||||
elseif beType == 17 then
|
||||
local HeroLikeAbilityPanel = UIManager.GetOpenPanel(UIName.HeroLikeAbilityPanel)
|
||||
this.button:GetComponent("Button").onClick:RemoveAllListeners()
|
||||
local _trigger = Util.GetEventTriggerListener(this.button)
|
||||
local startFunc
|
||||
local endFunc
|
||||
local timePressStarted
|
||||
_trigger.onPointerDown = _trigger.onPointerDown + HeroLikeAbilityPanel.OnPointerDo
|
||||
startFunc = function()
|
||||
timePressStarted = Time.realtimeSinceStartup
|
||||
end
|
||||
_trigger.onPointerDown = _trigger.onPointerDown + startFunc
|
||||
|
||||
_trigger.onPointerUp = _trigger.onPointerUp + HeroLikeAbilityPanel.OnPointerUp
|
||||
endFunc = function()
|
||||
_trigger.onPointerDown = _trigger.onPointerDown - HeroLikeAbilityPanel.OnPointerDo
|
||||
_trigger.onPointerDown = _trigger.onPointerDown - startFunc
|
||||
_trigger.onPointerUp = _trigger.onPointerUp - HeroLikeAbilityPanel.OnPointerUp
|
||||
_trigger.onPointerUp = _trigger.onPointerUp - endFunc
|
||||
this.NextGuide()
|
||||
this.button:GetComponent("Button").onClick:RemoveAllListeners()
|
||||
Util.AddClick(this.button, this.NextGuide)
|
||||
end
|
||||
_trigger.onPointerUp = _trigger.onPointerUp + endFunc
|
||||
this.SetBtnGOPosition(HeroLikeAbilityPanel.giveBtn.gameObject:GetComponent("RectTransform").position)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ function HeroLikeAbilityPanel:InitComponent()
|
|||
|
||||
self.giveBtn = Util.GetGameObject(self.transform, "giveBtn")
|
||||
self.trigger = Util.GetEventTriggerListener(self.giveBtn)
|
||||
|
||||
self.OnPointerDo = function(go, data)
|
||||
self:OnPointerDown1(go, data)
|
||||
end
|
||||
|
@ -80,10 +81,6 @@ function HeroLikeAbilityPanel:OnPointerDown1(go, data)
|
|||
self.effect.gameObject:SetActive(false)
|
||||
self.num = 0
|
||||
self.numCount = 0
|
||||
LogGreen(curselectId)
|
||||
if not curselectId or not self.itemListNum[curselectId] then
|
||||
return
|
||||
end
|
||||
if LikabilityManager.CheckIsMaxLv(curHeroData.Id) then
|
||||
PopupTipPanel.ShowTip("神将好感度最达最佳,无需更多赠予~")
|
||||
return
|
||||
|
@ -92,6 +89,10 @@ function HeroLikeAbilityPanel:OnPointerDown1(go, data)
|
|||
PopupTipPanel.ShowTip("今日赠予次数已用尽~")
|
||||
return
|
||||
end
|
||||
if not curselectId or not self.itemListNum[curselectId] then
|
||||
PopupTipPanel.ShowTip("礼物数量不足,无法赠予~")
|
||||
return
|
||||
end
|
||||
if self.itemListNum[curselectId] < 1 then
|
||||
PopupTipPanel.ShowTip("礼物数量不足,无法赠予~")
|
||||
return
|
||||
|
@ -186,32 +187,32 @@ function HeroLikeAbilityPanel:BindEvent()
|
|||
UIManager.OpenPanel(UIName.RoleLikeabilityPopup,curHeroData)
|
||||
end)
|
||||
|
||||
--查看
|
||||
Util.AddClick(self.giveBtn, function()
|
||||
self.effect.gameObject:SetActive(false)
|
||||
self.num = 0
|
||||
self.numCount = 0
|
||||
LogGreen(curselectId)
|
||||
-- --查看
|
||||
-- Util.AddClick(self.giveBtn, function()
|
||||
-- self.effect.gameObject:SetActive(false)
|
||||
-- self.num = 0
|
||||
-- self.numCount = 0
|
||||
-- LogGreen(curselectId)
|
||||
|
||||
if LikabilityManager.CheckIsMaxLv(curHeroData.Id) then
|
||||
PopupTipPanel.ShowTip("神将好感度最达最佳,无需更多赠予~")
|
||||
return
|
||||
end
|
||||
if LikabilityManager.GetRemainTimes() < 1 then
|
||||
PopupTipPanel.ShowTip("今日赠予次数已用尽~")
|
||||
return
|
||||
end
|
||||
if not curselectId or not self.itemListNum[curselectId] then
|
||||
PopupTipPanel.ShowTip("礼物数量不足,无法赠予~")
|
||||
return
|
||||
end
|
||||
if self.itemListNum[curselectId] < 1 then
|
||||
PopupTipPanel.ShowTip("礼物数量不足,无法赠予~")
|
||||
return
|
||||
end
|
||||
self.isShortPress = true
|
||||
self:Refresh(true)
|
||||
end)
|
||||
-- if LikabilityManager.CheckIsMaxLv(curHeroData.Id) then
|
||||
-- PopupTipPanel.ShowTip("神将好感度最达最佳,无需更多赠予~")
|
||||
-- return
|
||||
-- end
|
||||
-- if LikabilityManager.GetRemainTimes() < 1 then
|
||||
-- PopupTipPanel.ShowTip("今日赠予次数已用尽~")
|
||||
-- return
|
||||
-- end
|
||||
-- if not curselectId or not self.itemListNum[curselectId] then
|
||||
-- PopupTipPanel.ShowTip("礼物数量不足,无法赠予~")
|
||||
-- return
|
||||
-- end
|
||||
-- if self.itemListNum[curselectId] < 1 then
|
||||
-- PopupTipPanel.ShowTip("礼物数量不足,无法赠予~")
|
||||
-- return
|
||||
-- end
|
||||
-- self.isShortPress = true
|
||||
-- self:Refresh(true)
|
||||
-- end)
|
||||
end
|
||||
--添加事件监听(用于子类重写)
|
||||
function HeroLikeAbilityPanel:AddListener()
|
||||
|
|
|
@ -428,13 +428,11 @@ function this.SetProvalue(prolist,proType,tag,nextLv,indexType,_color)
|
|||
end
|
||||
end
|
||||
else
|
||||
LogGreen("k:"..k)
|
||||
local config = ConfigManager.TryGetConfigDataByKey(ConfigName.PrivilegeTypeConfig,"PrivilegeType",k)
|
||||
if config then
|
||||
str1 = string.format(config.Name,string.format("<color=#%s>%s</color>\n",_color,GetEquipPropertyFormatStr(config.IfFloat, v)))
|
||||
end
|
||||
end
|
||||
LogGreen("str1:"..str1)
|
||||
table.insert(newProList,str1)
|
||||
end
|
||||
str = string.format(tag,color1,(newProList[1] or ""),(newProList[2] or ""))
|
||||
|
|
Loading…
Reference in New Issue