Commit c3e21e2c authored by zhangjinzhou's avatar zhangjinzhou

消消乐版本暂存

parent 345031ec
......@@ -78,7 +78,7 @@
<script>
window['signconfigs'] = [
{ nums: '*20', type: 'money' },
{ nums: '*20', type: 'money' },
{ nums: '*40', type: 'money' },
{ nums: '*1', type: 'hammer' },
{ nums: '*20', type: 'money' },
{ nums: '*20', type: 'money' },
......
......@@ -18,7 +18,7 @@ import ShopPanel from "../../src/panels/ShopPanel";
import SignPanel from "../../src/panels/SignPanel";
import StartPanel from "../../src/panels/StartPanel";
import StartPanelNew from "../../src/panels/StartPanelNew";
import { getBgOn, playBg, stopBg } from "../../src/soundCtrl";
import { getSoundOn, playBg, stopBg } from "../../src/soundCtrl";
import { playGameBg, stopGamebg } from "../../src/soundCtrl2";
import StartScene from "../../src/startScene/StartScene";
import getResPath from "../new_tc/getResPath";
......@@ -124,6 +124,7 @@ export default class MainBase extends eui.UILayer {
}
protected initNativeEvent() {
return;
// 穿山甲广告位
// 首页&游戏中banner
// window["TTIndexBanner"] = '945073403'
......@@ -326,7 +327,7 @@ export default class MainBase extends eui.UILayer {
for (var i = 0; i <= 9; i++) {
RES.getResAsync("curScoreNum" + i + "_png")
}
for (var i = 5; i <= 14; i++) {
for (var i = 5; i <= 15; i++) {
RES.getResAsync("ele" + i + "_png")
}
for (var i = 1; i <= 10; i++) {
......@@ -335,6 +336,11 @@ export default class MainBase extends eui.UILayer {
for (var i = 1; i <= 13; i++) {
RES.getResAsync("lineLight" + i + "_png")
}
//三个星星宝箱
RES.getResAsync("starbox1_png");
RES.getResAsync("starbox2_png");
RES.getResAsync("starbox3_png");
var arr = [
"redDoorBg", "blueDoorBg", "yellowDoorBg", "doorOpen", "doorClosed",
"rectLatWhite",
......@@ -509,7 +515,7 @@ export default class MainBase extends eui.UILayer {
// if (document.visibilityState == "visible") {
// if (getBgOn()) {
// if (getSoundOn()) {
// if (SceneCtrl.instance.currentScene instanceof MapScene)
// playBg();
// else if (SceneCtrl.instance.currentScene instanceof MainScene)
......@@ -545,7 +551,7 @@ export default class MainBase extends eui.UILayer {
stopGamebg();
}
window["webviewShow"] = () => {
if (getBgOn()) {
if (getSoundOn()) {
if (SceneCtrl.instance.currentScene instanceof MapScene)
playBg();
else if (SceneCtrl.instance.currentScene instanceof MainScene)
......
{"file":"albhtxxl.png","frames":{
"0":{"x":27,"y":36,"w":24,"h":34,"offX":0,"offY":0,"sourceW":24,"sourceH":34},
"1":{"x":78,"y":70,"w":18,"h":32,"offX":0,"offY":0,"sourceW":18,"sourceH":32},
"2":{"x":27,"y":72,"w":24,"h":33,"offX":0,"offY":0,"sourceW":24,"sourceH":33},
"3":{"x":53,"y":36,"w":23,"h":34,"offX":0,"offY":0,"sourceW":23,"sourceH":34},
"4":{"x":95,"y":0,"w":25,"h":32,"offX":0,"offY":0,"sourceW":25,"sourceH":32},
"5":{"x":53,"y":72,"w":23,"h":33,"offX":0,"offY":0,"sourceW":23,"sourceH":33},
"6":{"x":0,"y":36,"w":25,"h":34,"offX":0,"offY":0,"sourceW":25,"sourceH":34},
"7":{"x":78,"y":36,"w":23,"h":32,"offX":0,"offY":0,"sourceW":23,"sourceH":32},
"8":{"x":0,"y":72,"w":25,"h":34,"offX":0,"offY":0,"sourceW":25,"sourceH":34},
"9":{"x":68,"y":0,"w":25,"h":34,"offX":0,"offY":0,"sourceW":25,"sourceH":34},
"次":{"x":0,"y":0,"w":66,"h":34,"offX":0,"offY":0,"sourceW":67,"sourceH":34}}}
\ 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,starbox1_png,starbox2_png,starbox3_png",
"name": "main2"
},
{
......@@ -113,7 +113,7 @@
"name": "videobuy"
},
{
"keys": "chongxinchuangguan1_png,chongxinchuangguan2_png,chongxinchuangguan3_png,newVideoIcon2_json,newVideoIcon2_png",
"keys": "chongxinchuangguan1_png,chongxinchuangguan2_png,chongxinchuangguan3_png,starboxrect_png,turnpbtnicon_png,topban_png,exchangebtn2_png,lightstar3_png,stopsoundbtn_png,rankbtn_png,opensoundbtn_png,turnpbtn_png,starbox1_png,starbox2_png,starbox3_png",
"name": "preload"
}
],
......@@ -2638,16 +2638,6 @@
"type": "image",
"name": "mapredbagicom_png"
},
{
"url": "assets/mc/newVideoIcon.json",
"type": "json",
"name": "newVideoIcon_move"
},
{
"url": "assets/mc/newVideoIcon.png",
"type": "image",
"name": "newVideoIcon_png"
},
{
"url": "assets/mc/effect1.json",
"type": "sheet",
......@@ -2985,15 +2975,90 @@
"type": "image",
"name": "newVideoIcon_png"
},
{
"url": "assets/map/starboxrect.png",
"type": "image",
"name": "starboxrect_png"
},
{
"url": "assets/map/turnpbtnicon.png",
"type": "image",
"name": "turnpbtnicon_png"
},
{
"url": "assets/map/topban.png",
"type": "image",
"name": "topban_png"
},
{
"url": "assets/map/exchangebtn.png",
"type": "image",
"name": "exchangebtn2_png"
},
{
"url": "assets/map/lightstar3.png",
"type": "image",
"name": "lightstar3_png"
},
{
"url": "assets/map/stopsoundbtn.png",
"type": "image",
"name": "stopsoundbtn_png"
},
{
"url": "assets/map/rankbtn.png",
"type": "image",
"name": "rankbtn_png"
},
{
"url": "assets/map/opensoundbtn.png",
"type": "image",
"name": "opensoundbtn_png"
},
{
"url": "assets/map/turnpbtn.png",
"type": "image",
"name": "turnpbtn_png"
},
{
"url": "assets/mc/newVideoIcon.png",
"type": "image",
"name": "newVideoIcon_png"
},
{
"url": "assets/mc/newVideoIcon.json",
"type": "json",
"name": "newVideoIcon2_json"
"name": "newVideoIcon_json"
},
{
"url": "assets/mc/newVideoIcon.png",
"url": "assets/common/albhtxxl.fnt",
"type": "font",
"name": "albhtxxl_fnt"
},
{
"url": "assets/common/albhtxxl.png",
"type": "image",
"name": "albhtxxl_png"
},
{
"url": "assets/mainScene/ele15.png",
"type": "image",
"name": "ele15_png"
},
{
"url": "assets/mainScene/starbox1.png",
"type": "image",
"name": "starbox1_png"
},
{
"url": "assets/mainScene/starbox2.png",
"type": "image",
"name": "starbox2_png"
},
{
"url": "assets/mainScene/starbox3.png",
"type": "image",
"name": "newVideoIcon2_png"
"name": "starbox3_png"
}
]
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="MapSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Rect id="rectbg" width="750" height="1206"/>
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on" locked="true">
<e:Scroller id="scroll" width="750" height="1624" x="0" y="0" scrollPolicyH="off" scrollPolicyV="on">
<e:Group id="scrollGroup">
</e:Group>
</e:Scroller>
<e:Group id="treasureboxBtn" y="-3.06" x="518.26" scaleX="1" scaleY="1">
<e:Image source="宝箱bg_png" y="22" x="3.75"/>
<e:Group x="41.08" y="35.48">
<e:Rect id="rect" width="124" height="45" x="0" y="0" visible="false"/>
<e:Image id="progressbg" source="progress2_png" y="0" x="0" visible="false"/>
<e:Image id="progressfront" source="progress1_png" y="0" x="0" visible="false"/>
<e:Image source="星星_png" verticalCenter="-2.5" x="-14.31"/>
<e:Label id="totalStarTxt" text="0/0" x="24.04" verticalAlign="middle" textAlign="left" size="22" verticalCenter="0.5" bold="true" fontFamily="FZY3JW"/>
</e:Group>
<e:Image id="box" source="宝箱_png" right="24" verticalCenter="9.5" anchorOffsetX="34" anchorOffsetY="34"/>
<e:Group id="boxiconWrapper" x="166.08" y="34.86" touchEnabled="false" touchChildren="false">
<e:Image x="8.32" y="0" source="iconbg_png"/>
<e:Label id="boxNumsTxt" text="0" x="-2.25" verticalAlign="middle" textAlign="center" size="18" width="46" y="3.64" fontFamily="FZY3JW"/>
<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="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">
<e:Image id="stopsoundimg" source="stopsoundbtn_png" scaleX="1" scaleY="1" x="10" y="9"/>
<e:Image id="opensoundimg" source="opensoundbtn_png" scaleX="1" scaleY="1" x="10" y="9"/>
</e:Group>
</e:Group>
<e:Group id="top" x="170.04" y="18.05">
<e:Image source="元宝bg_png" x="0" y="0"/>
<e:Label id="bloodTxt" text="5" x="3.96" y="22.84" width="49" verticalAlign="middle" textAlign="center" size="22" fontFamily="FZY3JW" bold="true"/>
<e:Label id="fullTxt" text="已满" x="57.96" y="22.34" width="82" verticalAlign="middle" textAlign="center" size="24" visible="false"/>
<e:Label id="goldTxt" text="0" x="247.23" y="24.94" width="88" verticalAlign="middle" textAlign="center" fontFamily="FZY3JW" size="22"/>
<e:Button id="bloodBtn" label="" x="147.13" y="15.35">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="关闭 拷贝_png" source.down="关闭 拷贝_png" source.disabled="关闭 拷贝_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="goldBtn" label="" x="385.2" y="16.6" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="关闭 拷贝_png" source.down="关闭 拷贝_png" source.disabled="关闭 拷贝_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="countdown" text="00:00:00" x="63.64" y="24.94" verticalAlign="middle" textAlign="center" size="22" fontFamily="FZY3JW"/>
</e:Group>
<e:Button id="shopBtn" label="" x="613.08" y="174.01" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="道具_png" source.down="道具_png" source.disabled="道具_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="recordBtn" label="" x="594.14" y="175">
<e:Group id="signGroup" x="26" y="172">
<e:Button id="signBtn" label="" x="0" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
<e:Image width="100%" height="100%" source="map_signicon_png" source.down="map_signicon_png" source.disabled="recordbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="wuhanGroup" y="325" right="30" visible="false">
<e:Button label="" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="wuhanIcon_png" source.down="wuhanIcon_png" source.disabled="wuhanIcon_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group x="-24">
<e:Image id="wuhanTips" y="0" touchEnabled="false" source="dailingqu_png"/>
<e:Group y="92" x="9">
<e:Image id="sign_s1" source="map今日可领_png" x="0" y="0" visible="false"/>
<e:Image id="sign_s2" source="map明日可领_png" x="0" y="0" visible="false"/>
</e:Group>
</e:Group>
<e:Group id="tuiaGroup" y="325" right="30" visible="false">
<e:Button label="" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="tuiaIcon_png" source.down="tuiaIcon_png" source.disabled="tuiaIcon_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group x="-24">
<e:Image id="tuiaTips" y="0" touchEnabled="false" source="dailingqu_png"/>
</e:Group>
<e:Group id="rankGroup" width="115" height="121" y="172" x="609">
<e:Image source="rankbtn_png" scaleX="1" scaleY="1"/>
</e:Group>
<e:Group id="newTuiaGroup" y="325" right="200" visible="false">
</e:Group>
<e:Group id="friendBtn" x="-0.12" y="22.31" width="171" height="120">
<e:Image source="avatar_png" y="0" horizontalCenter="0"/>
<e:Group x="38.5" y="10">
<e:Image id="avatar" y="0" source="" width="96" height="96" x="0"/>
<e:Rect id="avatarMask" width="96" height="96" x="0" y="0" ellipseWidth="96" ellipseHeight="96"/>
</e:Group>
<e:Image source="namebg_png" horizontalCenter="-4" bottom="-4"/>
<e:Label id="nameTxt" text="La121233bel" y="91.5" size="20" horizontalCenter="1" fontFamily="FZY3JW"/>
</e:Group>
<e:Image id="adBtn" y="478" source="ad_icon_png" right="602" width="122" height="122" visible="false"/>
<e:Group id="signGroup" x="26.69" y="172.57">
<e:Button id="signBtn" label="" x="0" y="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="map_signicon_png" source.down="map_signicon_png" source.disabled="recordbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Group y="92" x="9">
<e:Image id="sign_s1" source="map今日可领_png" x="0" y="0" visible="false"/>
<e:Image id="sign_s2" source="map明日可领_png" x="0" y="0" visible="false"/>
</e:Group>
<e:Group id="turnGroup" width="115" height="121" x="609" y="322">
<e:Image source="turnpbtn_png"/>
<e:Image source="turnpbtnicon_png" x="-35" y="9"/>
</e:Group>
<e:Group id="settingsx" x="30" scaleX="1.4" scaleY="1.4" bottom="23" touchEnabled="false" locked="true">
<e:Group id="settingGroup" x="2" y="6.08" visible="false">
<e:Image id="settingbg" source="设置bg_png" y="0" x="0" scale9Grid="9,84,54,76" height="231"/>
<e:Button id="soundBtn" label="" y="59.65" horizontalCenter="0.5">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="声音_png" source.down="声音_png" source.disabled="声音_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="questionBtn" label="" y="109.41" horizontalCenter="0.5">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="问题_png" source.down="问题_png" source.disabled="问题_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="musicBtn" label="" y="14.36" horizontalCenter="0.5">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="音乐_png" source.down="音乐_png" source.disabled="音乐_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="musicOffBtn" label="" y="13.69" horizontalCenter="0.5" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="音乐关闭_png" source.down="音乐关闭_png" source.disabled="音乐关闭_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="soundOffBtn" label="" y="60.32" horizontalCenter="0.5" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="声音关闭_png" source.down="声音关闭_png" source.disabled="声音关闭_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Button id="settingBtn" label="" y="162.34" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="设置_png" source.down="设置_png" source.disabled="设置_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Group id="boxLayer" x="0" y="0" visible="false">
<e:Rect width="750" height="1624" fillAlpha="0.7" x="0" y="0"/>
<e:Group id="boxani">
</e:Group>
<e:Label text="点击开宝箱" y="791" size="37" horizontalCenter="0" bold="true"/>
</e:Group>
<w:Config id="16c89f4ae1a"/>
</e:Skin>
\ No newline at end of file
......@@ -37,7 +37,7 @@ import { ElementTargets } from '../something/uis/ElementTargets';
import { PropGuide } from '../something/uis/PropGuide';
import { ScoreProgress } from '../something/uis/ScoreProgress';
import { StepNumber } from '../something/uis/StepNumber';
import { getBgOn, getSoundOn, playSound, SoundType, stopBg, toggleSound } from '../soundCtrl';
import { getSoundOn, playSound, SoundType, stopBg, toggleSound } from '../soundCtrl';
import { playGameBg, toggleGameBg } from '../soundCtrl2';
import { createData } from '../startScene/StartScene';
import { DataManager } from './../../libs/tw/manager/DataManager';
......@@ -68,7 +68,6 @@ import { FesRedBombShowAni } from '../something/anisCall/FesRedBombShowAni';
import { RectsWaveAni } from '../something/anisCall/RectsWaveAni';
import { Door } from '../something/class/Door';
import Utils, { CouponJoinScene } from '../Utils';
import { Candy } from '../../../../../../../node_modules/@spark/guideact/types/something/class/Candy';
const aniClass = {
"BoomAni": BoomAni,
......@@ -464,7 +463,7 @@ export default class MainScene extends Scene {
} else {
this.soundBtn.source = "mainSoundBtnOff_png"
}
if (getBgOn()) {
if (getSoundOn()) {
this.musicBtn.source = "mainMusicBtnOn_png";
stopBg();
playGameBg();
......@@ -1009,7 +1008,7 @@ export default class MainScene extends Scene {
onTap_musicBtn() {
// toggleBg();
toggleGameBg();
if (getBgOn()) {
if (getSoundOn()) {
this.musicBtn.source = "mainMusicBtnOn_png"
} else {
this.musicBtn.source = "mainMusicBtnOff_png"
......
......@@ -13,8 +13,7 @@ import { loadSvga } from "../loadSvga";
import { getlogItem } from "../Main";
import setGlow from "../setGlow";
import setGray from "../setGray";
import { getBgOn, getSoundOn, playBg, toggleBg, toggleSound } from "../soundCtrl";
import { stopGamebg } from "../soundCtrl2";
import {getSoundOn, playBg, toggleBg, toggleSound } from "../soundCtrl";
import Utils from "../Utils";
import AvatarComp from "./AvatarComp";
import CountDown from "./CountDown";
......@@ -48,55 +47,15 @@ export default class MapScene extends Scene {
private inviteTimer: egret.Timer;
private cutTime: number;
pic:egret.Bitmap;
async start(data?) {
super.start();
// 请求首页banner 由于卡顿问题,暂时去掉
// window['bridge'] && window['bridge']["showGamerAd"] && window['bridge']["showGamerAd"](window["TTIndexBanner"], 5)
//新增icon,还有埋点
this["wuhanGroup"].visible = false;
this["tuiaGroup"].visible = false;
this["newTuiaGroup"].visible = false;
const configData = DataManager.ins.getData('getConfig')
const configDetData = configData.data.list ? configData.data.list : configData.data
let iconConfigData = configDetData.filter(item => item.id === 1)
if (iconConfigData.length) {
const index = iconConfigData[0].index
switch (index) {
case 2:
this["wuhanGroup"].visible = true;
NetManager.ins.showLog(getlogItem(14))
this["wuhanGroup"].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(14))
handleInspireVideo(s => {
if (s) {
Loading.instace.show();
NetManager.ins.getIconAward(succ => {
Loading.instace.hide();
if (succ) {
PanelCtrl.instance.show("DailyIconPrizePanel");
} else {
showToast("领取失败");
}
})
} else {
showToast("广告未成功观看,无法领取奖励");
}
}, () => {
NetManager.ins.getIconAward(() => { })
}, window["slotidIcon"], 1, true)
}, this)
break;
case 1:
this.bindTuiaActivity(this["tuiaGroup"]);
break;
case 0:
await loadSvga(getResPath() + 'resource/assets/svgas/newTuiaIcon.svga', this['newTuiaGroup']);
this.bindTuiaActivity(this["newTuiaGroup"]);
break;
}
}
// PanelCtrl.instance.show('RedBombAlert');
// NetManager.ins.hc_submit(()=>{
// // const submitData = DataManager.ins.getData('hc_submit').data;
......@@ -104,10 +63,10 @@ export default class MapScene extends Scene {
// },1,1,'','')
//隐藏一些icon 为了下面那些去掉
var icons = ["adBtn"]
for (var i = 0; i < icons.length; i++) {
this[icons[i]].visible = false;
}
// var icons = ["adBtn"]
// for (var i = 0; i < icons.length; i++) {
// this[icons[i]].visible = false;
// }
this.updateMyInfo();
......@@ -115,14 +74,7 @@ export default class MapScene extends Scene {
// this.updateAdData();
GDispatcher.dispatchEvent("getInviteInfo"); // 查询邀请信息,控制邀请有礼角标
this['avatar'].mask = this['avatarMask'];
if (getBgOn() && MapScene['firstPlayBgTag'] == true) {
playBg();
}
stopGamebg();
// this['avatar'].mask = this['avatarMask'];
NetManager.ins.getSignInfo(() => {
const panels = [];
const date = new Date();
......@@ -176,8 +128,8 @@ export default class MapScene extends Scene {
//滚动的背景变黑
this['rectbg'].height = this.stage.stageHeight;
//进度条的遮罩
this['progressfront'].mask = this['rect'];
this['rect'].scaleX = 0.5
// this['progressfront'].mask = this['rect'];
// this['rect'].scaleX = 0.5
//进度条文本发光
// setGlow(this['totalStarTxt'], 0x0083e8, 1);
......@@ -256,15 +208,6 @@ export default class MapScene extends Scene {
PanelCtrl.instance.show(startPanelType, data.level)
}
this.stage.once(egret.TouchEvent.TOUCH_TAP, () => {
if (!MapScene['firstPlayBgTag']) {
if (getBgOn()) {
playBg();
}
MapScene['firstPlayBgTag'] = true;
}
}, this);
let lastOrder = homeData.levels.length + 1;
if (homeData.levels.length >= window['total_level'])
lastOrder = window['total_level'];
......@@ -285,42 +228,6 @@ export default class MapScene extends Scene {
this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
}
bindTuiaActivity(btn) {
btn.visible = true;
NetManager.ins.showLog(getlogItem(13))
btn.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(13))
this['tuiaRewardMark'] = false;
NetManager.ins.getTuiaAd(() => {
Loading.instace.show();
NetManager.ins.getIconAward((succ, ress) => {
Loading.instace.hide();
if (succ) {
PanelCtrl.instance.show("DailyIconPrizePanel");
//如果次数没了就隐藏icon
if (!ress.data.remainAwardTimes) {
btn.visible = false;
}
} else {
showToast("领取失败");
}
})
this['tuiaRewardMark'] = true;
//关闭弹框
// window['TAIsdk'].iframeNode.remove()
// setTimeout(function () {
// window['TAIsdk'].iframeNode.src = ''
// })
// window['TAIsdk'].closeBtn.style.display = 'none'
}, () => {
// 关闭激励互动的时候重新请求首页banner 由于卡顿问题,暂时去掉
// window['bridge'] && window['bridge']["showGamerAd"] && window['bridge']["showGamerAd"](window["TTIndexBanner"], 5)
//上面没回调过。就显示toast
if (!this['tuiaRewardMark']) showToast("活动未完成,无法领取奖励");
}, window["TAInspireAct"])
}, this)
}
onAllPanelHide = () => {
/* 红包雨引导,去掉
......@@ -354,6 +261,7 @@ export default class MapScene extends Scene {
}
updateMyInfo() {
return;
this['avatar'].visible = true;
this['nameTxt'].text = '';
......@@ -362,7 +270,6 @@ export default class MapScene extends Scene {
//注意dcustom里大小写
var nickName = getUrl("nickname");
if (nickName) this['nameTxt'].text = getNick(nickName);
}
updateSign() {
......@@ -376,6 +283,7 @@ export default class MapScene extends Scene {
}
updateAdData() {
return;
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
let { mapAdvert } = hc_advert;
if (mapAdvert == null)
......@@ -471,6 +379,7 @@ export default class MapScene extends Scene {
}
updateBox() {
return;
const homeData = getHomeData();
if (homeData.canReceiveTreasureBoxNum <= 0)
setGray(this['box']);
......@@ -538,22 +447,22 @@ export default class MapScene extends Scene {
updateTimerView() {
//更新倒计时
if (this._countDown == null) {
this._countDown = new CountDown(this['countdown']);
}
// if (this._countDown == null) {
// this._countDown = new CountDown(this['countdown']);
// }
const data = getHomeData();
if (data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
this._countDown.stop();
this['fullTxt'].visible = true;
this['countdown'].visible = false;
} else {
const left = data.refectionCountdown - Math.floor(new Date().getTime() / 1000);
this._countDown.reset(left);
this['countdown'].visible = true;
this['fullTxt'].visible = false;
}
this['bloodTxt'].text = `${data.remainEnargy}`;
// if (data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
// this._countDown.stop();
// this['fullTxt'].visible = true;
// this['countdown'].visible = false;
// } else {
// const left = data.refectionCountdown - Math.floor(new Date().getTime() / 1000);
// this._countDown.reset(left);
// this['countdown'].visible = true;
// this['fullTxt'].visible = false;
// }
this['bloodTxt'].text = `${data.remainEnargy}`;
}
loadsvga(res) {
......@@ -581,6 +490,7 @@ export default class MapScene extends Scene {
* 查询邀请信息
*/
getInviteInfo() {
return;
const hc_advert = DataManager.ins.getData('hc_advert').data || {};
const { mapAdvert } = hc_advert;
// tslint:disable-next-line: cyclomatic-complexity
......@@ -671,6 +581,7 @@ export default class MapScene extends Scene {
// 倒计时
private inviteCutTimer() {
return;
const timer = this.convertTime(this.cutTime -= 1000);
if (timer.hour === "00"
&& timer.min === "00"
......@@ -713,37 +624,39 @@ export default class MapScene extends Scene {
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this)
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this)
this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this)
this['bloodBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_bloodBtn, this)
this['settingBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.toggleSettings, this)
this['shopBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_shopBtn, this)
this['questionBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this);
this['box'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boxLayer, this);
this['boxani'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_box, this);
this['soundBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_sound, this);
this['soundOffBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_sound, this);
this['musicOffBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
this['musicBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
this['recordBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
PanelCtrl.instance.show('bag');
}, this);
// this['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this)
// this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this)
this['signGroup'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this)
// this['bloodBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_bloodBtn, this)
// this['settingBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.toggleSettings, this)
// this['shopBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_shopBtn, this)
// this['questionBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_questionBtn, this);
// this['box'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_boxLayer, this);
// this['boxani'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_box, this);
this['soundbtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_sound, this);
// this['stopsoundimg'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_sound, this);
// this['musicOffBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
// this['musicBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_music, this);
// this['recordBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
// PanelCtrl.instance.show('bag');
// }, this);
// 消消乐查询信息
// GDispatcher.addEvent('getInviteInfo', this.getInviteInfo, this);
this["rankGroup"].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onTap_friendBtn,this);
this["turnGroup"].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onTap_turnGroup,this);
this["exchangebtn"].addEventListener(egret.TouchEvent.TOUCH_TAP,this.onTap_exchangeBtn,this);
}
initSound() {
this['soundBtn'].visible = getSoundOn();
this['soundOffBtn'].visible = !getSoundOn();
this['musicBtn'].visible = getBgOn();
this['musicOffBtn'].visible = !getBgOn();
this['opensoundimg'].visible = getSoundOn();
this['stopsoundimg'].visible = !getSoundOn();
}
onTap_sound() {
this['soundBtn'].visible = !this['soundBtn'].visible;
this['soundOffBtn'].visible = !this['soundOffBtn'].visible;
this['opensoundimg'].visible = !this['opensoundimg'].visible;
this['stopsoundimg'].visible = !this['stopsoundimg'].visible;
toggleSound();
}
......@@ -935,6 +848,15 @@ export default class MapScene extends Scene {
});
})
}
//打开转盘
onTap_turnGroup(){
console.log("打开转盘");
}
//兑换
onTap_exchangeBtn(){
console.log("打开兑换");
}
}
export const getNick = (nickname, max = 4) => {
if (!nickname) return nickname;
......
......@@ -18,7 +18,6 @@ import { HairballBlackState } from "../states/HairballBlackState";
import { Tool } from "../Tool";
import { FestivalEle } from "./FestivalEle";
import {loadImageByUrl} from "../../../libs/new_wx/loadSpriteSheet";
/**
* 考虑到底继承白鹭的啥Component还是Container
* 坐标原点需要坐落在格子的中心点
......@@ -173,12 +172,10 @@ export class Element extends eui.Component {
async changeSource(source: string) {
// this.showImage.source = source;
var texture: egret.Texture;
texture = RES.getRes(source);
if(this.type==ElementType.BLIND_BOX){
texture = await loadImageByUrl("//yun.duiba.com.cn/aurora/assets/730048e95b89906c3a8076b88910ab272bc47d6f.jpeg");
}else{
texture = RES.getRes(source);
console.error('盲盒的',source,texture);
}
this.showImage.texture = texture
this.showImage.x = -texture.textureWidth / 2;
......
import { loadImageByUrl } from "../../../libs/new_wx/loadSpriteSheet";
import setGray from "../../setGray";
import Utils, { CouponJoinScene } from "../../Utils";
import { CurScoreNum } from "./CurScoreNum";
......@@ -127,29 +128,22 @@ export class ScoreProgress {
let starboxwid = 50;
let starboxhei = 50;
let starboxy = 25;
let starbox1x = 423;
let starbox2x = 498;
let starbox3x = 573;
this.starbox1 = new eui.Image();
this.starbox1.width = starboxwid;
this.starbox1.height = starboxhei;
p.addChild(this.starbox1);
this.starbox1.x = starbox1x;//-starboxwid/2;
this.starbox1.y = starboxy;
this.starbox2 = new eui.Image();
this.starbox2.width = starboxwid;
this.starbox2.height = starboxhei;
p.addChild(this.starbox2);
this.starbox2.x = starbox2x;//-starboxwid/2;
this.starbox2.y = starboxy;
this.starbox3 = new eui.Image();
this.starbox3.width = starboxwid;
this.starbox3.height = starboxhei;
p.addChild(this.starbox3);
this.starbox3.x = starbox3x;//-starboxwid/2;
this.starbox3.y = starboxy;
......@@ -169,16 +163,11 @@ export class ScoreProgress {
starbox2: eui.Image;
starbox3: eui.Image;
box1wid = 50;
box1hei = 50;
box2wid = 70;
box2hei = 70;
sbox1x = 423;
sbox2x = 498;
sbox3x = 573;
starwid = 46;
sboxy = 50;
sboxy = 35;
updateStarBox(data) {
this.starboxdata = data;
......@@ -196,17 +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 = await loadImageByUrl(texurl);
// 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.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;
if(data==0){
setGray(sp);
}else{
sp.filters = [];
}
if (data == 1) {
if (!this["s" + (idx + 1) + "havetween"]) {
this["s" + (idx + 1) + "havetween"] = true;
......
......@@ -19,9 +19,9 @@ let loading = false;
export const getSoundOn = () => {
return soundOn
}
export const getBgOn = () => {
return bgOn
}
// export const getBgOn = () => {
// return bgOn
// }
export const toggleSound = () => {
soundOn = !soundOn;
......
import { getBgOn, toggleBgStatus } from "./soundCtrl";
import { getSoundOn, toggleBgStatus } from "./soundCtrl";
let bgChannel: egret.SoundChannel;
let loading = false;
export const toggleGameBg = () => {
toggleBgStatus();
const bgOn=getBgOn();
const bgOn=getSoundOn();
if (bgChannel) {
if (!bgOn) {
bgChannel.stop();
......
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