【山河社稷图读取关卡界面音乐】

dev_chengFeng
zhangqiang 2021-06-09 18:17:22 +08:00
parent ebfd313e12
commit 05b55bce02
4 changed files with 18 additions and 1 deletions

View File

@ -44,6 +44,7 @@ function FightLevelChapterPanel:OnOpen()
-- LogYellow(bit.band(4,3))
-- SoundManager.PlaySound(SoundConfig.Sound_WorldMap)
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main })
-- SoundManager.PlayMusic(SoundConfig.BGM_Main)
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
@ -52,6 +53,7 @@ function FightLevelChapterPanel:OnShow()
end
function this.OnShowPanel()
SoundManager.PlayMusic(SoundConfig.BGM_Main)
this.starNumText.text = FightLevelManager.GetAllChapterStars()
curChapterId = FightLevelManager.GetCurChapterId()
local allData = FightLevelManager.GetChapterData()

View File

@ -91,6 +91,8 @@ function FightLevelSingleChapterPanel:OnShow()
end
function this.OnShowPanel()
SoundManager.PlayMusic(SoundConfig.BGM_Main)
chapterData = FightLevelManager.GetChapterData(chapterId)
this.chapterNameText.text = chapterData.config.Name
this.chapterNameImage.text = chapterData.config.Id

View File

@ -20,6 +20,7 @@ this.refreshTimer=nil
this.upView = nil
local maxTimesCount = 0
local isPlayVideo = false
---初始化组件(用于子类重写)
function LuckyTurnTablePanel:InitComponent(gameObject)
this.spLoader = SpriteLoader.New()
@ -290,6 +291,7 @@ function this.SwitchTreasureType(treasureType)
this.RrFreshInfo()
LuckyTurnTableManager.SetTimes(LuckyTurnTableManager.luckyTimes + 1)
this.maxTimes.text =string.format(Language[11156],LuckyTurnTableManager.luckyTimes,maxTimesCount)
isPlayVideo = true
end)
else
--PopupTipPanel.ShowTip("幸运探宝券不足!")
@ -312,6 +314,7 @@ function this.SwitchTreasureType(treasureType)
this.RrFreshInfo()
LuckyTurnTableManager.SetTimes(LuckyTurnTableManager.luckyTimes + 15)
this.maxTimes.text =string.format(Language[11156],LuckyTurnTableManager.luckyTimes,maxTimesCount)
isPlayVideo = true
end)
else
--PopupTipPanel.ShowTip("幸运探宝券不足!")
@ -402,6 +405,7 @@ function this.SwitchTreasureType(treasureType)
this.SetTableTurnEffect(TableTurnType.Expedite,TreasureType.Advanced,LuckyTurnTableManager.advancedTempData.posInfos[1].pos)
this.SetPropShow(61,TreasureType.Advanced)
this.RrFreshInfo()
isPlayVideo = true
end)
else
if not RECHARGEABLE then--(是否开启充值)
@ -427,6 +431,7 @@ function this.SwitchTreasureType(treasureType)
this.SetTableTurnEffect(TableTurnType.Expedite,TreasureType.Advanced,LuckyTurnTableManager.advancedTempData.posInfos[1].pos)
this.SetPropShow(61,TreasureType.Advanced)
this.RrFreshInfo()
isPlayVideo = true
end)
else
if not RECHARGEABLE then--(是否开启充值)
@ -515,12 +520,14 @@ function this.SetTableTurnEffect(turnType,treasureType,pos)
local timer=Timer.New(function()
this.DelayMaskWithBool(false)
if treasureType==TreasureType.Lucky then
isPlayVideo = false
UIManager.OpenPanel(UIName.RewardItemPopup,LuckyTurnTableManager.luckyTempData.drop,1,function()
this.SetTableTurnEffect(TableTurnType.Normal)--恢复转盘旋转
LuckyTurnTableManager.isCanGetWorldMessage=true
end)--打开奖励弹窗
this.SetItemViewGray(LuckyTurnTableManager.luckyData)--刷新物品是否置灰
elseif treasureType==TreasureType.Advanced then
isPlayVideo = false
UIManager.OpenPanel(UIName.RewardItemPopup,LuckyTurnTableManager.advancedTempData.drop,1,function()
this.SetTableTurnEffect(TableTurnType.Normal)--恢复转盘旋转
LuckyTurnTableManager.isCanGetWorldMessage=true
@ -553,6 +560,9 @@ function this.TurnEffectReset(turnSpeed,isStop,pos,func)
end
end
end
if isPlayVideo then
SoundManager.PlaySound(SoundConfig.UI_Xingyunzhuanpan)
end
this.itemEffectIcon[curTurnPos]:SetActive(true)
curTurnPos=curTurnPos+1
end,turnSpeed,-1,true)
@ -762,6 +772,7 @@ function this.SetRewardBox()
--奖励未领取 先请求领取
if LuckyTurnTableManager.GetRewardState(30,LuckyTurnTableManager.boxReward_One[i].Id)==0 then
NetManager.GetActivityRewardRequest(LuckyTurnTableManager.boxReward_One[i].Id,30,function(drop)
isPlayVideo = false
UIManager.OpenPanel(UIName.RewardItemPopup,drop)
Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(false)--隐藏红点
this.RrFreshInfo()
@ -800,6 +811,7 @@ function this.SetRewardBox()
if LuckyTurnTableManager.value_2>=LuckyTurnTableManager.boxReward_Two[i].Values[1][1] then
if LuckyTurnTableManager.GetRewardState(31,LuckyTurnTableManager.boxReward_Two[i].Id)==0 then
NetManager.GetActivityRewardRequest(LuckyTurnTableManager.boxReward_Two[i].Id,31,function(drop)
isPlayVideo = false
UIManager.OpenPanel(UIName.RewardItemPopup,drop)
Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(false)--隐藏红点
this.RrFreshInfo()

View File

@ -117,10 +117,11 @@ function this.tableTurnEffect()
index = 0
end
local redNext = Util.GetGameObject(this.itemsList[index+1],"Red")
redNext:SetActive(true)
redNext:SetActive(true)
index = index + 1
--检测最后的奖励
local cfg = this.TrialGameConfig[this.list[index]]
SoundManager.PlaySound(SoundConfig.UI_Xingyunzhuanpan)
if stopId and stopId == cfg.Id then
--游戏结束显示掉落
Timer.New(function()