Commit 8b1a0822 authored by wjf's avatar wjf

l

parent 64afd61f
......@@ -187,6 +187,12 @@ export default class MainBase extends eui.UILayer {
for (var i = 1; i <= 11; i++) {
RES.getResAsync("stepAni" + i + "_png")
}
var aaa = [1, 3, 5, 7, 9, 11, 14, 16, 18, 19, 21, 23, 25, 27, 29, 32, 34];
for (var i = 1; i <= 60; i++) {
if (aaa.indexOf(i) >= 0) {
RES.getResAsync("exLighting" + i + "_png")
}
}
var arr = [
"lockVine",
"guidePropHand",
......@@ -293,7 +299,7 @@ export default class MainBase extends eui.UILayer {
check();
});
initstatistics();
initstatistics();
document.addEventListener("visibilitychange", () => {
if (document.visibilityState == "visible") {
......@@ -337,7 +343,7 @@ initstatistics();
// data.refectionCountdown += Math.floor(new Date().getTime()/1000);
// updateMainTimer();
// }
const updateTimerAndView = ()=>{
const updateTimerAndView = () => {
NetManager.ins.hc_home(() => {
updateMainTimer();
//更新bloodpanel和mapscene
......@@ -365,7 +371,7 @@ export const updateMainTimer = () => {
mainTimer.repeatCount = left;
if (left > 0)
mainTimer.start();
else if(left ==0) {
else if (left == 0) {
updateTimerAndView();
}
else
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood","version":5,"files":["../assets/blood/blood体力补济站.png","../assets/blood/blood按钮.png","../assets/blood/blood按钮 副本1.png","../assets/blood/blood按钮 副本.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood","version":5,"files":["..\\assets\\blood\\blood体力补济站.png","..\\assets\\blood\\blood按钮.png","..\\assets\\blood\\blood按钮 副本1.png","..\\assets\\blood\\blood按钮 副本.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood2","version":5,"files":["../assets/blood2/blood2按钮 副本1.png","../assets/blood2/blood2按钮 副本.png","../assets/blood2/blood2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"blood2","version":5,"files":["..\\assets\\blood2\\blood2按钮 副本1.png","..\\assets\\blood2\\blood2按钮 副本.png","..\\assets\\blood2\\blood2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box","version":5,"files":["../assets/box/boxbtn.png","../assets/box/boxbg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box","version":5,"files":["..\\assets\\box\\boxbtn.png","..\\assets\\box\\boxbg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box2","version":5,"files":["../assets/box2/box2_bg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"box2","version":5,"files":["..\\assets\\box2\\box2_bg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy1","version":5,"files":["../assets/buy1/购买锤子.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy1","version":5,"files":["..\\assets\\buy1\\购买锤子.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy2","version":5,"files":["../assets/buy2/购买炸弹.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy2","version":5,"files":["..\\assets\\buy2\\购买炸弹.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy3","version":5,"files":["../assets/buy3/购买步数增加.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"buy3","version":5,"files":["..\\assets\\buy3\\购买步数增加.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"common","version":5,"files":["../assets/common/toast.png","../assets/common/closeCommonBtn.png","../assets/common/btn.png","../assets/common/alertbg.png","../assets/common/按钮 副本 4.png","../assets/common/按钮 副本 3.png","../assets/common/share_btn2.png","../assets/common/share_btn1.png","../assets/common/commmon_okbtn1.png","../assets/common/lightani.png","../assets/common/prizePanelbg.png","../assets/common/common_prizelight.png","../assets/common/common_yuanbao.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"common","version":5,"files":["..\\assets\\common\\toast.png","..\\assets\\common\\closeCommonBtn.png","..\\assets\\common\\btn.png","..\\assets\\common\\alertbg.png","..\\assets\\common\\按钮 副本 4.png","..\\assets\\common\\按钮 副本 3.png","..\\assets\\common\\share_btn2.png","..\\assets\\common\\share_btn1.png","..\\assets\\common\\commmon_okbtn1.png","..\\assets\\common\\lightani.png","..\\assets\\common\\prizePanelbg.png","..\\assets\\common\\common_prizelight.png","..\\assets\\common\\common_yuanbao.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"exchange","version":5,"files":["../assets/exchange/exchangebtn.png","../assets/exchange/exchange.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"exchange","version":5,"files":["..\\assets\\exchange\\exchangebtn.png","..\\assets\\exchange\\exchange.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"fail","version":5,"files":["../assets/faild/闯关失败.png","../assets/faild/按钮 副本 9.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"fail","version":5,"files":["..\\assets\\faild\\闯关失败.png","..\\assets\\faild\\按钮 副本 9.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"map","version":5,"files":["../assets/map/progress2.png","../assets/map/progress1.png","../assets/map/icon.png","../assets/map/animal1.png","../assets/map/元宝bg.png","../assets/map/有星星.png","../assets/map/音乐.png","../assets/map/星星bg.png","../assets/map/星星.png","../assets/map/无星星.png","../assets/map/问题.png","../assets/map/退出.png","../assets/map/狮子.png","../assets/map/声音.png","../assets/map/设置bg.png","../assets/map/设置.png","../assets/map/关闭 拷贝.png","../assets/map/道具.png","../assets/map/宝箱btn.png","../assets/map/宝箱bg.png","../assets/map/宝箱.png","../assets/map/宝箱3.png","../assets/map/宝箱2.png","../assets/map/宝箱1.png","../assets/map/iconbg.png","../assets/map/光 副本 4.png","../assets/map/音乐关闭.png","../assets/map/声音关闭.png","../assets/map/recordbtn.png","../assets/map/msgTri.png","../assets/map/guideOver.png","../assets/map/guideLove.png","../assets/map/guideBox.png","../assets/map/guideLevel.png","../assets/map/guideMoney.png","../assets/map/lionMsgBg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"map","version":5,"files":["..\\assets\\map\\progress2.png","..\\assets\\map\\progress1.png","..\\assets\\map\\icon.png","..\\assets\\map\\animal1.png","..\\assets\\map\\元宝bg.png","..\\assets\\map\\有星星.png","..\\assets\\map\\音乐.png","..\\assets\\map\\星星bg.png","..\\assets\\map\\星星.png","..\\assets\\map\\无星星.png","..\\assets\\map\\问题.png","..\\assets\\map\\退出.png","..\\assets\\map\\狮子.png","..\\assets\\map\\声音.png","..\\assets\\map\\设置bg.png","..\\assets\\map\\设置.png","..\\assets\\map\\关闭 拷贝.png","..\\assets\\map\\道具.png","..\\assets\\map\\宝箱btn.png","..\\assets\\map\\宝箱bg.png","..\\assets\\map\\宝箱.png","..\\assets\\map\\宝箱3.png","..\\assets\\map\\宝箱2.png","..\\assets\\map\\宝箱1.png","..\\assets\\map\\iconbg.png","..\\assets\\map\\光 副本 4.png","..\\assets\\map\\音乐关闭.png","..\\assets\\map\\声音关闭.png","..\\assets\\map\\recordbtn.png","..\\assets\\map\\msgTri.png","..\\assets\\map\\guideOver.png","..\\assets\\map\\guideLove.png","..\\assets\\map\\guideBox.png","..\\assets\\map\\guideLevel.png","..\\assets\\map\\guideMoney.png","..\\assets\\map\\lionMsgBg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noprize","version":5,"files":["../assets/nprize/擦肩而过弹窗 .png","../assets/nprize/得分- 无发券.png","../assets/nprize/再来一次.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"noprize","version":5,"files":["..\\assets\\nprize\\擦肩而过弹窗 .png","..\\assets\\nprize\\得分- 无发券.png","..\\assets\\nprize\\再来一次.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["../assets/prize/PrizePanelX.png","../assets/prize/prizePanelUseBtn.png","../assets/prize/点亮.png","../assets/prize/点亮 副本 2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize","version":5,"files":["..\\assets\\prize\\PrizePanelX.png","..\\assets\\prize\\prizePanelUseBtn.png","..\\assets\\prize\\点亮.png","..\\assets\\prize\\点亮 副本 2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["../assets/prize2/prize2_icon.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"prize2","version":5,"files":["..\\assets\\prize2\\prize2_icon.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"quit","version":5,"files":["../assets/quit/quit_bg.png","../assets/quit/关闭按钮.png","../assets/quit/按钮 副本 8.png","../assets/quit/按钮 副本 7.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"quit","version":5,"files":["..\\assets\\quit\\quit_bg.png","..\\assets\\quit\\关闭按钮.png","..\\assets\\quit\\按钮 副本 8.png","..\\assets\\quit\\按钮 副本 7.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["../assets/rule/ruleBg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"rule","version":5,"files":["..\\assets\\rule\\ruleBg.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"shop","version":5,"files":["../assets/shop/shopbtn1.png","../assets/shop/道具商城.png","../assets/shop/按钮 副本.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"shop","version":5,"files":["..\\assets\\shop\\shopbtn1.png","..\\assets\\shop\\道具商城.png","..\\assets\\shop\\按钮 副本.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"sign","version":5,"files":["../assets/sign/signitem.png","../assets/sign/signicon5.png","../assets/sign/signicon4.png","../assets/sign/signicon3.png","../assets/sign/signicon2.png","../assets/sign/signbtn4.png","../assets/sign/signbtn3.png","../assets/sign/signbtn2.png","../assets/sign/signbtn1.png","../assets/sign/signbg.png","../assets/sign/sign_line2.png","../assets/sign/sign_line.png","../assets/sign/sign_light.png","../assets/sign/sign_icon1.png","../assets/sign/signicon6.png","../assets/sign/signicon_blood.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"sign","version":5,"files":["..\\assets\\sign\\signitem.png","..\\assets\\sign\\signicon5.png","..\\assets\\sign\\signicon4.png","..\\assets\\sign\\signicon3.png","..\\assets\\sign\\signicon2.png","..\\assets\\sign\\signbtn4.png","..\\assets\\sign\\signbtn3.png","..\\assets\\sign\\signbtn2.png","..\\assets\\sign\\signbtn1.png","..\\assets\\sign\\signbg.png","..\\assets\\sign\\sign_line2.png","..\\assets\\sign\\sign_line.png","..\\assets\\sign\\sign_light.png","..\\assets\\sign\\sign_icon1.png","..\\assets\\sign\\signicon6.png","..\\assets\\sign\\signicon_blood.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"signprize","version":5,"files":["../assets/signprize/singprizebg.png","../assets/signprize/singprize体力.png","../assets/signprize/signprize元宝.png","../assets/signprize/signprize_numsbg.png","../assets/signprize/signprize_btn.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"signprize","version":5,"files":["..\\assets\\signprize\\singprizebg.png","..\\assets\\signprize\\singprize体力.png","..\\assets\\signprize\\signprize元宝.png","..\\assets\\signprize\\signprize_numsbg.png","..\\assets\\signprize\\signprize_btn.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["../assets/startScene/mask3.png","../assets/startScene/mask2.png","../assets/startScene/mask.png","../assets/startScene/loadingbg.png","../assets/startScene/头顶树丛.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"start","version":5,"files":["..\\assets\\startScene\\mask3.png","..\\assets\\startScene\\mask2.png","..\\assets\\startScene\\mask.png","..\\assets\\startScene\\loadingbg.png","..\\assets\\startScene\\头顶树丛.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"startpanel","version":5,"files":["../assets/startpanel2/startpanel通关条件.png","../assets/startpanel2/startpanel数量.png","../assets/startpanel2/startpanel数量 副本 3.png","../assets/startpanel2/startpanel目标33.png","../assets/startpanel2/startpanel目标3.png","../assets/startpanel2/startpanel按钮.png","../assets/startpanel2/startpanel_ice1.png","../assets/startpanel2/startpanel_ele6.png","../assets/startpanel2/startpanel_block2.png"]}
\ No newline at end of file
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"startpanel","version":5,"files":["..\\assets\\startpanel2\\startpanel通关条件.png","..\\assets\\startpanel2\\startpanel数量.png","..\\assets\\startpanel2\\startpanel数量 副本 3.png","..\\assets\\startpanel2\\startpanel目标33.png","..\\assets\\startpanel2\\startpanel目标3.png","..\\assets\\startpanel2\\startpanel按钮.png","..\\assets\\startpanel2\\startpanel_ice1.png","..\\assets\\startpanel2\\startpanel_ele6.png","..\\assets\\startpanel2\\startpanel_block2.png"]}
\ No newline at end of file
......@@ -45,7 +45,7 @@
"name": "shop"
},
{
"keys": "yezi1_png,unlightedStar_png,targetBoard_png,stepsBoard_png,stepNumber9_png,stepNumber8_png,stepNumber7_png,stepNumber6_png,stepNumber5_png,stepNumber4_png,stepNumber3_png,stepNumber2_png,stepNumber1_png,stepNumber0_png,stepBtn_png,starProgress_png,setting_png,scoreNumber9_png,scoreNumber8_png,scoreNumber7_png,scoreNumber6_png,scoreNumber5_png,scoreNumber4_png,scoreNumber3_png,scoreNumber2_png,scoreNumber1_png,scoreNumber0_png,rock6_png,rock5_png,rock4_png,rock3_png,rock2_png,rock1_png,rightMark_png,rightArrow_png,rectLat_png,progressDown_png,playSceneBg_png,magicLionBg_png,magicLion_png,lockUp_png,lockDown_png,lineLight_png,lightedStar_png,leftArrow_png,ice6_png,ice5_png,ice4_png,ice3_png,ice2_png,ice1_png,hammerBtn_png,eleDis9_png,eleDis8_png,eleDis7_png,eleDis6_png,eleDis5_png,eleDis4_png,eleDis3_png,eleDis2_png,eleDis12_png,eleDis11_png,eleDis10_png,eleDis1_png,ele5_png,ele42_png,ele41_png,ele40_png,ele4_png,ele32_png,ele31_png,ele30_png,ele3_png,ele22_png,ele21_png,ele20_png,ele2_png,ele12_png,ele11_png,ele10_png,ele1_png,ele02_png,ele01_png,ele00_png,ele0_png,dangqianfenshu_png,chooseRect_png,boomBtn_png,boom9_png,boom8_png,boom7_png,boom6_png,boom5_png,boom4_png,boom3_png,boom2_png,boom18_png,boom17_png,boom16_png,boom15_png,boom14_png,boom13_png,boom12_png,boom11_png,boom10_png,boom1_png,mainSoundBtnOn_png,mainSettingBg_png,mainQuestionBtn_png,mainMusicBtnOn_png,mainQuitBtn_png,mainSoundBtnOff_png,mainMusicBtnOff_png,targetNumber9_png,targetNumber8_png,targetNumber7_png,targetNumber6_png,targetNumber5_png,targetNumber4_png,targetNumber3_png,targetNumber2_png,targetNumber1_png,targetNumber0_png,ele7_png,ele6_png,bonusFra9_png,bonusFra8_png,bonusFra7_png,bonusFra6_png,bonusFra5_png,bonusFra4_png,bonusFra3_png,bonusFra27_png,bonusFra26_png,bonusFra25_png,bonusFra24_png,bonusFra23_png,bonusFra22_png,bonusFra21_png,bonusFra20_png,bonusFra2_png,bonusFra19_png,bonusFra18_png,bonusFra17_png,bonusFra16_png,bonusFra15_png,bonusFra14_png,bonusFra13_png,bonusFra12_png,bonusFra11_png,bonusFra10_png,bonusFra1_png,bonusShoot_png,guideTxt5_png,guideTxt4_png,guideTxt3_png,guideTxt2_png,guideTxt1_png,guideKnowBtn_png,guideBg_png,propNum9_png,propNum8_png,propNum7_png,propNum6_png,propNum5_png,propNum4_png,propNum3_png,propNum2_png,propNum1_png,propNum0_png,propNumBg_png,bonusTime_png,eleDis19_png,eleDis18_png,eleDis17_png,eleDis16_png,eleDis15_png,eleDis14_png,eleDis13_png,main_mapbottom_png,guidePropShoe_png,guidePropMsgPanel_png,guidePropHand_png,guidePropHammer_png,guidePropCow_png,guidePropBoom_png,stepAni9_png,stepAni8_png,stepAni7_png,stepAni6_png,stepAni5_png,stepAni4_png,stepAni3_png,stepAni2_png,stepAni11_png,stepAni10_png,stepAni1_png,lockVine_png",
"keys": "yezi1_png,unlightedStar_png,targetBoard_png,stepsBoard_png,stepNumber9_png,stepNumber8_png,stepNumber7_png,stepNumber6_png,stepNumber5_png,stepNumber4_png,stepNumber3_png,stepNumber2_png,stepNumber1_png,stepNumber0_png,stepBtn_png,starProgress_png,setting_png,scoreNumber9_png,scoreNumber8_png,scoreNumber7_png,scoreNumber6_png,scoreNumber5_png,scoreNumber4_png,scoreNumber3_png,scoreNumber2_png,scoreNumber1_png,scoreNumber0_png,rock6_png,rock5_png,rock4_png,rock3_png,rock2_png,rock1_png,rightMark_png,rightArrow_png,rectLat_png,progressDown_png,playSceneBg_png,magicLionBg_png,magicLion_png,lockUp_png,lockDown_png,lineLight_png,lightedStar_png,leftArrow_png,ice6_png,ice5_png,ice4_png,ice3_png,ice2_png,ice1_png,hammerBtn_png,eleDis9_png,eleDis8_png,eleDis7_png,eleDis6_png,eleDis5_png,eleDis4_png,eleDis3_png,eleDis2_png,eleDis12_png,eleDis11_png,eleDis10_png,eleDis1_png,ele5_png,ele42_png,ele41_png,ele40_png,ele4_png,ele32_png,ele31_png,ele30_png,ele3_png,ele22_png,ele21_png,ele20_png,ele2_png,ele12_png,ele11_png,ele10_png,ele1_png,ele02_png,ele01_png,ele00_png,ele0_png,dangqianfenshu_png,chooseRect_png,boomBtn_png,boom9_png,boom8_png,boom7_png,boom6_png,boom5_png,boom4_png,boom3_png,boom2_png,boom18_png,boom17_png,boom16_png,boom15_png,boom14_png,boom13_png,boom12_png,boom11_png,boom10_png,boom1_png,mainSoundBtnOn_png,mainSettingBg_png,mainQuestionBtn_png,mainMusicBtnOn_png,mainQuitBtn_png,mainSoundBtnOff_png,mainMusicBtnOff_png,targetNumber9_png,targetNumber8_png,targetNumber7_png,targetNumber6_png,targetNumber5_png,targetNumber4_png,targetNumber3_png,targetNumber2_png,targetNumber1_png,targetNumber0_png,ele7_png,ele6_png,bonusFra9_png,bonusFra8_png,bonusFra7_png,bonusFra6_png,bonusFra5_png,bonusFra4_png,bonusFra3_png,bonusFra27_png,bonusFra26_png,bonusFra25_png,bonusFra24_png,bonusFra23_png,bonusFra22_png,bonusFra21_png,bonusFra20_png,bonusFra2_png,bonusFra19_png,bonusFra18_png,bonusFra17_png,bonusFra16_png,bonusFra15_png,bonusFra14_png,bonusFra13_png,bonusFra12_png,bonusFra11_png,bonusFra10_png,bonusFra1_png,bonusShoot_png,guideTxt5_png,guideTxt4_png,guideTxt3_png,guideTxt2_png,guideTxt1_png,guideKnowBtn_png,guideBg_png,propNum9_png,propNum8_png,propNum7_png,propNum6_png,propNum5_png,propNum4_png,propNum3_png,propNum2_png,propNum1_png,propNum0_png,propNumBg_png,bonusTime_png,eleDis19_png,eleDis18_png,eleDis17_png,eleDis16_png,eleDis15_png,eleDis14_png,eleDis13_png,main_mapbottom_png,guidePropShoe_png,guidePropMsgPanel_png,guidePropHand_png,guidePropHammer_png,guidePropCow_png,guidePropBoom_png,stepAni9_png,stepAni8_png,stepAni7_png,stepAni6_png,stepAni5_png,stepAni4_png,stepAni3_png,stepAni2_png,stepAni11_png,stepAni10_png,stepAni1_png,lockVine_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",
"name": "main2"
},
{
......@@ -1740,11 +1740,6 @@
"type": "image",
"name": "lockVine_png"
},
{
"url": "assets/mainScene/lockVine.png",
"type": "image",
"name": "lockVine2_png"
},
{
"url": "assets/sign/signbtn1.png",
"type": "image",
......@@ -1859,6 +1854,91 @@
"url": "assets/sign/signicon6.png",
"type": "image",
"name": "signicon6_png"
},
{
"url": "assets/mainScene/exLighting16.png",
"type": "image",
"name": "exLighting16_png"
},
{
"url": "assets/mainScene/exLighting18.png",
"type": "image",
"name": "exLighting18_png"
},
{
"url": "assets/mainScene/exLighting19.png",
"type": "image",
"name": "exLighting19_png"
},
{
"url": "assets/mainScene/exLighting21.png",
"type": "image",
"name": "exLighting21_png"
},
{
"url": "assets/mainScene/exLighting23.png",
"type": "image",
"name": "exLighting23_png"
},
{
"url": "assets/mainScene/exLighting25.png",
"type": "image",
"name": "exLighting25_png"
},
{
"url": "assets/mainScene/exLighting27.png",
"type": "image",
"name": "exLighting27_png"
},
{
"url": "assets/mainScene/exLighting29.png",
"type": "image",
"name": "exLighting29_png"
},
{
"url": "assets/mainScene/exLighting32.png",
"type": "image",
"name": "exLighting32_png"
},
{
"url": "assets/mainScene/exLighting34.png",
"type": "image",
"name": "exLighting34_png"
},
{
"url": "assets/mainScene/exLighting1.png",
"type": "image",
"name": "exLighting1_png"
},
{
"url": "assets/mainScene/exLighting3.png",
"type": "image",
"name": "exLighting3_png"
},
{
"url": "assets/mainScene/exLighting5.png",
"type": "image",
"name": "exLighting5_png"
},
{
"url": "assets/mainScene/exLighting7.png",
"type": "image",
"name": "exLighting7_png"
},
{
"url": "assets/mainScene/exLighting9.png",
"type": "image",
"name": "exLighting9_png"
},
{
"url": "assets/mainScene/exLighting11.png",
"type": "image",
"name": "exLighting11_png"
},
{
"url": "assets/mainScene/exLighting14.png",
"type": "image",
"name": "exLighting14_png"
}
]
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import { LockAni } from "../anis/LockAni";
import { MagicLionBgAni } from "../periodAni/MagicLionBgAni";
import { HorizontalBgAni } from "../periodAni/HorizontalBgAni";
import { VerticalBgAni } from "../periodAni/VerticalBgAni";
import { ExplosiveBgAni } from "../periodAni/ExplosiveBgAni";
/**
......@@ -72,6 +73,13 @@ export class Element extends eui.Component {
break;
case EffectType.EXPLOSIVE:
this.changeSource("ele" + this.type + value + "_png");
this.explosiveBgAni = Pool.takeOut(RecoverName.EXPLOSIVEBG_ANI)
if (!this.explosiveBgAni) {
this.explosiveBgAni = new ExplosiveBgAni();
} else {
this.explosiveBgAni.reset();
}
this.addChildAt(this.explosiveBgAni, 1)
break;
}
this._effectType = value;
......@@ -86,7 +94,8 @@ export class Element extends eui.Component {
}
magicLionBgAni: MagicLionBgAni;
horizontalBgAni: HorizontalBgAni;
verticalBgAni: VerticalBgAni
verticalBgAni: VerticalBgAni;
explosiveBgAni: ExplosiveBgAni;
/**
* 索引
*/
......@@ -192,6 +201,9 @@ export class Element extends eui.Component {
this.verticalBgAni = null;
break;
case EffectType.EXPLOSIVE:
this.removeChild(this.explosiveBgAni);
Pool.recover(RecoverName.EXPLOSIVEBG_ANI, this.explosiveBgAni);
this.explosiveBgAni = null;
break;
}
}
......
......@@ -18,6 +18,7 @@ export enum RecoverName {
MAGICLIONBG_ANI = "MagicLionBgAni",
HORIZONTALBG_ANI = "HorizontalBgAni",
VERTICALBG_ANI = "VerticalBgAni",
EXPLOSIVEBG_ANI = "ExplosiveBgAni",
//所有继承ani的,能单独播放的
ROCK_ANI = "RockAni",
......
import { Ani } from "../class/Ani";
import { ImageAni } from "../class/ImageAni";
//原点已是中心
export class ExplosiveBgAni extends eui.Image {
sourceAll: string[];
currentFrame: number;
totalFrames: number;
isPlay: boolean;
startTime: number
/**
* 所有时间,帧数按每秒30
*/
allTime: number
/**
* 播放完的回调
*/
constructor() {
super();
var arr = [];
var aaa = [1, 3, 5, 7, 9, 11, 14, 16, 18, 19, 21, 23, 25, 27, 29, 32, 34];
for (var i = 1; i <= 60; i++) {
if (aaa.indexOf(i) >= 0) {
arr.push("exLighting" + i + "_png")
} else {
arr.push(null);
}
}
this.sourceAll = arr;
this.changeSource(this.sourceAll[0])
this.currentFrame = 0;
this.totalFrames = arr.length;
this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this)
this.startTime = Date.now()
this.allTime = this.sourceAll.length / 30 * 1000;
}
onEnterFrame() {
var dataNow = Date.now();
var deltaTime = dataNow - this.startTime;
var scale = deltaTime / this.allTime;
if (scale >= 1) {
this.startTime = Date.now()
this.currentFrame = 0;
this.changeSource(this.sourceAll[this.currentFrame]);
} else {
this.currentFrame = (scale * this.sourceAll.length) >> 0;
this.changeSource(this.sourceAll[this.currentFrame]);
}
}
reset() {
// this.showImage.scaleX = this.showImage.scaleY = 0.7;
// this.showImage.alpha = 1;
}
private changeSource(source: string) {
if (source) {
this.texture = RES.getRes(source)
this.x = -this.texture.textureWidth / 2;
this.y = -this.texture.textureHeight / 2;
} else {
this.texture = null;
}
}
}
\ No newline at end of file
......@@ -12,13 +12,13 @@ export class VerticalBgAni extends egret.DisplayObjectContainer {
var textureL: egret.Texture = RES.getRes("leftArrow_png")
this.upArrow = new egret.Bitmap(textureL);
this.upArrow.rotation = 90;
this.upArrow.x = textureL.textureWidth / 2;
this.upArrow.x = textureL.textureWidth / 2 + 1;
this.upArrow.y = -45
this.addChild(this.upArrow);
var textureR: egret.Texture = RES.getRes("rightArrow_png")
this.downArrow = new egret.Bitmap(textureR);
this.downArrow.rotation = 90;
this.downArrow.x = textureR.textureWidth / 2;
this.downArrow.x = textureR.textureWidth / 2 + 1;
this.downArrow.y = 45 - textureR.textureHeight;
this.addChild(this.downArrow);
this.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this)
......
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