Commit d7231280 authored by zjz1994's avatar zjz1994

樱花动画暂存

parent 0cf0e2a4
...@@ -326,7 +326,12 @@ export default class MainBase extends eui.UILayer { ...@@ -326,7 +326,12 @@ export default class MainBase extends eui.UILayer {
RES.getResAsync("ele43fn_png"); RES.getResAsync("ele43fn_png");
RES.getResAsync("ele44fn_png"); RES.getResAsync("ele44fn_png");
RES.getResAsync("ele45fn_png"); RES.getResAsync("ele45fn_png");
RES.getResAsync("ele46_png"); RES.getResAsync("ele46_1_png");
RES.getResAsync("ele46_2_png");
RES.getResAsync("ele46_3_png");
RES.getResAsync("ele46_4_png");
RES.getResAsync("ele46_5_png");
RES.getResAsync("ele46_6_png");
RES.getResAsync("ele46_sz_png"); RES.getResAsync("ele46_sz_png");
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
"name": "h5" "name": "h5"
}, },
{ {
"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,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,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_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,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,fesRedBombSta2_png,ele14_png,redBombYStar_png,redBombBStar_png,redBombBSnow_png,线条尾部炸开_00000_png,线条尾部炸开_00001_png,线条尾部炸开_00002_png,线条尾部炸开_00003_png,线条尾部炸开_00004_png,线条尾部炸开_00005_png,线条尾部炸开_00006_png,线条尾部炸开_00007_png,线条尾部炸开_00008_png,ele15_png,ele16_png,ele17_png,ele18_png,ele19_png,ele20_png,empty_png,ele23_png,ele25_png,ele27_png,ele26_png,ele24_png,ele22_png,chocolateMark3_png,chocolateMark1_png,chocolateFour_png,chocolateMark0_png,chocolateMark2_png,redbombParticle_png,monster_shoot_png,ele33_1_png,ele33_0_png,ele34_png,honey_png,ele36_png,lef_png,propBg_png,check0_png,check1_png,check2_png,check3_png,check4_png,check7_png,check8_png,check9_png,check关_png,check第_png,check6_png,check5_png,ele38_png,ele39_png,gameGuide_png,ele41_png,ele42_png,ele43_png,ele44_png,ele45_png,ele42fn_png,ele43fn_png,ele44fn_png,ele45fn_png,ele46_png,ele46_sz_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,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,eleDis14_png,eleDis15_png,eleDis16_png,eleDis17_png,eleDis18_png,eleDis19_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,ele12_png,ele13_png,xingxingbi_png,tinyRedMid_png,tinyRedLeft_png,tinyRedRight_png,rectLatWhite_png,fesRedBombSta2_png,ele14_png,redBombYStar_png,redBombBStar_png,redBombBSnow_png,线条尾部炸开_00000_png,线条尾部炸开_00001_png,线条尾部炸开_00002_png,线条尾部炸开_00003_png,线条尾部炸开_00004_png,线条尾部炸开_00005_png,线条尾部炸开_00006_png,线条尾部炸开_00007_png,线条尾部炸开_00008_png,ele15_png,ele16_png,ele17_png,ele18_png,ele19_png,ele20_png,empty_png,ele23_png,ele25_png,ele27_png,ele26_png,ele24_png,ele22_png,chocolateMark3_png,chocolateMark1_png,chocolateFour_png,chocolateMark0_png,chocolateMark2_png,redbombParticle_png,monster_shoot_png,ele33_1_png,ele33_0_png,ele34_png,honey_png,ele36_png,lef_png,propBg_png,check0_png,check1_png,check2_png,check3_png,check4_png,check7_png,check8_png,check9_png,check关_png,check第_png,check6_png,check5_png,ele38_png,ele39_png,gameGuide_png,ele41_png,ele42_png,ele43_png,ele44_png,ele45_png,ele42fn_png,ele43fn_png,ele44fn_png,ele45fn_png,ele46_png,ele46_sz_png,ele46_1_png,ele46_2_png,ele46_3_png,ele46_4_png,ele46_5_png,ele46_6_png",
"name": "main2" "name": "main2"
}, },
{ {
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
"name": "helpGroup" "name": "helpGroup"
}, },
{ {
"keys": "virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg,adsmask_png,nsad2_png,nsad1_png,hbchuanguan2_png,redAlert_btn1_png,loadingbgfes_png,titimg1_png,titimg2_png,titimg3_png,titimg4_png,ele42fn_png,ele43fn_png,ele44fn_png,ele45fn_png,addhbimg_png,ele46_png,ele46_sz_png", "keys": "virprizebg_png,lightdi_png,wormhole_png,startscenebg_jpg,adsmask_png,nsad2_png,nsad1_png,hbchuanguan2_png,redAlert_btn1_png,loadingbgfes_png,titimg1_png,titimg2_png,titimg3_png,titimg4_png,ele42fn_png,ele43fn_png,ele44fn_png,ele45fn_png,addhbimg_png,ele46_png,ele46_sz_png,ele46_1_png,ele46_2_png,ele46_3_png,ele46_4_png,ele46_5_png,ele46_6_png",
"name": "preload" "name": "preload"
} }
], ],
...@@ -5511,6 +5511,36 @@ ...@@ -5511,6 +5511,36 @@
"url": "assets/mainScene/ele46_sz.png", "url": "assets/mainScene/ele46_sz.png",
"type": "image", "type": "image",
"name": "ele46_sz_png" "name": "ele46_sz_png"
},
{
"url": "assets/mainScene/ele46_1.png",
"type": "image",
"name": "ele46_1_png"
},
{
"url": "assets/mainScene/ele46_2.png",
"type": "image",
"name": "ele46_2_png"
},
{
"url": "assets/mainScene/ele46_3.png",
"type": "image",
"name": "ele46_3_png"
},
{
"url": "assets/mainScene/ele46_4.png",
"type": "image",
"name": "ele46_4_png"
},
{
"url": "assets/mainScene/ele46_5.png",
"type": "image",
"name": "ele46_5_png"
},
{
"url": "assets/mainScene/ele46_6.png",
"type": "image",
"name": "ele46_6_png"
} }
] ]
} }
\ No newline at end of file
...@@ -192,6 +192,9 @@ let regoudata:any = null; ...@@ -192,6 +192,9 @@ let regoudata:any = null;
let tiantianquandata:any = null; let tiantianquandata:any = null;
let xugaodata:any = null; let xugaodata:any = null;
//樱花
let cherryAniData:any = {};
//所有可能被添加节日红包的关卡及索引,默认索引值都是40;如果没有就不放 //所有可能被添加节日红包的关卡及索引,默认索引值都是40;如果没有就不放
const fesChapterData: number[] = []; const fesChapterData: number[] = [];
...@@ -449,6 +452,8 @@ export default class MainScene extends Scene { ...@@ -449,6 +452,8 @@ export default class MainScene extends Scene {
freeCherryData:Array<number> = []; freeCherryData:Array<number> = [];
//已消除樱花 //已消除樱花
amoveCherryData:Array<number> = []; amoveCherryData:Array<number> = [];
//一般樱花动画
normalCherryData:Array<number> = [];
//等待樱花 //等待樱花
waitCherry = false; waitCherry = false;
...@@ -471,6 +476,7 @@ export default class MainScene extends Scene { ...@@ -471,6 +476,7 @@ export default class MainScene extends Scene {
this.once(egret.Event.ADDED_TO_STAGE,this.initMainScene,this); this.once(egret.Event.ADDED_TO_STAGE,this.initMainScene,this);
this.initFoodSvgas(); this.initFoodSvgas();
this.initCherrySvgas();
} }
initMainScene(){ initMainScene(){
var stagew = this.stage.stageWidth; var stagew = this.stage.stageWidth;
...@@ -7453,6 +7459,21 @@ export default class MainScene extends Scene { ...@@ -7453,6 +7459,21 @@ export default class MainScene extends Scene {
} }
//新元素樱花 //新元素樱花
/**
* 加载樱花动画
*/
initCherrySvgas(call:any=null){
var cherryArr:Array<string> = ["cherry1_2","cherry2_3","cherry3_4","cherry4_5","cherry5_6"];
for(let i=0;i<cherryArr.length;i++){
let icherryname = cherryArr[i];
if(!cherryAniData[icherryname]){
if (!svgaParser) svgaParser = new window["SVGA"].Parser();
svgaParser.load(resPath + 'resource/assets/svgas/'+icherryname+'.svga', (videoItem) => {
cherryAniData[icherryname] = videoItem;
})
}
}
}
//判断当前位置是否樱花 //判断当前位置是否樱花
checkisCherry(idx:number){ checkisCherry(idx:number){
for(var i=0;i<this.cherryData.length;i++){ for(var i=0;i<this.cherryData.length;i++){
...@@ -7476,6 +7497,7 @@ export default class MainScene extends Scene { ...@@ -7476,6 +7497,7 @@ export default class MainScene extends Scene {
} }
var indexs = this.getNextIndexs(lat0); var indexs = this.getNextIndexs(lat0);
var cherryAnis:Array<any> = new Array();
for(let i=0;i<indexs.length;i++){ for(let i=0;i<indexs.length;i++){
let index = indexs[i]; let index = indexs[i];
let lat = this.lattices[index]; let lat = this.lattices[index];
...@@ -7483,30 +7505,94 @@ export default class MainScene extends Scene { ...@@ -7483,30 +7505,94 @@ export default class MainScene extends Scene {
if(lat&&lat.element){ if(lat&&lat.element){
let ele = lat.element; let ele = lat.element;
if(ele.type==ElementType.cherry&&ele.activeStatus==0){ if(ele.type==ElementType.cherry&&ele.activeStatus==0){
this.activeCherry(index); var cherrystats = this.activeCherry(index);
if(cherrystats){
cherryAnis.push({
idx:index,
stats:cherrystats
})
}
} }
} }
} }
//以上仅更新樱花数据
//更新樱花动画
this.checkPlayCherryAni(cherryAnis);
} }
//特效激活樱花 //特效激活樱花
solveCherryEle(cherryArr:Array<number>){ solveCherryEle(cherryArr:Array<number>){
var cherryAnis:Array<any> = new Array();
for(var i=0;i<cherryArr.length;i++){ for(var i=0;i<cherryArr.length;i++){
var icheryidx = cherryArr[i]; var icheryidx = cherryArr[i];
var lat = this.lattices[icheryidx]; var lat = this.lattices[icheryidx];
if(lat){ if(lat){
var ele = lat.element; var ele = lat.element;
if(ele&&ele.type==ElementType.cherry&&ele.activeStatus==0){ if(ele&&ele.type==ElementType.cherry&&ele.activeStatus==0){
this.activeCherry(icheryidx); var cherrystats = this.activeCherry(icheryidx);
if(cherrystats){
cherryAnis.push({
idx:icheryidx,
stats:cherrystats
})
}
} }
} }
} }
//以上仅更新樱花数据
//更新樱花动画
this.checkPlayCherryAni(cherryAnis);
}
//樱花动画播放
checkPlayCherryAni(cherryAnis:Array<{idx:number,stats:Array<number>}>){
var aniArr:Array<{inidx:number,idata:Array<{idx:number,stats:Array<number>}>}> = new Array();
for(var i=0;i<cherryAnis.length;i++){
var icherrydata = cherryAnis[i];
var icherryidx = icherrydata.idx;
var icherrystats = icherrydata.stats;
var incherryidx = this.getInCherryidx(icherryidx);
// var
// for(var j=0;j<aniArr.length;j++){
// var janidata = aniArr[j];
// var janiidx = janidata.inidx;
// if(janiidx)
// }
// aniArr.push({
// inidx:incherryidx,
// idx:icherryidx,
// stats:icherrystats
// })
}
}
//获取樱花所在团
getInCherryidx(idx:number){
for(var i=0;i<this.cherryData.length;i++){
var icherrydata = this.cherryData[i];
if(icherrydata.indexOf(idx)!=-1){
return i;
}
}
} }
//激活樱花 //激活樱花
activeCherry(idx:number){ activeCherry(idx:number){
// console.log("1消除樱花----------------------",idx); // console.log("1消除樱花----------------------",idx);
var lat = this.lattices[idx]; var lat = this.lattices[idx];
var ele = this.lattices[idx].element; var ele = this.lattices[idx].element;
var ostat = ele.cherrystat;
ele.addCherryStat();
var nstat = ele.cherrystat;
//樱花状态需要更新
if(nstat>ostat){
return [ostat,nstat];
}else{
return null;
}
ele.activeCherry(); ele.activeCherry();
this.playCherryAni(idx); this.playCherryAni(idx);
this.addFreeCherryData(idx); this.addFreeCherryData(idx);
......
...@@ -303,7 +303,7 @@ export const Chapters31: ChapterData[] = [ ...@@ -303,7 +303,7 @@ export const Chapters31: ChapterData[] = [
1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1,
2, 1, 1, 1, 9, 1, 1, 1, 2 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], foodsdata: [ ], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } }, 2, 1, 1, 1, 9, 1, 1, 1, 2 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], foodsdata: [ ], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null } ] } },
//793 //793
{ baseElementTypes: [ 0,3, 4, 2 ], bubbleProbability: 0, stepCount: 26, passTarget: { type: 1, elements: [ { type: 9, count: 75 } ] }, starScores: [ 15000, 20000, 250000 ], map: { lattices: [ { baseElementTypes: [ 0,3, 4, 2 ], bubbleProbability: 0, stepCount: 26, passTarget: { type: 1, elements: [ { type: 9, count: 75 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [
61, 3, 3, 3, 0, 3, 3, 3, 61, 61, 3, 3, 3, 0, 3, 3, 3, 61,
61, 3, 3, 3, 0, 3, 3, 3, 61, 61, 3, 3, 3, 0, 3, 3, 3, 61,
61, 3, 3, 3, 3, 3, 3, 3, 61, 61, 3, 3, 3, 3, 3, 3, 3, 61,
......
...@@ -872,6 +872,8 @@ export class Element extends eui.Component { ...@@ -872,6 +872,8 @@ export class Element extends eui.Component {
//模拟炮台发射情况 //模拟炮台发射情况
protected cannolab: eui.Label; protected cannolab: eui.Label;
//樱花阶段绽放
public cherrystat:number = 1;
/** /**
* *
* @param type 只应该是基础元素和特殊元素 * @param type 只应该是基础元素和特殊元素
...@@ -884,7 +886,12 @@ export class Element extends eui.Component { ...@@ -884,7 +886,12 @@ export class Element extends eui.Component {
if(type==ElementType.Pongo){//猩猩不设默认图 if(type==ElementType.Pongo){//猩猩不设默认图
}else{ }else{
this.changeSource("ele" + this.type + "_png"); if(this.type==ElementType.cherry){
this.cherrystat = 1;
this.setCherryImg();
}else{
this.changeSource("ele" + this.type + "_png");
}
} }
this.addChild(this.showImage); this.addChild(this.showImage);
...@@ -1024,6 +1031,7 @@ export class Element extends eui.Component { ...@@ -1024,6 +1031,7 @@ export class Element extends eui.Component {
this.showImage.visible = type != ElementType.CANNO; this.showImage.visible = type != ElementType.CANNO;
this.cannolab.visible = false; this.cannolab.visible = false;
this.inPongoPart = null; this.inPongoPart = null;
this.cherrystat = 1;
//重置element //重置element
if(this._mv&&this._mv.parent){ if(this._mv&&this._mv.parent){
this._mv.removeEventListener(egret.Event.ENTER_FRAME,this._mvEnterFrame1,this); this._mv.removeEventListener(egret.Event.ENTER_FRAME,this._mvEnterFrame1,this);
...@@ -1055,7 +1063,11 @@ export class Element extends eui.Component { ...@@ -1055,7 +1063,11 @@ export class Element extends eui.Component {
if(type==ElementType.Pongo||type==ElementType.CANNO){ if(type==ElementType.Pongo||type==ElementType.CANNO){
}else{ }else{
this.changeSource("ele" + type + "_png"); if(this.type==ElementType.cherry){
this.setCherryImg();
}else{
this.changeSource("ele" + type + "_png");
}
} }
//特效重置 //特效重置
this.effectType = null; this.effectType = null;
...@@ -1316,8 +1328,21 @@ export class Element extends eui.Component { ...@@ -1316,8 +1328,21 @@ export class Element extends eui.Component {
get isActive() { return false } get isActive() { return false }
canElimite:boolean; canElimite:boolean;
//樱花显示
setCherryImg(){
this.changeSource("ele46_"+this.cherrystat + "_png");
}
//激活樱花 //激活樱花
activeStatus:number = 0;//0未激活,1绽放中,2,结束 activeStatus:number = 0;//0未激活,1绽放中,2,结束
//樱花动画播放状态
isInCherryAni:boolean = false;
//樱花到下一阶段
addCherryStat(){
if(this.cherrystat<6&&!this.isInCherryAni){
this.cherrystat += 1;
this.isInCherryAni = true;
}
}
activeCherry(){ activeCherry(){
this.activeStatus = 1; this.activeStatus = 1;
this.showImage.alpha = 0; this.showImage.alpha = 0;
...@@ -1326,6 +1351,4 @@ export class Element extends eui.Component { ...@@ -1326,6 +1351,4 @@ export class Element extends eui.Component {
dieCherry(){ dieCherry(){
this.activeStatus = 2; this.activeStatus = 2;
} }
} }
\ No newline at end of file
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