Commit 8494f22c authored by haiyoucuv's avatar haiyoucuv

礼盒loading引导

parent 9da2d21b
This diff is collapsed.
{ {
"code": "000000", "code": "000000",
"data": { "data": {
"currentLevel": 120, "currentLevel": 4,
"isFirstLogin": false, "isFirstLogin": false,
"records": [{ "records": [{
"score": 0, "score": 0,
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"loginAddPower": false, "loginAddPower": false,
"rule": "泡泡玛特测试游戏2,内部测试", "rule": "泡泡玛特测试游戏2,内部测试",
"startTime": 1601379209000, "startTime": 1601379209000,
"power": 0, "power": 4,
"endTime": 1661984009000, "endTime": 1661984009000,
"title": "测试2", "title": "测试2",
"tools": { "tools": {
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
"name": "mapTree" "name": "mapTree"
}, },
{ {
"keys": "amazing.png,blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele0Line.png,ele1Exp.png,ele1Line.png,ele2Exp.png,ele2Line.png,ele3Exp.png,ele3Line.png,ele4Exp.png,ele4Line.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,gameGuide1.png,gameGuideBoard.png,great.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8.png,hairballPiece9.png,ice2.png,ice3.png,ice4.png,ice5.jpg,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,prop_count_bg.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBg.png,starProgress.png,stepAni1.png,stepAni10.png,stepAni11.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,topBg.png,unlightedStar.png,wonderful.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png", "keys": "amazing.png,blueDoorBg.png,bonusFra0.png,bonusFra1.png,bonusFra10.png,bonusFra11.png,bonusFra2.png,bonusFra3.png,bonusFra4.png,bonusFra5.png,bonusFra6.png,bonusFra7.png,bonusFra8.png,bonusFra9.png,bonusShoot.png,boom0.png,boom1.png,boom10.png,boom11.png,boom12.png,boom13.png,boom14.png,boom15.png,boom16.png,boom17.png,boom18.png,boom19.png,boom2.png,boom20.png,boom3.png,boom4.png,boom5.png,boom6.png,boom7.png,boom8.png,boom9.png,brownBallFace.png,bubbleStar1.png,bubbleStar10.png,bubbleStar11.png,bubbleStar12.png,bubbleStar13.png,bubbleStar14.png,bubbleStar15.png,bubbleStar16.png,bubbleStar17.png,bubbleStar18.png,bubbleStar19.png,bubbleStar2.png,bubbleStar3.png,bubbleStar4.png,bubbleStar5.png,bubbleStar6.png,bubbleStar7.png,bubbleStar8.png,bubbleStar9.png,bubleEle0.png,bubleEle1.png,bubleEle2.png,bubleEle3.png,bubleEle4.png,chapterNum0.png,chapterNum1.png,chapterNum2.png,chapterNum3.png,chapterNum4.png,chapterNum5.png,chapterNum6.png,chapterNum7.png,chapterNum8.png,chapterNum9.png,chapterNum关.png,chapterNum第.png,chooseRect.png,doorClosed.png,doorOpen.png,eggPiece1.png,eggPiece2.png,eggPiece3.png,eggPiece4.png,eggPiece5.png,eggStatus0.png,eggStatus1.png,eggStatus2.png,ele0Exp.png,ele0Line.png,ele1Exp.png,ele1Line.png,ele2Exp.png,ele2Line.png,ele3Exp.png,ele3Line.png,ele4Exp.png,ele4Line.png,exLighting0.png,exLighting10.png,exLighting13.png,exLighting15.png,exLighting17.png,exLighting18.png,exLighting2.png,exLighting20.png,exLighting22.png,exLighting24.png,exLighting26.png,exLighting28.png,exLighting31.png,exLighting33.png,exLighting4.png,exLighting6.png,exLighting8.png,eyeDownLeft.png,eyeDownRight.png,eyeSingle.png,festivalBg.jpg,festivalLoading.png,gameGuide1.png,gameGuideBoard.png,great.png,greenCircleDown.png,greenCircleUp.png,greyBallFace.png,guidePropBoom.png,guidePropCow.png,guidePropHammer.png,guidePropHand.png,guidePropMsgPanel.png,guidePropShoe.png,hairballDisBg.png,hairballPiece1.png,hairballPiece2.png,hairballPiece3.png,hairballPiece4.png,hairballPiece5.png,hairballPiece6.png,hairballPiece7.png,hairballPiece8.png,hairballPiece9.png,ice2.png,ice3.png,ice4.png,ice5.jpg,ice5.png,ice6.png,jellyArrow.png,leftArrow.png,lightedStar.png,lineLight.png,lockVine.png,magicLion.png,magicLionBg.png,main_mapbottom.png,musicOff.png,musicOn.png,playBg.jpg,propNum0.png,propNum1.png,propNum2.png,propNum3.png,propNum4.png,propNum5.png,propNum6.png,propNum7.png,propNum8.png,propNum9.png,prop_count_bg.png,rectLat.png,rectLatWhite.png,redDoorBg.png,rightArrow.png,rightMark.png,rock2.png,rock3.png,rock4.png,rock5.png,rock6.png,scoreNum0.png,scoreNum1.png,scoreNum2.png,scoreNum3.png,scoreNum4.png,scoreNum5.png,scoreNum6.png,scoreNum7.png,scoreNum8.png,scoreNum9.png,scoreNum关.png,scoreNum冒号.png,scoreNum分.png,scoreNum数.png,scoreNum通.png,settingBg.png,starProgress.png,stepAni1.png,stepAni10.png,stepAni11.png,stepAni2.png,stepAni3.png,stepAni4.png,stepAni5.png,stepAni6.png,stepAni7.png,stepAni8.png,stepAni9.png,stepNum0.png,stepNum1.png,stepNum2.png,stepNum3.png,stepNum4.png,stepNum5.png,stepNum6.png,stepNum7.png,stepNum8.png,stepNum9.png,table.png,tarNum0.png,tarNum1.png,tarNum2.png,tarNum3.png,tarNum4.png,tarNum5.png,tarNum6.png,tarNum7.png,tarNum8.png,tarNum9.png,topBg.png,unlightedStar.png,wonderful.png,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"name": "playScene" "name": "playScene"
}, },
{ {
......
This diff is collapsed.
...@@ -69,6 +69,8 @@ import FrameAni = FYGE.FrameAni; ...@@ -69,6 +69,8 @@ import FrameAni = FYGE.FrameAni;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import Container = FYGE.Container; import Container = FYGE.Container;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import Graphics = FYGE.Graphics;
import Sprite = FYGE.Sprite;
const aniClass = { const aniClass = {
"BoomAni": BoomAni, "BoomAni": BoomAni,
...@@ -283,7 +285,7 @@ export class PlayScene extends Scene { ...@@ -283,7 +285,7 @@ export class PlayScene extends Scene {
data: { chapter: number, isGiftPrizeLevel: boolean } data: { chapter: number, isGiftPrizeLevel: boolean }
start(data: { chapter: number, isGiftPrizeLevel: boolean }) { async start(data: { chapter: number, isGiftPrizeLevel: boolean }) {
super.start(); super.start();
// data = { chapter: 1 } // data = { chapter: 1 }
//第几关 //第几关
...@@ -310,7 +312,7 @@ export class PlayScene extends Scene { ...@@ -310,7 +312,7 @@ export class PlayScene extends Scene {
this.initBaseElement(); this.initBaseElement();
//设置栏置顶 //设置栏置顶
//先判断是否添加节日元素,如果加节日元素,就按initFestivalEle里的来 //先判断是否添加节日元素,如果加节日元素,就按initFestivalEle里的来
if (!this.initFestivalEle()) { if (!await this.initFestivalEle()) {
//检查一次三消 //检查一次三消
if (this.threeMatch()) { if (this.threeMatch()) {
this.eliminate(); this.eliminate();
...@@ -747,8 +749,36 @@ export class PlayScene extends Scene { ...@@ -747,8 +749,36 @@ export class PlayScene extends Scene {
// } // }
} }
startLoading() {
return new Promise((resolve, reject) => {
const node: Container = new Container();
node.addChild(Tools.getSprite('festivalBg.jpg'));
const loading: Sprite = node.addChild(Tools.getSprite('festivalLoading.png'));
loading.position.set(-457, 966);
const g: Graphics = this.addChild(new Graphics());
g.beginFill(0xffffff);
g.drawRoundedRect(98, 966, 556, 40, 40);
g.endFill();
loading.mask = g;
node.addChild(loading);
node.addChild(g);
this.addChild(node);
Tween.get(loading)
.set({x: -457})
.to({x: 98}, 3000, Ease.quadInOut)
.wait(300)
.call(() => {
this.removeChild(node);
resolve(true);
});
});
}
//初始化节日元素,暂时不用 //初始化节日元素,暂时不用
initFestivalEle(): boolean { async initFestivalEle() {
//添加节日元素,条件可能会变 //添加节日元素,条件可能会变
if (fesChapterData.indexOf(this.chapter >> 0) > -1 if (fesChapterData.indexOf(this.chapter >> 0) > -1
// && getRedBombTimes() // && getRedBombTimes()
...@@ -757,6 +787,9 @@ export class PlayScene extends Scene { ...@@ -757,6 +787,9 @@ export class PlayScene extends Scene {
&& this.lattices[festivalIndex] && //格子必须有 && this.lattices[festivalIndex] && //格子必须有
(Tool.judgeSetFesEle(this.lattices[festivalIndex]) || !this.lattices[festivalIndex].element) //没有元素也行 (Tool.judgeSetFesEle(this.lattices[festivalIndex]) || !this.lattices[festivalIndex].element) //没有元素也行
) { ) {
await this.startLoading();
const p = Tool.getPositionByIndex(festivalIndex); const p = Tool.getPositionByIndex(festivalIndex);
//添加节日红包目标 //添加节日红包目标
this.festivalTarget = new FestivalTarget(this.festivalTargetNum); this.festivalTarget = new FestivalTarget(this.festivalTargetNum);
......
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