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

0910

parent 7378540a
...@@ -18,12 +18,12 @@ export default class SceneCtrl { ...@@ -18,12 +18,12 @@ export default class SceneCtrl {
this._parent = parent; this._parent = parent;
} }
change(cls: any, data?: any) { async change(cls: any, data?: any) {
//如果是同一个场景,考虑是替换还是return //如果是同一个场景,考虑是替换还是return
// if (this._currentScene && this._currentScene instanceof cls) return;//new一个得了,playScene维护太蛋疼,到时看性能吧 // if (this._currentScene && this._currentScene instanceof cls) return;//new一个得了,playScene维护太蛋疼,到时看性能吧
showWaiting();
let scene: Scene = new cls(data); let scene: Scene = new cls(data);
scene.visible = false; scene.visible = false;
showWaiting();
let preScene: Scene = this._currentScene; let preScene: Scene = this._currentScene;
scene.onLoaded = () => { scene.onLoaded = () => {
hideWaiting(); hideWaiting();
......
...@@ -39,11 +39,7 @@ export const showWaiting = async (msg?: string) => { ...@@ -39,11 +39,7 @@ export const showWaiting = async (msg?: string) => {
// initWaiting(); // initWaiting();
// _waiting.show(msg) // _waiting.show(msg)
// _parent.addChild(_waiting); // _parent.addChild(_waiting);
sendTbNet(TbNetName.showCustomLoading, {}, (s, d) => { return sendTbNet(TbNetName.showCustomLoading,{} ,null , null, true)
if (s) {
customLoadingClose = d.data
}
} , null, true)
} }
/** /**
...@@ -51,7 +47,8 @@ export const showWaiting = async (msg?: string) => { ...@@ -51,7 +47,8 @@ export const showWaiting = async (msg?: string) => {
*/ */
export const hideWaiting = () => { export const hideWaiting = () => {
// _parent.removeChild(_waiting); // _parent.removeChild(_waiting);
typeof customLoadingClose == 'function' && customLoadingClose() // typeof customLoadingClose == 'function' && customLoadingClose()
return sendTbNet(TbNetName.closeCustomLoading, null ,null, null, true)
} }
export const destroyWaiting = () => { export const destroyWaiting = () => {
......
...@@ -3826,5 +3826,5 @@ export const ResJson = { ...@@ -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 { ...@@ -29,7 +29,7 @@ export class PrizeShowPanel extends Panel {
.drawRoundedRect(150, 236, 300, 300, 20) .drawRoundedRect(150, 236, 300, 300, 20)
.endFill() .endFill()
UI.Btn(panelCtn, 'confirm-btn.png', function() { UI.Btn(panelCtn, 'confirm-btn.png', async function() {
this.btnDelay(this) this.btnDelay(this)
if (this.data.type == 3) { if (this.data.type == 3) {
this.hidePanel() this.hidePanel()
...@@ -39,12 +39,13 @@ export class PrizeShowPanel extends Panel { ...@@ -39,12 +39,13 @@ export class PrizeShowPanel extends Panel {
GDispatcher.dispatchEvent('init-score') GDispatcher.dispatchEvent('init-score')
}, },
once: true once: true
}) }, null, null, true)
changeScene(GameOverScene, Object.assign({}, this.data, {hideMusic: true})) changeScene(GameOverScene, Object.assign({}, this.data, {hideMusic: true}))
//@ts-ignore //@ts-ignore
my && my.navigateTo({ my && my.navigateTo({
url: `/pages/rewardinfofill/rewardinfofill?id=${this.data.id}&prizeId=${this.data.prizeId}` url: `/pages/rewardinfofill/rewardinfofill?id=${this.data.id}&prizeId=${this.data.prizeId}`
}) })
} else { } else {
// @ts-ignore // @ts-ignore
showToast('奖品已为您发放至淘宝卡券~') showToast('奖品已为您发放至淘宝卡券~')
......
...@@ -180,7 +180,13 @@ export class GameScene extends MotionInitScene { ...@@ -180,7 +180,13 @@ export class GameScene extends MotionInitScene {
var fail = UI.Lottie(this, yoga_fail,180, 290) var fail = UI.Lottie(this, yoga_fail,180, 290)
fail.play(1, () => { fail.play(1, () => {
// close bgm // close bgm
this.musicBoolean = false sendTbNet(TbNetName.openMusic, {
isOn: false,
kurl: TBBgm.gameBgm,
loop: true,
force: true
}, null, null, true)
sendTbNet(TbNetName.addTrack, { sendTbNet(TbNetName.addTrack, {
type: 'wildwoodmg:app_finish_game' 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