Commit 1ebab6a7 authored by wildfirecode's avatar wildfirecode

1

parent f82337a0
...@@ -26,4 +26,4 @@ const plugDoJoin = (callback: Function, plugId: number) => { ...@@ -26,4 +26,4 @@ const plugDoJoin = (callback: Function, plugId: number) => {
}, plugId); }, plugId);
} }
export default plugDoJoin
import { DataManager } from "../../tw/manager/DataManager";
/**
* 插件结果弹窗
*/
const plugIsWinning = (): boolean => {
return DataManager.ins.getPlugOrderStatusData.lottery ? true : false;
}
export default plugIsWinning
\ No newline at end of file
...@@ -5,6 +5,19 @@ import StartScene from "./StartScene"; ...@@ -5,6 +5,19 @@ import StartScene from "./StartScene";
import vibrate from "./vibrate"; import vibrate from "./vibrate";
import { playBoom, playSuccess, playToast, playBoomAlert } from "./playMovieClip"; import { playBoom, playSuccess, playToast, playBoomAlert } from "./playMovieClip";
import { stopCreateItems } from "./createItems"; import { stopCreateItems } from "./createItems";
import wait from "../../libs/new_tc/wait";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import { ModuleTypes } from "../../libs/new_wx/types/sceneTypes";
import plugDoJoin from "../../libs/new_tw/ctrls/doPluginJoin";
import plugIsWinning from "../../libs/new_tw/datas/plugIsWinning";
const removeAward = (_this: StartScene) => {
const bodies = Matter.Composite.allBodies(_this._engine.world);
const isAward = (i: Matter.Body) => { return i.collisionFilter.group == award };
bodies.forEach(i => {
if (isAward(i)) _this._egretRender.remove(i);
});
}
const check = (_this: StartScene) => { const check = (_this: StartScene) => {
const center = 109 - 40; const center = 109 - 40;
...@@ -71,9 +84,16 @@ const check = (_this: StartScene) => { ...@@ -71,9 +84,16 @@ const check = (_this: StartScene) => {
clearLevel(); clearLevel();
vibrate(_this, 2); vibrate(_this, 2);
playBoomAlert(_this) playBoomAlert(_this)
playBoom(_this['group']) playBoom(_this['group']);
removeAward(_this);
stopCreateItems();
plugDoJoin(() => {
if (plugIsWinning())
PanelCtrl.instance.show(ModuleTypes.BoomPrizePanel);
else
PanelCtrl.instance.show(ModuleTypes.BoomNoPrizePanel);
}, 4039);
} }
} }
else { else {
if (xResult2 && yResult2) { if (xResult2 && yResult2) {
......
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