Commit e0f8f5e4 authored by zhangjinzhou's avatar zhangjinzhou

消消乐代码暂存

parent c43bbd2e
......@@ -259,10 +259,14 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("lineLight" + i + "_png")
}
//三个星星宝箱
RES.getResAsync("starbox1_png");
RES.getResAsync("starbox2_png");
RES.getResAsync("starbox3_png");
for (var i = 1; i < 4; i++) {
RES.getResAsync("starbox"+i+"_png");
RES.getResAsync("starbox"+i+"open_png");
RES.getResAsync("starbox"+i+"close_png");
}
//天降好礼
RES.getResAsync("ballonimg_png");
var arr = [
"redDoorBg", "blueDoorBg", "yellowDoorBg", "doorOpen", "doorClosed",
"rectLatWhite",
......
......@@ -11,8 +11,10 @@ export default class NoPrizePanel extends Panel {
_level;
start(data) {
super.start();
this._level = parseInt(data.level + '');
this['lvTxt'].text = `关卡${this._level}`
// this._level = parseInt(data.level + '');
// this['lvTxt'].text = `关卡${this._level}`
const {score} = data;
this["scoretxt"].text = score+"分";
this.showlog();
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
......
......@@ -8,48 +8,27 @@ import { NetManager } from "../../tw/manager/NetManager";
import Panel from "./Panel";
import Loading from "./Loading";
import { showToast } from "../ctrls/toastCtrl";
import Utils, { CouponJoinScene } from "../../../src/Utils";
export default class PrizePanel extends Panel {
_level;
updateOption(option: any) {
const { categoryType, img, num, propType, realValue } = option;// 2次数 3道具 4元宝 5实物 6优惠券 7虚拟商品
this['propnums'].text = 'x1';
this['propnums2'].text = 'x1';
if (num) {
this['propnums'].text = 'x' + num;
this['propnums2'].text = 'x' + num;
}
switch (categoryType) {
case 2:
this['blood'].visible = true;
this['numsgroup'].visible = true;
break;
case 3:
this['numsgroup'].visible = true;
this['img2'].visible = true;
this.data.url2 = `common_prop${propType}_png`;
break;
case 4:
this['numsgroup'].visible = false;
this['propnums2'].visible = true;
this['money'].visible = true;
this['propnums2'].text = realValue;
break;
default:
this['img'].visible = true;
this.data.url = img;
break;
}
}
//场景展示,1展示宝箱,2展示去下一关
changeSceneShow(page){
let box_v = page==1;
this["nextgro"].visible = !box_v;
this["boxgro"].visible = box_v;
}
start(data) {
super.start();
this._level = parseInt(data.level + '');
this['lvTxt'].text = `关卡${this._level}`
this.changeSceneShow(1);
const {score} = data;
this["scoretxt"].text = score+"分";
this.updateOption(data.option);
//下一关
this['goBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
this.hidePanel();
if (this._level + 1 <= window['last_level'])
......@@ -69,34 +48,14 @@ export default class PrizePanel extends Panel {
//曝光
NetManager.ins.showLog(getlogItem(5))
//新增看视频双倍
//打开宝箱
this["doubleBtn"].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(6))
NetManager.ins.getTuiaAd(
() => {
//居中
this['goBtn'].horizontalCenter = 0;
//隐藏
this['doubleBtn'].visible = false;
Loading.instace.show()
NetManager.ins.getIncentiveAward(
(s) => {
Loading.instace.hide()
if (s) {
showToast("翻倍成功");
NetManager.ins.hc_home(() => {
}, window['collectRuleId']);
} else {
showToast("加倍失败");
}
},
25
)
},
() => { showToast("广告未成功观看,无法加倍领取"); },
window["slotIdsTuia"][5]
)
}, this)
Utils.couponJoin(CouponJoinScene.Checkpoint,()=>{
},()=>{
this.changeSceneShow(2);
})
})
}
async setStar(nums: number) {
......
{"file":"pingfangxxl.png","frames":{
"0":{"x":47,"y":0,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"1":{"x":94,"y":139,"w":39,"h":67,"offX":0,"offY":0,"sourceW":39,"sourceH":67},
"2":{"x":94,"y":0,"w":45,"h":68,"offX":0,"offY":0,"sourceW":45,"sourceH":68},
"3":{"x":0,"y":71,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"4":{"x":141,"y":0,"w":45,"h":67,"offX":0,"offY":0,"sourceW":45,"sourceH":67},
"5":{"x":47,"y":142,"w":45,"h":68,"offX":0,"offY":0,"sourceW":45,"sourceH":68},
"6":{"x":0,"y":0,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"7":{"x":94,"y":70,"w":45,"h":67,"offX":0,"offY":0,"sourceW":45,"sourceH":67},
"8":{"x":0,"y":142,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"9":{"x":47,"y":71,"w":45,"h":69,"offX":0,"offY":0,"sourceW":45,"sourceH":69},
"分":{"x":141,"y":69,"w":45,"h":54,"offX":0,"offY":15,"sourceW":45,"sourceH":69}}}
\ No newline at end of file
......@@ -85,7 +85,7 @@
"name": "friend"
},
{
"keys": "bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_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,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_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,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png,brownBallFace_png,eyeDownLeft_png,eyeSingle_png,greyBallFace_png,eyeDownRight_png,hairballPiece9_png,hairballPiece8_png,hairballPiece7_png,hairballPiece6_png,hairballPiece5_png,hairballPiece4_png,hairballPiece3_png,hairballPiece2_png,hairballPiece11_png,hairballPiece10_png,hairballPiece1_png,hairballDisBg_png,curScoreNum9_png,curScoreNum8_png,curScoreNum7_png,curScoreNum6_png,curScoreNum5_png,curScoreNum4_png,curScoreNum3_png,curScoreNum2_png,curScoreNum1_png,curScoreNum0_png,festivalTargetBg_png,lineLight9_png,lineLight8_png,lineLight7_png,lineLight6_png,lineLight5_png,lineLight4_png,lineLight3_png,lineLight2_png,lineLight13_png,lineLight12_png,lineLight11_png,lineLight10_png,lineLight1_png,fesRedUp_png,fesRedSmallLight_png,fesRedDown_png,fesRedCap_png,fesRedBombSta1_png,fesRedBigLight_png,fesEleSmallDis9_png,fesEleSmallDis8_png,fesEleSmallDis7_png,fesEleSmallDis6_png,fesEleSmallDis5_png,fesEleSmallDis4_png,fesEleSmallDis3_png,fesEleSmallDis2_png,fesEleSmallDis10_png,fesEleSmallDis1_png,ele14_png,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,blueDoorBg_png,redDoorBg_png,yellowDoorBg_png,doorOpen_png,doorClosed_png,chapterNum8_png,chapterNum6_png,chapterNum4_png,chapterNum2_png,chapterNum1_png,chapterNum9_png,chapterNum0_png,chapterNum3_png,chapterNum5_png,chapterNum7_png",
"keys": "bonusFra1_png,bonusFra10_png,bonusFra11_png,bonusFra12_png,bonusFra13_png,bonusFra14_png,bonusFra15_png,bonusFra16_png,bonusFra17_png,bonusFra18_png,bonusFra19_png,bonusFra2_png,bonusFra20_png,bonusFra21_png,bonusFra22_png,bonusFra23_png,bonusFra24_png,bonusFra25_png,bonusFra26_png,bonusFra27_png,bonusFra3_png,bonusFra4_png,bonusFra5_png,bonusFra6_png,bonusFra7_png,bonusFra8_png,bonusFra9_png,bonusShoot_png,bonusTime_png,boom1_png,boom10_png,boom11_png,boom12_png,boom13_png,boom14_png,boom15_png,boom16_png,boom17_png,boom18_png,boom2_png,boom3_png,boom4_png,boom5_png,boom6_png,boom7_png,boom8_png,boom9_png,boomBtn_png,chooseRect_png,dangqianfenshu_png,eggPiece1_png,eggPiece2_png,eggPiece3_png,eggPiece4_png,eggPiece5_png,eggStatus0_png,eggStatus1_png,eggStatus2_png,ele0_png,ele0Exp_png,ele0Line_png,ele1_png,ele1Exp_png,ele1Line_png,ele2_png,ele2Exp_png,ele2Line_png,ele3_png,ele3Exp_png,ele3Line_png,ele4_png,ele4Exp_png,ele4Line_png,ele5_png,ele6_png,ele7_png,ele8_png,ele9_png,eleDis1_png,eleDis10_png,eleDis11_png,eleDis12_png,eleDis13_png,eleDis2_png,eleDis3_png,eleDis4_png,eleDis5_png,eleDis6_png,eleDis7_png,eleDis8_png,eleDis9_png,exLighting1_png,exLighting11_png,exLighting14_png,exLighting16_png,exLighting18_png,exLighting19_png,exLighting21_png,exLighting23_png,exLighting25_png,exLighting27_png,exLighting29_png,exLighting3_png,exLighting32_png,exLighting34_png,exLighting5_png,exLighting7_png,exLighting9_png,greenCircleDown_png,greenCircleUp_png,guidePropBoom_png,guidePropCow_png,guidePropHammer_png,guidePropHand_png,guidePropMsgPanel_png,guidePropShoe_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,mainMusicBtnOff_png,mainMusicBtnOn_png,mainQuestionBtn_png,mainQuitBtn_png,mainSettingBg_png,mainSoundBtnOff_png,mainSoundBtnOn_png,main_mapbottom_png,playSceneBg_jpg,progressDown_png,propNum0_png,propNum1_png,propNum2_png,propNum3_png,propNum4_png,propNum5_png,propNum6_png,propNum7_png,propNum8_png,propNum9_png,propNumBg_png,rectLat_png,rightArrow_png,rightMark_png,rock2_png,rock3_png,rock4_png,rock5_png,rock6_png,scoreNumber0_png,scoreNumber1_png,scoreNumber2_png,scoreNumber3_png,scoreNumber4_png,scoreNumber5_png,scoreNumber6_png,scoreNumber7_png,scoreNumber8_png,scoreNumber9_png,setting_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,stepNumber0_png,stepNumber1_png,stepNumber2_png,stepNumber3_png,stepNumber4_png,stepNumber5_png,stepNumber6_png,stepNumber7_png,stepNumber8_png,stepNumber9_png,stepsBoard_png,targetBoard_png,targetNumber0_png,targetNumber1_png,targetNumber2_png,targetNumber3_png,targetNumber4_png,targetNumber5_png,targetNumber6_png,targetNumber7_png,targetNumber8_png,targetNumber9_png,unlightedStar_png,yellowCircleDown_png,yellowCircleUp_png,yezi1_png,bubbleStar19_png,bubleEle0_png,bubleEle1_png,bubleEle2_png,bubleEle3_png,bubleEle4_png,bubbleStar1_png,bubbleStar2_png,bubbleStar3_png,bubbleStar4_png,bubbleStar5_png,bubbleStar6_png,bubbleStar7_png,bubbleStar8_png,bubbleStar9_png,bubbleStar10_png,bubbleStar11_png,bubbleStar12_png,bubbleStar13_png,bubbleStar14_png,bubbleStar15_png,bubbleStar16_png,bubbleStar17_png,bubbleStar18_png,ele11_png,ele10_png,brownBallFace_png,eyeDownLeft_png,eyeSingle_png,greyBallFace_png,eyeDownRight_png,hairballPiece9_png,hairballPiece8_png,hairballPiece7_png,hairballPiece6_png,hairballPiece5_png,hairballPiece4_png,hairballPiece3_png,hairballPiece2_png,hairballPiece11_png,hairballPiece10_png,hairballPiece1_png,hairballDisBg_png,curScoreNum9_png,curScoreNum8_png,curScoreNum7_png,curScoreNum6_png,curScoreNum5_png,curScoreNum4_png,curScoreNum3_png,curScoreNum2_png,curScoreNum1_png,curScoreNum0_png,festivalTargetBg_png,lineLight9_png,lineLight8_png,lineLight7_png,lineLight6_png,lineLight5_png,lineLight4_png,lineLight3_png,lineLight2_png,lineLight13_png,lineLight12_png,lineLight11_png,lineLight10_png,lineLight1_png,fesRedUp_png,fesRedSmallLight_png,fesRedDown_png,fesRedCap_png,fesRedBombSta1_png,fesRedBigLight_png,fesEleSmallDis9_png,fesEleSmallDis8_png,fesEleSmallDis7_png,fesEleSmallDis6_png,fesEleSmallDis5_png,fesEleSmallDis4_png,fesEleSmallDis3_png,fesEleSmallDis2_png,fesEleSmallDis10_png,fesEleSmallDis1_png,ele14_png,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,blueDoorBg_png,redDoorBg_png,yellowDoorBg_png,doorOpen_png,doorClosed_png,chapterNum8_png,chapterNum6_png,chapterNum4_png,chapterNum2_png,chapterNum1_png,chapterNum9_png,chapterNum0_png,chapterNum3_png,chapterNum5_png,chapterNum7_png,ele15_png",
"name": "main2"
},
{
......@@ -111,6 +111,10 @@
{
"keys": "购买锤子_png,购买炸弹_png,购买步数增加_png,yuanbaoBuyBtn_png,kanshipinmianfeihuoqu_png",
"name": "videobuy"
},
{
"name": "preload",
"keys": "albhtxxl_fnt,albhtxxl_png,starbox1_png,starbox2_png,starbox3_png,exchangebtn2_png,rankbtn_png,starboxrect_png,stopsoundbtn_png,topban_png,turnpbtn_png,lightstar3_png,opensoundbtn_png,turnpbtnicon_png,ballonimg_png,starbox1light_png,starbox2light_png,starbox3light_png,starbox1close_png,starbox1open_png,starbox2close_png,starbox2open_png,starbox3close_png,starbox3open_png,pingfangxxl_png,pingfangxxl_fnt,sucprizepanelbg_png,sucprizenextbtn_png,sucprizespimg_png,sucstar1_png,sucstar2_png,sucstar3_png,sucopenboxbtn_png,sucprizebox_png,sucprizeboxinfo_png,sucprizeboxshadow_png,sucprizeboxtxt_png,nextlevelprizetxt_png,sucnoprizetit_png,sucnoprizecont_png,failtit_png,failcontxt_png,failvideostep_png,failpanelbg_png,failrestartbtn_png,failrestartbtn1_png,failstepshadow_png"
}
],
"resources": [
......@@ -2930,6 +2934,246 @@
"url": "assets/prize/prizePanelbg.png",
"type": "image",
"name": "prizePanelbg_png"
},
{
"name": "albhtxxl_fnt",
"type": "font",
"url": "assets/common/albhtxxl.fnt"
},
{
"name": "albhtxxl_png",
"type": "image",
"url": "assets/common/albhtxxl.png"
},
{
"name": "ele15_png",
"type": "image",
"url": "assets/mainScene/ele15.png"
},
{
"name": "starbox1_png",
"type": "image",
"url": "assets/mainScene/starbox1.png"
},
{
"name": "starbox2_png",
"type": "image",
"url": "assets/mainScene/starbox2.png"
},
{
"name": "starbox3_png",
"type": "image",
"url": "assets/mainScene/starbox3.png"
},
{
"name": "exchangebtn2_png",
"type": "image",
"url": "assets/map/exchangebtn.png"
},
{
"name": "rankbtn_png",
"type": "image",
"url": "assets/map/rankbtn.png"
},
{
"name": "starboxrect_png",
"type": "image",
"url": "assets/map/starboxrect.png"
},
{
"name": "stopsoundbtn_png",
"type": "image",
"url": "assets/map/stopsoundbtn.png"
},
{
"name": "topban_png",
"type": "image",
"url": "assets/map/topban.png"
},
{
"name": "turnpbtn_png",
"type": "image",
"url": "assets/map/turnpbtn.png"
},
{
"name": "lightstar3_png",
"type": "image",
"url": "assets/map/lightstar3.png"
},
{
"name": "opensoundbtn_png",
"type": "image",
"url": "assets/map/opensoundbtn.png"
},
{
"name": "turnpbtnicon_png",
"type": "image",
"url": "assets/map/turnpbtnicon.png"
},
{
"name": "ballonimg_png",
"type": "image",
"url": "assets/mainScene/ballonimg.png"
},
{
"name": "starbox1light_png",
"type": "image",
"url": "assets/mainScene/starbox1light.png"
},
{
"name": "starbox2light_png",
"type": "image",
"url": "assets/mainScene/starbox2light.png"
},
{
"name": "starbox3light_png",
"type": "image",
"url": "assets/mainScene/starbox3light.png"
},
{
"name": "starbox1close_png",
"type": "image",
"url": "assets/mainScene/starbox1close.png"
},
{
"name": "starbox1open_png",
"type": "image",
"url": "assets/mainScene/starbox1open.png"
},
{
"name": "starbox2close_png",
"type": "image",
"url": "assets/mainScene/starbox2close.png"
},
{
"name": "starbox2open_png",
"type": "image",
"url": "assets/mainScene/starbox2open.png"
},
{
"name": "starbox3close_png",
"type": "image",
"url": "assets/mainScene/starbox3close.png"
},
{
"name": "starbox3open_png",
"type": "image",
"url": "assets/mainScene/starbox3open.png"
},
{
"name": "pingfangxxl_png",
"type": "image",
"url": "assets/common/pingfangxxl.png"
},
{
"name": "pingfangxxl_fnt",
"type": "font",
"url": "assets/common/pingfangxxl.fnt"
},
{
"name": "sucprizepanelbg_png",
"type": "image",
"url": "assets/meituansuc/sucprizepanelbg.png"
},
{
"name": "sucprizenextbtn_png",
"type": "image",
"url": "assets/meituansuc/sucprizenextbtn.png"
},
{
"name": "sucprizespimg_png",
"type": "image",
"url": "assets/meituansuc/sucprizespimg.png"
},
{
"name": "sucstar1_png",
"type": "image",
"url": "assets/meituansuc/sucstar1.png"
},
{
"name": "sucstar2_png",
"type": "image",
"url": "assets/meituansuc/sucstar2.png"
},
{
"name": "sucstar3_png",
"type": "image",
"url": "assets/meituansuc/sucstar3.png"
},
{
"name": "sucopenboxbtn_png",
"type": "image",
"url": "assets/meituansuc/sucopenboxbtn.png"
},
{
"name": "sucprizebox_png",
"type": "image",
"url": "assets/meituansuc/sucprizebox.png"
},
{
"name": "sucprizeboxinfo_png",
"type": "image",
"url": "assets/meituansuc/sucprizeboxinfo.png"
},
{
"name": "sucprizeboxshadow_png",
"type": "image",
"url": "assets/meituansuc/sucprizeboxshadow.png"
},
{
"name": "sucprizeboxtxt_png",
"type": "image",
"url": "assets/meituansuc/sucprizeboxtxt.png"
},
{
"name": "nextlevelprizetxt_png",
"type": "image",
"url": "assets/meituansuc/nextlevelprizetxt.png"
},
{
"name": "sucnoprizetit_png",
"type": "image",
"url": "assets/meituansuc/sucnoprizetit.png"
},
{
"name": "sucnoprizecont_png",
"type": "image",
"url": "assets/meituansuc/sucnoprizecont.png"
},
{
"name": "failtit_png",
"type": "image",
"url": "assets/meituanfail/failtit.png"
},
{
"name": "failcontxt_png",
"type": "image",
"url": "assets/meituanfail/failcontxt.png"
},
{
"name": "failvideostep_png",
"type": "image",
"url": "assets/meituanfail/failvideostep.png"
},
{
"name": "failpanelbg_png",
"type": "image",
"url": "assets/meituanfail/failpanelbg.png"
},
{
"name": "failrestartbtn_png",
"type": "image",
"url": "assets/meituanfail/failrestartbtn.png"
},
{
"name": "failrestartbtn1_png",
"type": "image",
"url": "assets/meituanfail/failrestartbtn1.png"
},
{
"name": "failstepshadow_png",
"type": "image",
"url": "assets/meituanfail/failstepshadow.png"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FailSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Component y="772.52" skinName="ADSmallSkin" horizontalCenter="0" visible="false"/>
<e:Image source="闯关失败_png" y="218" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="629.54" y="243">
<e:skinName>
<e:Image y="218" source="failpanelbg_png" horizontalCenter="-5.5"/>
<e:Group id="havevideo" width="750" height="1206">
<e:Button id="videoBtn" label="" y="812" horizontalCenter="0" x="137" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="comCloseBtnTuia_png" source.down="comCloseBtnTuia_png" source.disabled="comCloseBtnTuia_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
<e:Image width="100%" height="100%" source="failvideostep_png" source.down="failvideostep_png" source.disabled="failvideostep_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="againBtn" label="" y="736" horizontalCenter="0">
<e:skinName>
</e:skinName>
</e:Button>
<e:Image id="againBtn1" source="failrestartbtn_png" y="967" scaleX="1" scaleY="1" horizontalCenter="0"/>
<e:Image source="failtit_png" y="456" horizontalCenter="0.5"/>
<e:Image source="failcontxt_png" y="540" horizontalCenter="0"/>
<e:Group id="steptool" width="110" height="117" y="633" x="320">
<e:Image source="failstepshadow_png" y="81" horizontalCenter="0.5"/>
<e:Image source="stepBtn_png" scaleX="1" scaleY="1"/>
<e:Image source="propNumBg_png" x="70" y="70" scaleX="1" scaleY="1"/>
<e:Group width="44" height="45" x="70" y="70">
</e:Group>
</e:Group>
</e:Group>
<e:Group id="novideo" width="750" height="1206">
<e:Button id="againBtn" label="" y="812" horizontalCenter="0.5" x="137" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="chongxinchuangguan_png" source.down="chongxinchuangguan_png" source.disabled="chongxinchuangguan_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
<e:Image width="100%" height="100%" source="failrestartbtn1_png" source.down="failrestartbtn1_png" source.disabled="failrestartbtn1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="videoBtn" label="" y="617.5" horizontalCenter="0" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="kanshipinjiabushu_png" source.down="kanshipinjiabushu_png" source.disabled="kanshipinjiabushu_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label text="闯关成功即可获得元宝\n游戏道具等更多好礼哦" y="518.24" anchorOffsetX="0" width="578.54" anchorOffsetY="0" height="81.52" horizontalCenter="0.5" textAlign="center" verticalAlign="middle" size="24" lineSpacing="8" fontFamily="FZY3JW" textColor="0xf54500" bold="true"/>
</e:skinName>
</e:Button>
<e:Image source="failtit_png" y="504" horizontalCenter="0.5"/>
<e:Image source="failcontxt_png" y="588" horizontalCenter="0"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -9,7 +9,7 @@
<e:Group id="topcont" width="750" height="150" x="0" top="0">
<e:Image source="topban_png" horizontalCenter="0" y="0"/>
<e:BitmapLabel id="bloodTxt" width="164" height="48" x="120" y="32" text="次 5" font="albhtxxl_fnt"/>
<e:BitmapLabel id="bloodTxt" width="164" height="48" x="120" y="32" text="次 5" font="albhtxxl_fnt"/>
<e:BitmapLabel id="goldTxt" width="81" height="48" x="376" y="32" text="231" font="albhtxxl_fnt"/>
<e:Image id="exchangebtn" source="exchangebtn2_png" x="462" y="17"/>
<e:Group id="soundbtn" width="80" height="80" y="7" x="632">
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="NoPrizeSkin" width="750" height="1000" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Component y="917.46" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Skin class="NoPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image y="40.55" horizontalCenter="1" source="noPrizePanelBg_png"/>
<e:Button id="closeBtn" label="" x="624" y="210">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="comCloseBtnTuia_png" source.down="comCloseBtnTuia_png" source.disabled="comCloseBtnTuia_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="goBtn" label="" y="739" horizontalCenter="0.5">
<w:Config id="1690063a75e"/>
<e:Image scale9Grid="87,543,522,23" source="sucprizepanelbg_png" horizontalCenter="-19.5" y="266"/>
<e:Image id="pic1" y="284" anchorOffsetX="56.82" anchorOffsetY="50.61" source="sucstar1_png" horizontalCenter="-125"/>
<e:Image id="pic3" y="294" anchorOffsetX="52" anchorOffsetY="46" source="sucstar2_png" horizontalCenter="125" x="10"/>
<e:Image id="pic2" y="254" anchorOffsetX="54" anchorOffsetY="49.73" source="sucstar3_png" x="375"/>
<e:BitmapLabel id="scoretxt" height="80" font="pingfangxxl_fnt" text="19999分" y="483" horizontalCenter="0"/>
<e:Image source="sucnoprizetit_png" y="562" horizontalCenter="0"/>
<e:Image source="sucnoprizecont_png" y="644" horizontalCenter="0"/>
<e:Button id="goBtn" label="" y="847" x="137" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 4_png" source.down="按钮 副本 4_png" source.disabled="按钮 副本 4_png"/>
<e:Image width="100%" height="100%" source="sucprizenextbtn_png" source.down="sucprizenextbtn_png" source.disabled="sucprizenextbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="picb" x="286" y="391.28" source="点亮 副本 2gray_png" scaleX="-1"/>
<e:Image id="pica" x="465.48" y="384.28" source="点亮 副本 2gray_png"/>
<e:Image id="picc" y="367.28" source="点亮gray_png" x="310"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="214.18" y="443.39" anchorOffsetX="81.82" anchorOffsetY="60.61" scaleX="-1"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="528.24" y="446.89" scaleX="1" anchorOffsetX="71.76" anchorOffsetY="66.61"/>
<e:Image id="pic2" source="点亮_png" y="440.01" anchorOffsetX="73.94" anchorOffsetY="74.73" x="375.94"/>
<e:Label id="lvTxt" text="关卡1" y="233" horizontalCenter="0.5" fontFamily="FZY3JW" textColor="0xffffff" size="24" bold="true"/>
<w:Config id="1690063a75e"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="PrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="169005181d0"/>
<e:Component y="889.74" skinName="ADSmallSkin" x="84" visible="false"/>
<e:Image source="prizePanelbg_png" y="38.78" scale9Grid="87,543,522,23" height="839" x="59"/>
<e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="504.76" visible="false"/>
<e:Image id="img2" horizontalCenter="0.5" y="491.76" source="{data.url2}" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Image id="money" y="516.2" scaleX="0.6" scaleY="0.6" source="common_money_png" x="150" visible="false"/>
<e:Image id="blood" y="490.8" horizontalCenter="1.5" source="common_blood_png" scaleX="0.7" scaleY="0.7" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="506.4" visible="false">
<e:Image id="numsbg" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="propnums" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Label id="propnums2" text="30" textColor="0x885037" bold="true" y="651.08" width="75" textAlign="right" x="287.16" visible="false"/>
<e:Button id="closeBtn" label="" x="628" y="191">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="comCloseBtnTuia_png" source.down="comCloseBtnTuia_png" source.disabled="comCloseBtnTuia_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
<e:Image scale9Grid="87,543,522,23" source="sucprizepanelbg_png" horizontalCenter="-19.5" y="266"/>
</e:Button>
<e:Button id="goBtn" label="" y="731" horizontalCenter="-144">
<e:skinName>
<e:Image id="picb" x="286" y="339.28" source="点亮 副本 2gray_png" scaleX="-1" visible="false"/>
<e:Image id="pica" x="465.48" y="332.28" source="点亮 副本 2gray_png" visible="false"/>
<e:Image id="picc" y="315.28" source="点亮gray_png" x="310" visible="false"/>
<e:Image id="pic1" y="284" anchorOffsetX="56.82" anchorOffsetY="50.61" source="sucstar1_png" horizontalCenter="-125"/>
<e:Image id="pic3" y="284" anchorOffsetX="52" anchorOffsetY="46" source="sucstar2_png" horizontalCenter="125"/>
<e:Image id="pic2" y="254" anchorOffsetX="54" anchorOffsetY="49.73" source="sucstar3_png" x="375"/>
<e:BitmapLabel id="scoretxt" height="80" font="pingfangxxl_fnt" text="19999分" y="483" horizontalCenter="0"/>
<e:Image source="sucprizeboxshadow_png" y="770" horizontalCenter="0"/>
<e:Group id="nextgro" width="750" height="818" y="184">
<e:Button id="goBtn" label="" y="663" x="137" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="按钮 副本 4_png" source.down="按钮 副本 4_png" source.disabled="按钮 副本 4_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
<e:Image width="100%" height="100%" source="sucprizenextbtn_png" source.down="sucprizenextbtn_png" source.disabled="sucprizenextbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="doubleBtn" label="" y="729" horizontalCenter="139">
<e:skinName>
</e:skinName>
</e:Button>
<e:Image source="nextlevelprizetxt_png" y="380" horizontalCenter="0"/>
<e:Image source="sucprizespimg_png" y="442" horizontalCenter="0.5"/>
</e:Group>
<e:Group id="boxgro" width="750" height="818" y="184">
<e:Button id="doubleBtn" label="" y="663" x="137" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="kanguanggaolingqu2bei_png" source.down="kanguanggaolingqu2bei_png" source.disabled="kanguanggaolingqu2bei_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
<e:Image width="100%" height="100%" source="sucopenboxbtn_png" source.down="sucopenboxbtn_png" source.disabled="sucopenboxbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Image id="picb" x="286" y="339.28" source="点亮 副本 2gray_png" scaleX="-1"/>
<e:Image id="pica" x="465.48" y="332.28" source="点亮 副本 2gray_png"/>
<e:Image id="picc" y="315.28" source="点亮gray_png" x="310"/>
<e:Image id="pic1" source="点亮 副本 2_png" x="214.18" y="391.39" anchorOffsetX="81.82" anchorOffsetY="60.61" scaleX="-1"/>
<e:Image id="pic3" source="点亮 副本 2_png" x="528.24" y="394.89" scaleX="1" anchorOffsetX="71.76" anchorOffsetY="66.61"/>
<e:Image id="pic2" source="点亮_png" y="388.01" anchorOffsetX="73.94" anchorOffsetY="74.73" x="375.94"/>
<e:Label id="lvTxt" text="关卡1" y="222" horizontalCenter="0.5" fontFamily="FZY3JW" textColor="0xffffff" size="24" bold="true"/>
</e:skinName>
</e:Button>
<e:Image source="sucprizebox_png" horizontalCenter="0" verticalCenter="124.5"/>
<e:Image source="sucprizeboxinfo_png" x="390" y="452"/>
<e:Image source="sucprizeboxtxt_png" y="380" horizontalCenter="0"/>
</e:Group>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="StarSkin" width="67" height="25" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="无星星_png" />
<e:Image id="star1" source="有星星_png" visible="false"/>
<e:Image id="star2" source="有星星2_png" visible="false"/>
<e:Image id="star3" source="有星星3_png" visible="false"/>
<e:Skin class="StarSkin" width="100" height="100" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Group width="67" height="25">
<e:Image source="无星星_png" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Image id="star1" source="有星星_png" x="0" y="0" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="star2" source="有星星2_png" x="0" y="0" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="star3" source="有星星3_png" x="0" y="0" scaleX="1" scaleY="1"/>
<e:Image id="starlbox1" source="starbox1light_png" x="-16" y="-60" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="starlbox2" source="starbox2light_png" x="-16" y="-64" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="starlbox3" source="starbox3light_png" x="-16" y="-70.5" scaleX="1" scaleY="1" visible="false"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -219,6 +219,7 @@ export default class MainScene extends Scene {
*/
private _score: number;
get score(): number {
return this._score
}
set score(value: number) {
......@@ -249,7 +250,7 @@ export default class MainScene extends Scene {
failStep: false
}
//气球宝箱
balloonsp: eui.Image;
balloonsp: egret.Bitmap;
//盲盒
alertBlindBox = false;
......@@ -727,16 +728,7 @@ export default class MainScene extends Scene {
break;
//盲盒
case 21:
let blindbox: Element = Pool.takeOut(RecoverName.ELEMENT);
if (!blindbox) {
blindbox = new Element(ElementType.BLIND_BOX)
} else {
blindbox.reset(ElementType.BLIND_BOX)
}
blindbox.x = p[0];
blindbox.y = p[1];
this.elementContainer.addChild(blindbox);
this.lattices[i].element = blindbox;
ele = Tool.getElement(ElementType.BLIND_BOX);
break;
default:
//其他标识按空元素记
......@@ -2005,6 +1997,7 @@ export default class MainScene extends Scene {
// playSound(SoundType.fail);
var panelsDatas = this.returnPanels("failed", {
level: this.chapter,
score:this.score,
showVideo: !this.recordOnce.failStep,//是否显示观看视频加步数
complete: () => {//观看完成回调,其实只要继续执行下面的逻辑就行
let count = 0;
......@@ -2056,7 +2049,7 @@ export default class MainScene extends Scene {
showToast("元素已无法消除")
setTimeout(() => {
// playSound(SoundType.fail);
var panelsDatas = this.returnPanels("failed", { level: this.chapter })
var panelsDatas = this.returnPanels("failed", { level: this.chapter,score:this.score, })
this.solveDiaPush("fail",panelsDatas);
// PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { });
// PanelCtrl.instance.show("failed", { level: this.chapter });
......@@ -2748,12 +2741,13 @@ export default class MainScene extends Scene {
const submitData = DataManager.ins.getData('hc_submit').data;
var panelsDatas;
if (submitData.option) {
panelsDatas = this.returnPanels(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option });
panelsDatas = this.returnPanels(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option,score:this.score, });
// PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, { level: this.chapter, option: submitData.option });
} else {
panelsDatas = this.returnPanels(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter })
panelsDatas = this.returnPanels(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter,score:this.score, })
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter });
}
panelsDatas = this.returnPanels(ModuleTypes.NO_PRIZE_PANEL, { level: this.chapter,score:this.score, })
//弹出所有的
this.solveDiaPush("success",panelsDatas);
// PanelCtrl.instance.showPanels(panelsDatas[0], panelsDatas[1], () => { })
......@@ -3044,14 +3038,15 @@ export default class MainScene extends Scene {
//初始化天降宝箱
initBallonSp(){
//气球宝箱
this.balloonsp = new eui.Image("//yun.duiba.com.cn/aurora/assets/02d6dda42162d49097d4d271b5a367a506377487.jpeg");
let balloonwid = 100;
let balloonhei = 100;
this.balloonsp.width = balloonwid;
this.balloonsp.height = balloonhei;
this.balloonsp = new egret.Bitmap();
this.balloonsp.texture = RES.getRes("ballonimg_png");
let balloonwid = this.balloonsp.width;
let balloonhei = this.balloonsp.height;
// this.balloonsp.width = balloonwid;
// this.balloonsp.height = balloonhei;
this.addChild(this.balloonsp);
let topboty = 224;
let gametopy = 224;
let topboty = 180;
let gametopy = topboty;
let lattices = this.chapterData.map.lattices;
for (var m = 0; m < lattices.length; m++) {
if (lattices[m]) {
......@@ -3059,8 +3054,8 @@ export default class MainScene extends Scene {
break;
}
}
if (gametopy < 224) {
gametopy = 224;
if (gametopy < topboty) {
gametopy = topboty;
}
this.balloonsp.y = (gametopy - topboty) / 2 + topboty - balloonhei / 2;
let movetime = 5000;
......
......@@ -427,6 +427,8 @@ export default class MapScene extends Scene {
const star = MapScene.starHash[i + 1];
if (level) {
star.setStar(level.stars);
star.setBox(level.stars);
this.enableIcon(level.levelNum);
} else {
this.disableIcon(level.levelNum);
......@@ -435,6 +437,8 @@ export default class MapScene extends Scene {
if (homeData.levels.length == 0) {
const star = MapScene.starHash[1];
star.setStar(0);
star.setBox(0);
this.enableIcon(1);
} else if (homeData.levels.length == window['last_level']) {
......
......@@ -7,6 +7,7 @@ export default class MapStarComp extends ComponentBase {
this.y=-24;
this.setStar(0);
this.setBox(1);
}
setStar(num:number)
......@@ -26,5 +27,20 @@ export default class MapStarComp extends ComponentBase {
this['star3'].visible=true;
}
}
setBox(idx:number){
this['starlbox1'].visible = false;
this['starlbox2'].visible = false;
this['starlbox3'].visible = false;
if(idx ==0) {
}else if(idx ==1) {
this['starlbox1'].visible=true;
}
else if(idx ==2) {
this['starlbox2'].visible=true;
}else if(idx ==3) {
this['starlbox3'].visible=true;
}
}
get skinKey(): string { return 'Star' }
}
\ No newline at end of file
......@@ -7,8 +7,17 @@ import { getlogItem } from "../Main";
export default class FailedPanel extends Panel {
_level;
//场景展示
changeSceneShow(havevideo){
this["havevideo"].visible = havevideo;
this["novideo"].visible = !havevideo;
}
start(data) {
super.start();
console.error("过关失败===》",data);
const {showVideo} = data;
this.changeSceneShow(showVideo);
if (data)
this._level = parseInt(data.level + '');
NetManager.ins.hc_home(() => { }, window['collectRuleId']);
......@@ -19,7 +28,6 @@ export default class FailedPanel extends Panel {
changeMapScene({ level: this._level });
else
changeMapScene();
}, this);
addRankFriendList(84, 772.52, this);
......
......@@ -325,8 +325,8 @@ export const Chapters10: ChapterData[] = [
{
baseElementTypes: [2, 3, 1, 0, 4],
bubbleProbability: 0,
stepCount: 25,
passTarget: { type: 1, elements: [{ type: 0, count: 30 }, { type: 1, count: 36 }] },
stepCount: 1,
passTarget: { type: 1, elements: [{ type: 0, count: 1 }] },
starScores: [5000, 11000, 19000], map: {
lattices: [1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0], connectedLats: [[31, 67], [45, 63], [46, 64], [47, 65], [51, 69], [52, 70], [53, 71]], elements:
[
......
......@@ -142,6 +142,7 @@ export class Element extends eui.Component {
this.showImage = new eui.Image();
this.changeSource("ele" + this.type + "_png");
this.addChild(this.showImage);
//鸡蛋
if (type == ElementType.CHICKEN_EGG) {
this.chickenEgg = Pool.takeOut(RecoverName.CHICKEN_EGG)
......@@ -173,13 +174,14 @@ export class Element extends eui.Component {
// this.showImage.source = source;
var texture: egret.Texture;
texture = RES.getRes(source);
if(this.type==ElementType.BLIND_BOX){
console.error('盲盒的',source,texture);
}
this.showImage.texture = texture
// if (this.type != ElementType.BLIND_BOX) {
this.showImage.x = -texture.textureWidth / 2;
this.showImage.y = -texture.textureHeight / 2;
// }
//特殊逻辑,因为魔力鸟动效要旋转,所以隐藏原图showImage,还有鸡蛋,还有特殊节日元素大
if (source == "magicLion_png" ||
......
......@@ -185,24 +185,24 @@ export class ScoreProgress {
let data = this.starboxdata[idx];
let spx = this["sbox" + (idx + 1) + "x"];
// let texurl = data == 2 ? "//yun.duiba.com.cn/aurora/assets/8312db117356184c07b0d67153ec67ba3ed16f9f.png" : "//yun.duiba.com.cn/aurora/assets/f565872fe14ec885c7a9935bc0cfc40515b81898.png";
sp.texture = RES.getRes("starbox"+(idx+1)+"_png");
// await loadImageByUrl(texurl);
// sp.width = data == 2 ? this.box2wid : this.box1wid;
// sp.height = data == 2 ? this.box2hei : this.box1hei;
sp.anchorOffsetX = sp.width / 2;
sp.anchorOffsetY = sp.height / 2;
sp.x = spx + this.starwid / 2;// - sp.width / 2;
sp.y = this.sboxy;// - sp.height / 2;
let texsrc = "starbox"+(idx+1);
if(data==0){
setGray(sp);
texsrc += "close";
}else if(data==1){
texsrc += "";
}else{
sp.filters = [];
texsrc += "open";
}
sp.texture = RES.getRes(texsrc+"_png");
sp.anchorOffsetX = sp.width / 2;
sp.anchorOffsetY = sp.height / 2;
sp.x = spx + this.starwid / 2;
sp.y = this.sboxy;
// if(data==0){
// setGray(sp);
// }else{
// sp.filters = [];
// }
if (data == 1) {
if (!this["s" + (idx + 1) + "havetween"]) {
this["s" + (idx + 1) + "havetween"] = true;
......@@ -218,7 +218,6 @@ export class ScoreProgress {
}
} else {
egret.Tween.removeTweens(sp);
}
}
//星星宝箱点击
......
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