Commit a55f58f5 authored by haiyoucuv's avatar haiyoucuv

Success Panel Effect!

parent eb5c8911
This diff is collapsed.
{ {
"code": "530001", "code": "530001",
"data": { "data": {
"power": 1231, "power": 231,
"tools": { "tools": {
"STEPS": 3, "STEPS": 3,
"BOOMS": 4, "BOOMS": 4,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"code": "1111", "code": "1111",
"message": "OK", "message": "OK",
"data": { "data": {
"power": 100, "power": 0,
"currentLevel": 1, "currentLevel": 1,
"tools": { "tools": {
"STEPS": 1, "STEPS": 1,
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
"data": { "data": {
"isvip": false, "isvip": false,
"url": "xxx", "url": "xxx",
"credits": 1111 "credits": 471
} }
} }
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"name": "StartPanelPrize" "name": "StartPanelPrize"
}, },
{ {
"keys": "star_dis.png,star_en.png,去抽奖.png,圆角矩形 648.png,红包奖励.png,道具.png,闯关成功.png,闯关成功Bg.png,闯关成功不满星按钮.png", "keys": "star_dis.png,star_en.png,去抽奖.png,圆角矩形 648.png,道具.png,道具圆圈.png,闯关成功.png,闯关成功Bg.png,闯关成功不满星按钮.png",
"name": "SuccessPanel" "name": "SuccessPanel"
}, },
{ {
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
"name": "bonusTime" "name": "bonusTime"
}, },
{ {
"keys": "comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,star.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common" "name": "common"
}, },
{ {
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"name": "mapWhaleEffect" "name": "mapWhaleEffect"
}, },
{ {
"keys": "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,boomBtn.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,ele1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp.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,gameGuideBoard.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,hammerBtn.png,ice2.png,ice3.png,ice4.png,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,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,settingBtn.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,stepBtn.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,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png", "keys": "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,ele1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp.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,gameGuideBoard.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.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,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,settingBtn.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,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"name": "playScene" "name": "playScene"
}, },
{ {
......
...@@ -45,7 +45,7 @@ export const ResJson = { ...@@ -45,7 +45,7 @@ export const ResJson = {
"name": "StartPanelPrize" "name": "StartPanelPrize"
}, },
{ {
"keys": "star_dis.png,star_en.png,去抽奖.png,圆角矩形 648.png,红包奖励.png,道具.png,闯关成功.png,闯关成功Bg.png,闯关成功不满星按钮.png", "keys": "star_dis.png,star_en.png,去抽奖.png,圆角矩形 648.png,道具.png,道具圆圈.png,闯关成功.png,闯关成功Bg.png,闯关成功不满星按钮.png",
"name": "SuccessPanel" "name": "SuccessPanel"
}, },
{ {
...@@ -65,7 +65,7 @@ export const ResJson = { ...@@ -65,7 +65,7 @@ export const ResJson = {
"name": "bonusTime" "name": "bonusTime"
}, },
{ {
"keys": "comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,star.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,动物.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png", "keys": "boomBtn.png,comCloseBtn.png,comm_light.png,ele0.png,ele1.png,ele10.png,ele11.png,ele12.png,ele13.png,ele14.png,ele2.png,ele3.png,ele4.png,ele5.png,ele6.png,ele7.png,ele8.png,ele9.png,hammerBtn.png,star.png,stepBtn.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,再想想.png,开始闯关不要能量.png,开始闯关要能量.png,确定.png,继续闯关大.png,继续闯关小.png",
"name": "common" "name": "common"
}, },
{ {
...@@ -101,7 +101,7 @@ export const ResJson = { ...@@ -101,7 +101,7 @@ export const ResJson = {
"name": "mapWhaleEffect" "name": "mapWhaleEffect"
}, },
{ {
"keys": "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,boomBtn.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,ele1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp.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,gameGuideBoard.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,hammerBtn.png,ice2.png,ice3.png,ice4.png,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,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,settingBtn.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,stepBtn.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,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png", "keys": "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,ele1Exp.png,ele2Exp.png,ele3Exp.png,ele4Exp.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,gameGuideBoard.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.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,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,settingBtn.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,yellowCircleDown.png,yellowCircleUp.png,yellowDoorBg.png",
"name": "playScene" "name": "playScene"
}, },
{ {
......
...@@ -258,12 +258,22 @@ export const SkinJson = { ...@@ -258,12 +258,22 @@ export const SkinJson = {
}, },
{ {
"name": "img", "name": "img",
"x": 86,
"y": 45,
"alpha": 1,
"type": "sprite",
"props": {
"source": "道具.png"
}
},
{
"name": "quanquan",
"x": 76, "x": 76,
"y": 24, "y": 24,
"alpha": 1, "alpha": 1,
"type": "sprite", "type": "sprite",
"props": { "props": {
"source": "道具.png" "source": "道具圆圈.png"
} }
} }
], ],
...@@ -672,7 +682,7 @@ export const SkinJson = { ...@@ -672,7 +682,7 @@ export const SkinJson = {
"alpha": 1, "alpha": 1,
"type": "text", "type": "text",
"props": { "props": {
"text": "+1", "text": "+ 15",
"size": 36, "size": 36,
"fillColor": "#ffffff", "fillColor": "#ffffff",
"textAlpha": 1 "textAlpha": 1
......
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import { Tools } from "../Tools";
import { getCurrentScene, hideWaiting, showPanel, showToast, showWaiting } from "../../module/ctrls";
import { JoinPanel } from "./JoinPanel";
import { PropType } from "../something/enum/PropType";
import VERTICAL_ALIGN = FYGE.VERTICAL_ALIGN;
import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import TextField = FYGE.TextField;
export class BuyPowerPanel extends Panel { export class BuyPowerPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -14,7 +21,37 @@ export class BuyPowerPanel extends Panel { ...@@ -14,7 +21,37 @@ export class BuyPowerPanel extends Panel {
closeBtn: FYGE.Button; closeBtn: FYGE.Button;
initUi() { initUi() {
const btnTxt: TextField = this.exchangeBtn.addChild(Tools.getText(
'30店铺积分', 36, '#ffffff',
TEXT_ALIGN.CENTER, this.exchangeBtn.width, 0, -3
));
btnTxt.textHeight = this.exchangeBtn.height;
btnTxt.verticalAlign = VERTICAL_ALIGN.MIDDLE;
btnTxt.bold = true;
btnTxt.stroke = 3;
btnTxt.strokeColor = '#21926e';
this.msgTxt.bold = true;
this.msgTxt.stroke = 3;
this.msgTxt.strokeColor = '#21926e';
this.exchangeBtn.addEventListener(FYGE.MouseEvent.CLICK, async () => {
//购买道具
showWaiting();
var res = await Tools.exchange(PropType.POWER);
hideWaiting();
//如果是链接,弹出加入会员弹框
if (typeof res == "string") {
showPanel(JoinPanel, { url: res });
}
//成功了,关闭弹框,修改道具信息
else if (res) {
showToast("兑换成功");
this.hidePanel();
getCurrentScene().updateScene();
}
}, this);
} }
start(data) { start(data) {
......
import { Panel } from "../../module/views/Panel";
import MouseEvent = FYGE.MouseEvent;
import { showPanel } from "../../module/ctrls";
import { BuyPowerPanel } from "./BuyPowerPanel";
export class NoEnergyPanel extends Panel {
get groupNames() {
return ["NoEnergyPanel"]
}
get skinName() {
return "NoEnergyPanel"
}
closeBtn: FYGE.Button;
okBtn: FYGE.Button;
initUi() {
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
this.okBtn.addEventListener(MouseEvent.CLICK, () => {
showPanel(BuyPowerPanel);
this.hidePanel();
}, this);
}
removeEvents() {
super.removeEvents();
}
}
...@@ -5,11 +5,12 @@ import { ElementTargetData } from "../something/interface/ElementTargetData"; ...@@ -5,11 +5,12 @@ import { ElementTargetData } from "../something/interface/ElementTargetData";
import Container = FYGE.Container; import Container = FYGE.Container;
import TEXT_ALIGN = FYGE.TEXT_ALIGN; import TEXT_ALIGN = FYGE.TEXT_ALIGN;
import MouseEvent = FYGE.MouseEvent; import MouseEvent = FYGE.MouseEvent;
import { changeScene } from "../../module/ctrls"; import { changeScene, showPanel } from "../../module/ctrls";
import { PlayScene } from "../scene/PlayScene"; import { PlayScene } from "../scene/PlayScene";
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import { sendTbNet, TbNetName } from "../TaoBaoNet"; import { sendTbNet, TbNetName } from "../TaoBaoNet";
import { NoEnergyPanel } from "./NoEnergyPanel";
export class StartPanel extends Panel { export class StartPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -57,6 +58,10 @@ export class StartPanel extends Panel { ...@@ -57,6 +58,10 @@ export class StartPanel extends Panel {
} }
private startGame() { private startGame() {
if (this.data.stars < 3 && Tools.gameData.power <= 0) {// 体力不足
showPanel(NoEnergyPanel);
return;
}
sendTbNet(TbNetName.dojoin, {level: this.data.level}, sendTbNet(TbNetName.dojoin, {level: this.data.level},
(success, res) => { (success, res) => {
if (!success) return; if (!success) return;
......
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import MouseEvent = FYGE.MouseEvent; import MouseEvent = FYGE.MouseEvent;
import { changeScene } from "../../module/ctrls"; import { changeScene, showPanel } from "../../module/ctrls";
import { PlayScene } from "../scene/PlayScene"; import { PlayScene } from "../scene/PlayScene";
import { StartTarget } from "./StartPanel"; import { StartTarget } from "./StartPanel";
import TEXT_ALIGN = FYGE.TEXT_ALIGN; import TEXT_ALIGN = FYGE.TEXT_ALIGN;
...@@ -10,6 +10,7 @@ import Sprite = FYGE.Sprite; ...@@ -10,6 +10,7 @@ import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import { Tools } from "../Tools"; import { Tools } from "../Tools";
import { sendTbNet, TbNetName } from "../TaoBaoNet"; import { sendTbNet, TbNetName } from "../TaoBaoNet";
import { NoEnergyPanel } from "./NoEnergyPanel";
export class StartPanelPrize extends Panel { export class StartPanelPrize extends Panel {
get groupNames() { get groupNames() {
...@@ -61,6 +62,10 @@ export class StartPanelPrize extends Panel { ...@@ -61,6 +62,10 @@ export class StartPanelPrize extends Panel {
} }
private startGame() { private startGame() {
if (this.data.stars < 3 && Tools.gameData.power <= 0) {// 体力不足
showPanel(NoEnergyPanel);
return;
}
sendTbNet(TbNetName.dojoin, {level: this.data.level}, sendTbNet(TbNetName.dojoin, {level: this.data.level},
(success, res) => { (success, res) => {
if (!success) return; if (!success) return;
......
...@@ -7,6 +7,8 @@ import Sprite = FYGE.Sprite; ...@@ -7,6 +7,8 @@ import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import Container = FYGE.Container; import Container = FYGE.Container;
import { PropType } from "../something/enum/PropType"; import { PropType } from "../something/enum/PropType";
import { RES } from "../../module/RES";
import TextField = FYGE.TextField;
export class SuccessPrizePanel extends Panel { export class SuccessPrizePanel extends Panel {
get groupNames() { get groupNames() {
...@@ -60,21 +62,30 @@ export class SuccessPrizePanel extends Panel { ...@@ -60,21 +62,30 @@ export class SuccessPrizePanel extends Panel {
this.starGroup.play(this.data.stars); this.starGroup.play(this.data.stars);
const propImg: Sprite = this.prop.getChildByName('img');
const propLabel: TextField = this.prop.getChildByName('label');
if (this.data.tool) { if (this.data.tool) {
this.againBtn.visible = false; this.againBtn.visible = false;
this.goPrizeBtn.visible = false; this.goPrizeBtn.visible = false;
this.prizeImg.visible = false; this.prizeImg.visible = false;
switch (this.data.tool.type) { switch (this.data.tool.type) {
case PropType.BOOMS: case PropType.BOOMS:
// boomBtn propImg.texture = RES.getRes('boomBtn.png');
propImg.y += 5;
propImg.x += 15;
propLabel.text = '步数道具 x1';
break; break;
case PropType.HAMMERS: case PropType.HAMMERS:
// hammerBtn propImg.texture = RES.getRes('hammerBtn.png');
propImg.x += 10;
propLabel.text = '锤子道具 x1';
break; break;
case PropType.STEPS: case PropType.STEPS:
// stepBtn propImg.texture = RES.getRes('stepBtn.png');
propLabel.text = '步数道具 x1';
break; break;
} }
......
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import { layers } from "../../module/views/layers"; import { layers } from "../../module/views/layers";
import { sendTbNet, TbNetName } from "../TaoBaoNet";
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import Button = FYGE.Button; import Button = FYGE.Button;
...@@ -35,6 +36,21 @@ export class TaskPanel extends Panel { ...@@ -35,6 +36,21 @@ export class TaskPanel extends Panel {
} }
public updateTask() {
// const _bd: { string: Button } = {
// 'browseGoods': this.taskBtn1,
// 'invites': this.taskBtn2,
// 'follow': this.taskBtn3,
// 'member': this.taskBtn4,
// }
sendTbNet(TbNetName.getTaskList, {},
(success, res) => {
if (!success) return;
}
);
}
start(data) { start(data) {
super.start(); super.start();
} }
......
...@@ -13,6 +13,8 @@ import Sprite = FYGE.Sprite; ...@@ -13,6 +13,8 @@ import Sprite = FYGE.Sprite;
import Texture = FYGE.Texture; import Texture = FYGE.Texture;
import Tween = FYGE.Tween; import Tween = FYGE.Tween;
import Ease = FYGE.Ease; import Ease = FYGE.Ease;
import { sendTbNet, TbNetName } from "../../TaoBaoNet";
import { showToast } from "../../../module/ctrls";
export class MapScene extends Scene { export class MapScene extends Scene {
private mapContainer: Container = null; private mapContainer: Container = null;
...@@ -207,22 +209,27 @@ export class MapScene extends Scene { ...@@ -207,22 +209,27 @@ export class MapScene extends Scene {
this.scrollPage.scrollTo(checkY, time); this.scrollPage.scrollTo(checkY, time);
} }
public async updateScene() {
super.updateScene();
this.uiLayer.updateUI();
}
public start(data?: any) { public start(data?: any) {
super.start(data); super.start(data);
Tools.gameOver({ // Tools.gameOver({
level: 1, // level: 1,
score: 666, // score: 666,
stars: 3, // stars: 3,
isVisitSuccess: true, // isVisitSuccess: true,
isPrizeLevel: true, // isPrizeLevel: true,
tool: { // tool: {
type: 'STEPS', // type: 'HAMMERS',
}, // },
// prize: { // // prize: {
// image: 'https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.png', // // image: 'https://img.alicdn.com/imgextra/i1/2275046294/O1CN01xTeKMI1wMhRux48Y6_!!2275046294-2-miniprogram.png',
// } // // }
}); // });
} }
public initEvents() { public initEvents() {
......
...@@ -15,7 +15,7 @@ import Texture = FYGE.Texture; ...@@ -15,7 +15,7 @@ import Texture = FYGE.Texture;
export default class MapUI extends Container { export default class MapUI extends Container {
public energyBox: EnergyBox = null; public energyBox: EnergyBox = null;
private creditsBox: CreditsBox = null; public creditsBox: CreditsBox = null;
private prizeBox: PrizeBox = null; private prizeBox: PrizeBox = null;
private myPrizeBtn: Button = null; private myPrizeBtn: Button = null;
...@@ -93,6 +93,11 @@ export default class MapUI extends Container { ...@@ -93,6 +93,11 @@ export default class MapUI extends Container {
this.prizeBox = this.addChild(new PrizeBox({})); this.prizeBox = this.addChild(new PrizeBox({}));
} }
public updateUI() {
this.creditsBox.updateCredits();
this.energyBox.count = Tools.gameData.power;
}
} }
/** /**
...@@ -166,6 +171,15 @@ class CreditsBox extends Container { ...@@ -166,6 +171,15 @@ class CreditsBox extends Container {
this.addChild(Tools.getSprite('map_creditsBg.png')); this.addChild(Tools.getSprite('map_creditsBg.png'));
this.countLabel = this.addChild(Tools.getText(
'积分:0', 20, '#ffffff',
TEXT_ALIGN.CENTER, 105, 58, 21
));
await this.updateCredits();
}
public async updateCredits() {
const creditsData = await sendTbNet(TbNetName.queryCredits, {}, () => { const creditsData = await sendTbNet(TbNetName.queryCredits, {}, () => {
}, true); }, true);
let jfLabel = '积分:0'; let jfLabel = '积分:0';
...@@ -175,10 +189,7 @@ class CreditsBox extends Container { ...@@ -175,10 +189,7 @@ class CreditsBox extends Container {
jfLabel = `积分:${creditsData.data.credits}`; jfLabel = `积分:${creditsData.data.credits}`;
} }
this.countLabel = this.addChild(Tools.getText( this.countLabel.text = jfLabel;
jfLabel, 20, '#ffffff',
TEXT_ALIGN.CENTER, 105, 58, 21
));
} }
} }
......
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