Commit 068af7ad authored by Master Q's avatar Master Q

0910

parent 7378540a
......@@ -18,12 +18,12 @@ export default class SceneCtrl {
this._parent = parent;
}
change(cls: any, data?: any) {
async change(cls: any, data?: any) {
//如果是同一个场景,考虑是替换还是return
// if (this._currentScene && this._currentScene instanceof cls) return;//new一个得了,playScene维护太蛋疼,到时看性能吧
showWaiting();
let scene: Scene = new cls(data);
scene.visible = false;
showWaiting();
let preScene: Scene = this._currentScene;
scene.onLoaded = () => {
hideWaiting();
......
......@@ -39,11 +39,7 @@ export const showWaiting = async (msg?: string) => {
// initWaiting();
// _waiting.show(msg)
// _parent.addChild(_waiting);
sendTbNet(TbNetName.showCustomLoading, {}, (s, d) => {
if (s) {
customLoadingClose = d.data
}
} , null, true)
return sendTbNet(TbNetName.showCustomLoading,{} ,null , null, true)
}
/**
......@@ -51,7 +47,8 @@ export const showWaiting = async (msg?: string) => {
*/
export const hideWaiting = () => {
// _parent.removeChild(_waiting);
typeof customLoadingClose == 'function' && customLoadingClose()
// typeof customLoadingClose == 'function' && customLoadingClose()
return sendTbNet(TbNetName.closeCustomLoading, null ,null, null, true)
}
export const destroyWaiting = () => {
......
......@@ -3826,5 +3826,5 @@ export const ResJson = {
}
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1631179244/resource/"
"path": "https://yun.duiba.com.cn/db_games/activity/template/1631206618/resource/"
}
\ No newline at end of file
......@@ -29,7 +29,7 @@ export class PrizeShowPanel extends Panel {
.drawRoundedRect(150, 236, 300, 300, 20)
.endFill()
UI.Btn(panelCtn, 'confirm-btn.png', function() {
UI.Btn(panelCtn, 'confirm-btn.png', async function() {
this.btnDelay(this)
if (this.data.type == 3) {
this.hidePanel()
......@@ -39,12 +39,13 @@ export class PrizeShowPanel extends Panel {
GDispatcher.dispatchEvent('init-score')
},
once: true
})
}, null, null, true)
changeScene(GameOverScene, Object.assign({}, this.data, {hideMusic: true}))
//@ts-ignore
my && my.navigateTo({
url: `/pages/rewardinfofill/rewardinfofill?id=${this.data.id}&prizeId=${this.data.prizeId}`
})
} else {
// @ts-ignore
showToast('奖品已为您发放至淘宝卡券~')
......
......@@ -180,7 +180,13 @@ export class GameScene extends MotionInitScene {
var fail = UI.Lottie(this, yoga_fail,180, 290)
fail.play(1, () => {
// close bgm
this.musicBoolean = false
sendTbNet(TbNetName.openMusic, {
isOn: false,
kurl: TBBgm.gameBgm,
loop: true,
force: true
}, null, null, true)
sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_finish_game'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment