Commit 22ada2f7 authored by wildfirecode's avatar wildfirecode

1

parent c298fb08
......@@ -137,6 +137,7 @@ export default class MainBase extends eui.UILayer {
if (!window['development'])
RES.getResAsync(`common_json`);
else {
RES.getResAsync('main_mapbottom_png');
RES.getResAsync('lightani_png');
for (var i = 1; i < 19; i++) {
RES.getResAsync("boom" + i + "_png")
......
......@@ -71,6 +71,10 @@
{
"keys": "startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_ice1_png,startpanel_ele6_png,startpanel_block2_png",
"name": "startpanel"
},
{
"name": "preload",
"keys": "main_mapbottom_png"
}
],
"resources": [
......@@ -1608,6 +1612,11 @@
"url": "assets/startpanel2/startpanel_ice1.png",
"type": "image",
"name": "startpanel_ice1_png"
},
{
"name": "main_mapbottom_png",
"type": "image",
"url": "assets/mainScene/main_mapbottom.png"
}
]
}
\ No newline at end of file
......@@ -34,7 +34,7 @@
</e:skinName>
</e:Button>
<e:Label id="bloodTxt" text="你的可用体力值为:5" y="306" horizontalCenter="0" textColor="0xe2701b"/>
<e:Label text="使用钻石购买" y="524" textColor="0x821818" size="27" x="228"/>
<e:Label text="使用元宝购买" y="524" textColor="0x821818" size="27" x="228"/>
<e:Label text="向好友索要体力" y="663" textColor="0x821818" size="27" x="232"/>
<e:Label id="invitTxt" text="(已领0/1)" y="699" textColor="0x821818" size="27" x="232"/>
<e:Label id="price1Txt" text="20" y="565" textColor="0x821818" x="274" size="27"/>
......
......@@ -49,7 +49,12 @@ import { NetManager } from './../../libs/tw/manager/NetManager';
import { Buried } from './../../libs/tw/util/Buried';
import { GuideMsg } from '../something/uis/GuideMsg';
import { readCache, getCacheKey } from '../mapScene/GuideCon';
// tslint:disable: no-var-keyword
// tslint:disable: prefer-const
// tslint:disable: cyclomatic-complexity
// tslint:disable: prefer-for-of
// tslint:disable: only-arrow-functions
// tslint:disable: no-inferrable-types
const aniClass = {
"BoomAni": BoomAni,
"IceAni": IceAni,
......@@ -256,10 +261,19 @@ export default class MainScene extends Scene {
this.initElement();
//设置栏置顶
this.addChild(this["settingAll"])
//如果是棒棒糖关卡,那么在地图底部增加棒棒糖洞
if(this.chapterData.passTarget.type==PassType.ELEMENT_TARGET) {
const elements = this.chapterData.passTarget.elements;
if(elements[0].type==ElementType.LOLLIPOP)
this.drawLollipopHole();
}
//引导提示
var guideImageNum: number;
// 15678是操作引导
// 234是道具引导
if (this.chapter <= 5) {
guideImageNum = this.chapter;
}
......@@ -313,6 +327,22 @@ export default class MainScene extends Scene {
}, this)
// this.addChild(sucess)
}
private drawLollipopHole(){
const texture: egret.Texture = RES.getRes('main_mapbottom_png');
const imgs = new egret.DisplayObjectContainer;
for (const key in this.endRowNumHash) {
const index = this.endRowNumHash[key].index;
const img = new eui.Image(texture);
const[x,y]=Tool.getPositionByIndex(index);
img.x=x;
img.y=y;
imgs.addChild(img);
}
imgs.x = -Tool.width / 2;
imgs.y = Tool.height / 2-10;
imgs.cacheAsBitmap=true;
this.map.addChildAt(imgs,0);
}
/**
* 加载所有用到的svga
*/
......@@ -394,7 +424,7 @@ export default class MainScene extends Scene {
stopBg();
// setGameBgStatus(false);
}
//初始化道具信息
//初始化道具信息
var arrObj = ["boomBtnNum", "hammerBtnNum", "stepBtnNum"];
var nums = [getPropNums(PropType.BOOM), getPropNums(PropType.HAMMER), getPropNums(PropType.CHANCE_NUM)]
for (var i = 0; i < 3; i++) {
......@@ -530,7 +560,9 @@ export default class MainScene extends Scene {
}
}
endRowNumHash ;
initLattices() {
this.endRowNumHash = {};
var latticesD = this.chapterData.map.lattices;
var generateLats = this.chapterData.map.generateLats;
//先格子
......@@ -539,6 +571,13 @@ export default class MainScene extends Scene {
if (!latticesD[i]) continue;
//记录最下一层的行数
var rc = Tool.indexToRc(i);
const[row,col]=rc;
if(this.endRowNumHash[col] == null) {
this.endRowNumHash[col] = {row:row,index:i};
}
if(row > this.endRowNumHash[col].row) {
this.endRowNumHash[col] = {row:row,index:i};
}
this.endRowNum = rc[0] > this.endRowNum ? rc[0] : this.endRowNum;
this.lattices[i] = Pool.takeOut(RecoverName.LATTICE);
if (!this.lattices[i]) {
......@@ -561,6 +600,7 @@ export default class MainScene extends Scene {
ice.y = p[1] - 81 / 2;
}
}
console.log(this.endRowNumHash);
//设置生成口
this.generateIndexs = Tool.setGenerateLats(this.lattices, generateLats)
//联通口
......
{
"code":"E100202007",
"success":false
"success":true
}
\ No newline at end of file
......@@ -361,20 +361,20 @@
"remainProp": [
{
"type": 2,
"num": 0
"num": 10
},
{
"type": 3,
"num": 0
"num": 10
},
{
"type": 4,
"num": 0
"num": 10
}
],
"remainEnargy": 9979,
"askForEnergy": false,
"canReceiveTreasureBoxNum": 0,
"canReceiveTreasureBoxNum": 10,
"nextRangeStarsNum": 150
}
}
\ 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