Commit a8b84604 authored by 邱旭's avatar 邱旭

1

parent 011cc831
......@@ -331,6 +331,9 @@ export default class MainBase extends eui.UILayer {
for (var i = 0; i <= 9; i++) {
RES.getResAsync("propNum" + i + "_png")
}
RES.getResAsync("propNum" + "第" + "_png");
RES.getResAsync("propNum" + "关" + "_png");
// for (var i = 1; i <= 5; i++) {
// RES.getResAsync("guideTxt" + i + "_png")
// }
......
......@@ -97,7 +97,7 @@
"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",
"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,propNum第_png,propNum关_png",
"name": "main2"
},
{
......@@ -239,10 +239,6 @@
{
"keys": "help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png",
"name": "helpGroup"
},
{
"keys": "help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_invite2_text3_png,help_invite2_text4_png,commom_prop_bg2_png,turnprize_icon12_png,turnprize_icon22_png,turnprize_icon32_png,recharge_icon2_png,turntabletit_png,turntable_paneldi_png,turntable_paneldi2_png,turntabletit2_png,sign_mask_png,signitemno_png,signitemyes_png,choujiang_png,itembg_png,bloodhert_png,blooduan_png,blooduanm_png",
"name": "preload"
}
],
"resources": [
......@@ -5163,29 +5159,29 @@
"name": "taskPrize_chuizi_png"
},
{
"name": "choujiang_png",
"url": "assets/blood/choujiang.png",
"type": "image",
"url": "assets/blood/choujiang.png"
"name": "choujiang_png"
},
{
"name": "itembg_png",
"url": "assets/blood/itembg.png",
"type": "image",
"url": "assets/blood/itembg.png"
"name": "itembg_png"
},
{
"name": "bloodhert_png",
"url": "assets/blood/bloodhert.png",
"type": "image",
"url": "assets/blood/bloodhert.png"
"name": "bloodhert_png"
},
{
"name": "blooduan_png",
"url": "assets/blood/blooduan.png",
"type": "image",
"url": "assets/blood/blooduan.png"
"name": "blooduan_png"
},
{
"name": "blooduanm_png",
"url": "assets/blood/blooduanm.png",
"type": "image",
"url": "assets/blood/blooduanm.png"
"name": "blooduanm_png"
},
{
"url": "assets/invite/cutTime/invateCut_bg.png",
......@@ -5231,6 +5227,16 @@
"url": "assets/mainScene/lef.png",
"type": "image",
"name": "lef_png"
},
{
"url": "assets/mainScene/propNum第.png",
"type": "image",
"name": "propNum第_png"
},
{
"url": "assets/mainScene/propNum关.png",
"type": "image",
"name": "propNum关_png"
}
]
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
</w:Declarations>
<e:Image x="0" y="0" source="playSceneBg_jpg"/>
<e:Image y="245" source="targetBoard_png" x="174"/>
<e:Image y="247" source="targetBoard_png" x="174"/>
<e:Image y="0" source="progressDown_png" horizontalCenter="0"/>
<e:Image id="starProgress" x="131" y="201.85" source="starProgress_png"/>
<e:Image x="69" y="-1.15" source="stepsBoard_png"/>
......@@ -46,6 +46,7 @@
<e:Image id="progressmask2" y="9.14" x="16" source="mask2_png" width="444" height="60" scaleX="1" visible="false"/>
</e:Group>
</e:Group>
<e:BitmapLabel width="20" height="20" x="531" y="132"/>
......
......@@ -435,8 +435,8 @@ export default class MainScene extends Scene {
initUi() {
//第几关
var chapterTxt = new ChapterNum();
chapterTxt.num = this.chapter >> 0;
chapterTxt.x = 542;
chapterTxt.num = `第${this.chapter}关` // >> 0;
chapterTxt.x = 500;
chapterTxt.y = 148
this.addChild(chapterTxt)
//步数
......
/**
* 位图数字,单个
*/
......@@ -11,14 +10,15 @@ export class BitmapNumber extends egret.Bitmap {
/**
* 数字0到9
*/
private _num: number;
get num(): number {
private _num: number | string;
get num(): number | string {
return this._num
}
set num(value: number) {
if (value == this._num) return;
set num(value: number | string) {
if(value == this._num) return;
this._num = value;
var texture: egret.Texture = RES.getRes(this.resName + value+"_png");
var texture: egret.Texture = RES.getRes(this.resName + value + "_png");
this.texture = texture;
}
......
......@@ -12,15 +12,29 @@ export class ChapterNum extends egret.DisplayObjectContainer {
/**
* 数字
*/
private _num: number;
get num(): number {
private _num: string | number;
get num(): string | number {
return this._num
}
set num(value: number) {
private returnTO(str: string | number) {
var length = str.toString().length;
var arr = [];
for(let i = 0; i < length; i++) {
arr[i] = str[i]
}
return arr;
}
set num(value: string | number) {
if(value == this._num) return;
this._num = value;
var arr = Tool.returnTO(value);
// var arr = Tool.returnTO(value);
var arr = this.returnTO(value);
//位数从小到大add,
for(var i = 0; i < arr.length; i++) {
if(this.$children[i]) {
......@@ -53,7 +67,7 @@ export class ChapterNum extends egret.DisplayObjectContainer {
constructor() {
super();
this.num = 0;
this.num = '0';
}
/**
......@@ -61,11 +75,18 @@ export class ChapterNum extends egret.DisplayObjectContainer {
*/
center() {
//按顺序排,从右到左,
var len = this.$children.length;
var w = this.$children[0]["texture"].textureWidth - 2;
var right = len / 2 * w - w;
for(var i = 0; i < this.$children.length; i++) {
this.$children[i].x = right - w * i;
}
let _x = 0;
this.$children.forEach((v) => {
v.x = _x;
_x += v.width;
});
// var len = this.$children.length;
// var w = this.$children[0]["texture"].textureWidth - 2;
// var right = len / 2 * w - w;
// for(var i = 0; i < this.$children.length; i++) {
// this.$children[i].x = right - w * i;
// }
}
}
\ 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