【御剑行】提交

dev_chengFeng
ZhangBiao 2021-10-15 14:02:33 +08:00
parent 132dc11c6b
commit cbef4e021b
3 changed files with 14 additions and 6 deletions

View File

@ -59,7 +59,7 @@ function this:Refresh(func)
selectImg:SetActive(false)
betImg.sprite = self.spLoader:LoadSprite("y_yujianxing_weijingcai")
costImg.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(configData.JoinCost[1]))
num.text = configData.JoinCost[2]
num.text = string.format( "最低%s",configData.JoinCost[2])
betNum.text = string.format("<color=#9599A7>赔率1:%s</color>",(configData.RateList[i])/10000)
Util.SetGray(btnBet,false)
btnBet:GetComponent("Button").interactable = true

View File

@ -121,6 +121,7 @@ end
function this.ResetGame()
YuJianXingManager.sendEvent = true
this.riceCtrl:ResetGame()
NetManager.RidingSwardInfoRequest()
end
function this.ResetPlayerPosVertical()

View File

@ -81,12 +81,14 @@ end
--添加事件监听(用于子类重写)
function YuJianXingPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, self.MakeRequest,self)
Game.GlobalEvent:AddEvent(GameEvent.YuJianXing.GameFinished, self.Refresh,self)
Game.GlobalEvent:AddEvent(GameEvent.YuJianXing.UpdateBetTime, self.SetBetTime,self)
end
--移除事件监听(用于子类重写)
function YuJianXingPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, self.MakeRequest,self)
Game.GlobalEvent:RemoveEvent(GameEvent.YuJianXing.GameFinished, self.Refresh,self)
Game.GlobalEvent:RemoveEvent(GameEvent.YuJianXing.UpdateBetTime, self.SetBetTime,self)
end
@ -110,17 +112,20 @@ function YuJianXingPanel:OnShow()
self:Refresh()
end
function YuJianXingPanel:MakeRequest()
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.YuJianXing)
if id then
NetManager.RidingSwardActivityRequest(id)
NetManager.RidingSwardInfoRequest()
end
end
function YuJianXingPanel:Refresh()
YuJianXingManager.HideAllPlayers(not YuJianXingManager.InWaiting)
self.waiting:SetActive(YuJianXingManager.InWaiting)
--为小人在地图上下移动做处理
self.count = 0
self:SetTime()
self:SetBetTime()
end
function YuJianXingPanel:SetBetTime()
self.canBetTime.text = string.format( "今日可竞猜次数:%s次",configData.JoinCount - YuJianXingManager.joinCount)
end
--比赛开始动画
@ -170,6 +175,7 @@ function YuJianXingPanel:SetTime()
elseif YuJianXingManager.curState == 2 then
self.nextRoundTime.text = string.format("比赛进行中···")
end
self.canBetTime.text = string.format( "今日可竞猜次数:%s次",configData.JoinCount - YuJianXingManager.joinCount)
self.redPoint:SetActive(YuJianXingManager.CheckRecordList())
self.timer = Timer.New(function ()
self.redPoint:SetActive(YuJianXingManager.CheckRecordList())
@ -203,6 +209,7 @@ function YuJianXingPanel:SetTime()
--活动倒计时
activityEnd = activityEnd - 1
self.curActTime.text = string.format("本期活动倒计时:%s",TimeToDHM(activityEnd))
self.canBetTime.text = string.format( "今日可竞猜次数:%s次",configData.JoinCount - YuJianXingManager.joinCount)
if activityEnd <= 0 then
self:ClosePanel()
end