Merge branch 'master_xma_local' into master_xma_test
commit
a03cd232ee
|
@ -11,7 +11,6 @@ local canGetRewardList = {} --可领取的宝箱
|
|||
|
||||
local isPressed = false--是否按下
|
||||
local isShortPress = false--点击捐献
|
||||
local trigger = false --道具不足的trigger
|
||||
local t = 20 --用来区分长按和点击的临界值
|
||||
|
||||
local curItemIndex = nil
|
||||
|
@ -180,7 +179,6 @@ end
|
|||
|
||||
--刷新整个页面
|
||||
function this:Refresh()
|
||||
trigger = false
|
||||
this.effect:SetActive(true)
|
||||
this.effect2:SetActive(false)
|
||||
|
||||
|
@ -190,7 +188,7 @@ function this:Refresh()
|
|||
this:RefreshItemsData()
|
||||
this:TimeCountDown()--时间
|
||||
this:LeftUpShow()
|
||||
this:RefreshBottom()--刷新下部数字
|
||||
this:RefreshBottom1()--刷新下部数字
|
||||
this:RefreshRewardBox()--刷新奖励宝箱数据
|
||||
end
|
||||
|
||||
|
@ -230,6 +228,10 @@ function this.OnPointerDown(Pointgo,data,i)--按下
|
|||
return
|
||||
end
|
||||
curItemIndex = i
|
||||
if itemData[i].leftNum == 0 then
|
||||
PopupTipPanel.ShowTip(Language[11197])
|
||||
return
|
||||
end
|
||||
numCount = 1
|
||||
isPressed = true
|
||||
end
|
||||
|
@ -237,10 +239,13 @@ function this.OnPointerUp(Pointgo,data)--抬起
|
|||
if PlayerManager.level < 50 or PlayerManager.familyId == 0 then
|
||||
return
|
||||
end
|
||||
if itemData[curItemIndex].leftNum == 0 then
|
||||
return
|
||||
end
|
||||
if isShortPress then
|
||||
numCount = 1
|
||||
this:RefreshBottom(numCount)
|
||||
this:RequestDonate(numCount)
|
||||
this:RefreshBottom1()
|
||||
else
|
||||
if itemData[curItemIndex].leftNum > 0 then
|
||||
this:RequestDonate(numCount-t)
|
||||
|
@ -251,15 +256,13 @@ function this.OnPointerUp(Pointgo,data)--抬起
|
|||
end
|
||||
function this.OnUpdate()
|
||||
if isPressed then
|
||||
numCount = numCount + 1
|
||||
if numCount > t then
|
||||
isShortPress = false
|
||||
this:RefreshBottom(numCount-t)
|
||||
this:RefreshBottom2(numCount-t)
|
||||
else
|
||||
if not isShortPress then
|
||||
isShortPress = true
|
||||
end
|
||||
isShortPress = true
|
||||
end
|
||||
numCount = numCount + 1
|
||||
end
|
||||
end
|
||||
--发送捐献请求
|
||||
|
@ -268,17 +271,11 @@ function this:RequestDonate(numCount)
|
|||
PopupTipPanel.ShowTip(Language[11197])
|
||||
return
|
||||
end
|
||||
if trigger and numCount == 1 then
|
||||
trigger = false
|
||||
NetManager.SheJiDonateItemRequest(itemData[curItemIndex].id,numCount,function()
|
||||
PopupTipPanel.ShowTip("成功献出"..(itemData[curItemIndex].value * numCount).."点贡献!")
|
||||
this:Refresh()
|
||||
else
|
||||
NetManager.SheJiDonateItemRequest(itemData[curItemIndex].id,numCount,function()
|
||||
PopupTipPanel.ShowTip("成功献出"..(itemData[curItemIndex].value * numCount).."点贡献!")
|
||||
trigger = false
|
||||
this:Refresh()
|
||||
CheckRedPointStatus(RedPointType.Celebration)
|
||||
end)
|
||||
end
|
||||
CheckRedPointStatus(RedPointType.Celebration)
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
|
@ -305,34 +302,33 @@ function this:LeftUpShow(_curRankType)
|
|||
this.thirdName.text = allRankData[3] and allRankData[3].guildName or Language[11073]
|
||||
end
|
||||
local t = myRankData.param1 > 0 and myRankData.param1 or 0
|
||||
-- LogPink("t:"..t)
|
||||
-- LogPink("ActInfo.mission[1].progress :"..ActInfo.mission[1].progress )
|
||||
this.score.text = curRankType == RANK_TYPE.GOLD_EXPER and t or ActInfo.mission[1].progress
|
||||
myRank = myRankData.rank
|
||||
end)
|
||||
end
|
||||
|
||||
--刷新进度条和剩余数量
|
||||
function this:RefreshBottom(num)
|
||||
local score = 0
|
||||
if num == nil then--初始、刷新进度条显示
|
||||
num = 0
|
||||
for i = 1, 3 do
|
||||
itemData[i].num.text = itemData[i].leftNum
|
||||
end
|
||||
this.scoreText.text = (curScore%(actReward[1].Values[2][1])).."/"..actReward[1].Values[2][1]
|
||||
else--实时更新进度条
|
||||
--要判断是否还有道具进行捐献
|
||||
if itemData[curItemIndex].leftNum - num < 0 then
|
||||
this:RequestDonate(num - 1)
|
||||
trigger = true
|
||||
isPressed = false
|
||||
-- return
|
||||
end
|
||||
itemData[curItemIndex].num.text = itemData[curItemIndex].leftNum - num
|
||||
score = itemData[curItemIndex].value * num
|
||||
this.scoreText.text = ((curScore + score)%(actReward[1].Values[2][1])).."/"..actReward[1].Values[2][1]
|
||||
--刷新一次
|
||||
function this:RefreshBottom1()
|
||||
for i = 1, 3 do
|
||||
itemData[i].num.text = itemData[i].leftNum
|
||||
end
|
||||
this.scoreText.text = ((curScore)%(actReward[1].Values[2][1])).."/"..actReward[1].Values[2][1]
|
||||
this.value.value = (((curScore))%(actReward[1].Values[2][1]))/actReward[1].Values[2][1]
|
||||
this.level.text = math.floor((curScore)/(actReward[1].Values[2][1])) .. Language[10072]
|
||||
end
|
||||
|
||||
--刷新进度条和剩余数量
|
||||
function this:RefreshBottom2(num)
|
||||
local score = 0
|
||||
--实时更新进度条
|
||||
--要判断是否还有道具进行捐献
|
||||
if itemData[curItemIndex].leftNum - num <= 0 then
|
||||
isPressed = false
|
||||
this:RequestDonate(num)
|
||||
end
|
||||
itemData[curItemIndex].num.text = itemData[curItemIndex].leftNum - num
|
||||
score = itemData[curItemIndex].value * num
|
||||
this.scoreText.text = ((curScore + score)%(actReward[1].Values[2][1])).."/"..actReward[1].Values[2][1]
|
||||
this.value.value = (((curScore + score))%(actReward[1].Values[2][1]))/actReward[1].Values[2][1]
|
||||
this.level.text = math.floor((curScore + score)/(actReward[1].Values[2][1])) .. Language[10072]
|
||||
end
|
||||
|
@ -362,13 +358,6 @@ function this:TimeCountDown()
|
|||
local t1 = GetTimeStamp() - Today_N_OClockTimeStamp(setting.TimePointList[1])
|
||||
local t2 = GetTimeStamp() - Today_N_OClockTimeStamp(setting.TimePointList[2])
|
||||
|
||||
-- LogGreen("dao 12 dian:"..t1)
|
||||
-- LogGreen("dao 20 dian:"..t2)
|
||||
-- LogGreen("ActInfo.value:"..ActInfo.value)
|
||||
-- LogGreen("GetTimeStamp():"..GetTimeStamp())
|
||||
-- LogGreen("GetTimeStamp() - ActInfo.value"..(GetTimeStamp() - ActInfo.value))
|
||||
-- LogGreen("giftTime:"..giftTime)
|
||||
|
||||
if ActInfo.value == 0 then
|
||||
if (t1 > 0 and t1 < 1800) or (t2 > 0 and t2 < 1800) then
|
||||
canGet = true
|
||||
|
@ -386,9 +375,6 @@ function this:TimeCountDown()
|
|||
canGet = false
|
||||
end
|
||||
end
|
||||
-- LogGreen("canGet:"..tostring(canGet))
|
||||
|
||||
|
||||
|
||||
this.centerTime.text = canGet == false and TimeToFelaxible(giftTime) or Language[12183]
|
||||
|
||||
|
|
|
@ -154,13 +154,14 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum)
|
|||
elseif v.Type == 6 then--巅峰战
|
||||
local curState = ArenaTopMatchManager.GetBaseData().battleState
|
||||
local battleStage = ArenaTopMatchManager.GetBaseData().battleStage
|
||||
-- if battleStage and curState then
|
||||
-- LogPink(" v.OpenRules[2] "..v.OpenRules[2].." curState "..curState.." type "..type.." battleStage "..battleStage.." v.Values "..v.Values)
|
||||
-- else
|
||||
-- LogPink(" v.OpenRules[2] "..v.OpenRules[2].." curState nil type "..type.." battleStage nil v.Values "..v.Values)
|
||||
-- end
|
||||
if battleStage and curState then
|
||||
LogPink(" v.OpenRules[2] "..v.OpenRules[2].." curState "..curState.." type "..type.." battleStage "..battleStage.." v.Values "..v.Values)
|
||||
else
|
||||
LogPink(" v.OpenRules[2] "..v.OpenRules[2].." curState nil type "..type.." battleStage nil v.Values "..v.Values)
|
||||
end
|
||||
-- if v.OpenRules[2] == curState and type == 2 and battleStage >= v.Values then
|
||||
if (curState and v.OpenRules[2] == curState) and type == 2 and (battleStage and battleStage >= v.Values) then--v.Values 2 > 1
|
||||
--and type == 2
|
||||
if (curState and curState >= v.OpenRules[2] and curState <= v.CloseRules[2]) and (battleStage and battleStage >= v.Values) then--v.Values 2 > 1
|
||||
if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then
|
||||
table.insert(patFaceAllData,v)
|
||||
end
|
||||
|
|
|
@ -653,6 +653,7 @@ end
|
|||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FightPointPassMainPanel:OnClose()
|
||||
PatFaceManager.isLogin = false
|
||||
PlayerManager.StopBattleUpLvTipTime()
|
||||
hasLoad = false
|
||||
invadeMonster:OnClose()
|
||||
|
|
|
@ -26,6 +26,7 @@ local tabs = {
|
|||
local curHeroData--当前英雄信息
|
||||
local leftHeroData--左边预加载英雄信息
|
||||
local rightHeroData--右边预加载英雄信息
|
||||
local curHeroPosition --
|
||||
|
||||
local heroDatas--所有英雄list信息
|
||||
|
||||
|
@ -581,6 +582,8 @@ function this:ChangeCurentHeroSkinLive(herodata)
|
|||
end
|
||||
if herodata then
|
||||
this.curLiveObj=HeroManager.LoadHerolive1(herodata,this.curObj)
|
||||
-- 临时保存皮肤位置
|
||||
curHeroPosition = herodata.Position
|
||||
else
|
||||
local allAddProVal = {}
|
||||
if isUpZhen then
|
||||
|
@ -592,6 +595,8 @@ function this:ChangeCurentHeroSkinLive(herodata)
|
|||
end
|
||||
this.force.text =allAddProVal[HeroProType.WarPower]
|
||||
this.curLiveObj=HeroManager.LoadHerolive(curHeroData,this.curObj)
|
||||
-- 清空临时保存的皮肤位置
|
||||
curHeroPosition = nil
|
||||
end
|
||||
this:SetDragView()
|
||||
end
|
||||
|
@ -621,7 +626,8 @@ function RoleInfoPanel:OnEndDrag(Pointgo, data)
|
|||
elseif distance>250 and endV3.x>0 then
|
||||
this:LeftBtnOnClick()
|
||||
else
|
||||
this.curLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(curHeroData.position[1],curHeroData.position[2]), 0.5, false):SetEase(Ease.Linear)
|
||||
local pos = curHeroPosition or curHeroData.position
|
||||
this.curLiveObj:GetComponent("RectTransform"):DOAnchorPos(Vector2.New(pos[1], pos[2]), 0.5, false):SetEase(Ease.Linear)
|
||||
end
|
||||
distance=0
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue