Commit 9804c4c5 authored by zjz1994's avatar zjz1994

新元素暂存

parent df3bf886
...@@ -7066,7 +7066,7 @@ export default class MainScene extends Scene { ...@@ -7066,7 +7066,7 @@ export default class MainScene extends Scene {
} }
} }
} }
console.log("判断有无食物"); // console.log("判断有无食物");
return isInfood; return isInfood;
} }
} }
\ No newline at end of file
...@@ -331,7 +331,7 @@ export default class MapScene extends Scene { ...@@ -331,7 +331,7 @@ export default class MapScene extends Scene {
if (homeData.levels.length >= window['total_level']) if (homeData.levels.length >= window['total_level'])
lastOrder = window['total_level']; lastOrder = window['total_level'];
this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight); this.scroll.viewport.scrollV = this.getScrollV(lastOrder, this.stage.stageHeight);
console.log("滚动设置",lastOrder,this.scroll.viewport.scrollV); // console.log("滚动设置",lastOrder,this.scroll.viewport.scrollV);
this.setScrollVShow(); this.setScrollVShow();
// console.log('地图数据-----',this._data); // console.log('地图数据-----',this._data);
// this.topPart = this._data.top; // this.topPart = this._data.top;
...@@ -852,7 +852,7 @@ export default class MapScene extends Scene { ...@@ -852,7 +852,7 @@ export default class MapScene extends Scene {
mappart.getTxt(i).text = levelOrder + ''; mappart.getTxt(i).text = levelOrder + '';
if(levelOrder>last_level){ if(levelOrder>last_level){
if(havewater_light){ if(havewater_light){
console.log("当前关卡,移除water_light",levelOrder); // console.log("当前关卡,移除water_light",levelOrder);
icon.removeChild(this.pic); icon.removeChild(this.pic);
} }
(icon['nums'] as eui.Image).source = 'icongray_png'; (icon['nums'] as eui.Image).source = 'icongray_png';
...@@ -862,7 +862,7 @@ export default class MapScene extends Scene { ...@@ -862,7 +862,7 @@ export default class MapScene extends Scene {
setGray(icon); setGray(icon);
}else if(levelOrder<homeData.levels.length+1){ }else if(levelOrder<homeData.levels.length+1){
if(havewater_light){ if(havewater_light){
console.log("当前关卡,移除water_light",levelOrder); // console.log("当前关卡,移除water_light",levelOrder);
icon.removeChild(this.pic); icon.removeChild(this.pic);
} }
icon.filters = null; icon.filters = null;
...@@ -881,7 +881,7 @@ export default class MapScene extends Scene { ...@@ -881,7 +881,7 @@ export default class MapScene extends Scene {
(icon['starsp'] as MapStarComp).setStar(0); (icon['starsp'] as MapStarComp).setStar(0);
(icon['starsp'] as MapStarComp).visible = true; (icon['starsp'] as MapStarComp).visible = true;
if(!havewater_light){ if(!havewater_light){
console.log(icon,this.pic); // console.log(icon,this.pic);
this.pic.x = 50; this.pic.x = 50;
this.pic.y = 37+7; this.pic.y = 37+7;
icon.addChildAt(this.pic,1); icon.addChildAt(this.pic,1);
...@@ -894,7 +894,7 @@ export default class MapScene extends Scene { ...@@ -894,7 +894,7 @@ export default class MapScene extends Scene {
alpha:1 alpha:1
}) })
.to({ scaleX: 2, scaleY: 2, alpha: 0 }, 1000).wait(1000); .to({ scaleX: 2, scaleY: 2, alpha: 0 }, 1000).wait(1000);
console.log("当前关卡,添加water_light",levelOrder,this.pic); // console.log("当前关卡,添加water_light",levelOrder,this.pic);
} }
}else{ }else{
icon.filters = null; icon.filters = null;
...@@ -902,7 +902,7 @@ export default class MapScene extends Scene { ...@@ -902,7 +902,7 @@ export default class MapScene extends Scene {
(icon['bmptxt'] as eui.BitmapLabel).visible = false; (icon['bmptxt'] as eui.BitmapLabel).visible = false;
(icon['starsp'] as MapStarComp).visible = false; (icon['starsp'] as MapStarComp).visible = false;
if(havewater_light){ if(havewater_light){
console.log("当前关卡,移除water_light",levelOrder); // console.log("当前关卡,移除water_light",levelOrder);
icon.removeChild(this.pic); icon.removeChild(this.pic);
} }
} }
...@@ -941,7 +941,7 @@ export default class MapScene extends Scene { ...@@ -941,7 +941,7 @@ export default class MapScene extends Scene {
//用户关卡数据更新,更行map //用户关卡数据更新,更行map
freshMapShow(){ freshMapShow(){
console.log("刷新显示"); // console.log("刷新显示");
var topltxt = this.maptoppart.getIcon(0)['bmptxt'] as eui.BitmapLabel; var topltxt = this.maptoppart.getIcon(0)['bmptxt'] as eui.BitmapLabel;
var onepltxt = this.onemapreppart.getIcon(0)['bmptxt'] as eui.BitmapLabel; var onepltxt = this.onemapreppart.getIcon(0)['bmptxt'] as eui.BitmapLabel;
var twopltxt = this.twomapreppart.getIcon(0)['bmptxt'] as eui.BitmapLabel; var twopltxt = this.twomapreppart.getIcon(0)['bmptxt'] as eui.BitmapLabel;
...@@ -965,7 +965,7 @@ export default class MapScene extends Scene { ...@@ -965,7 +965,7 @@ export default class MapScene extends Scene {
} }
//点击 //点击
clickIcon(e){ clickIcon(e){
console.log(e); // console.log(e);
if(e.target.name!='water_light'){ if(e.target.name!='water_light'){
let icon = e.target as eui.Group; let icon = e.target as eui.Group;
let txt = icon['bmptxt'] as eui.BitmapLabel; let txt = icon['bmptxt'] as eui.BitmapLabel;
...@@ -1138,14 +1138,14 @@ export default class MapScene extends Scene { ...@@ -1138,14 +1138,14 @@ export default class MapScene extends Scene {
var repeatnum = Math.abs((total_level-maptop_level-mapbot_level)/maprep_level) var repeatnum = Math.abs((total_level-maptop_level-mapbot_level)/maprep_level)
const y0 = this.mapbotpart.y; const y0 = this.mapbotpart.y;
console.log("底部scroll",y0) // console.log("底部scroll",y0)
lastOrder = lastOrder - repeatnum * MapRpeatPart.LEVEL_NUMS - 7; lastOrder = lastOrder - repeatnum * MapRpeatPart.LEVEL_NUMS - 7;
if(lastOrder<1){ if(lastOrder<1){
lastOrder = 1; lastOrder = 1;
}else if(lastOrder>3){ }else if(lastOrder>3){
lastOrder = 3; lastOrder = 3;
} }
console.log("底部scroll",lastOrder); // console.log("底部scroll",lastOrder);
var maptop_height = 1275; var maptop_height = 1275;
var maprep_height = 2297; var maprep_height = 2297;
var mapbot_height = 528; var mapbot_height = 528;
...@@ -1157,7 +1157,7 @@ export default class MapScene extends Scene { ...@@ -1157,7 +1157,7 @@ export default class MapScene extends Scene {
const ylist = [62, 176, 314].map(i => i + 40); const ylist = [62, 176, 314].map(i => i + 40);
const targetY = y0 + ylist[lastOrder - 1] - stageHeight / 2; const targetY = y0 + ylist[lastOrder - 1] - stageHeight / 2;
console.log("底部scroll",targetY,totalHeight,stageHeight,repeatnum); // console.log("底部scroll",targetY,totalHeight,stageHeight,repeatnum);
if (targetY >= (totalHeight - stageHeight)) return totalHeight - stageHeight; if (targetY >= (totalHeight - stageHeight)) return totalHeight - stageHeight;
return targetY; return targetY;
} }
...@@ -1231,7 +1231,7 @@ export default class MapScene extends Scene { ...@@ -1231,7 +1231,7 @@ export default class MapScene extends Scene {
addAvatar(level, ele?) { addAvatar(level, ele?) {
const item = this.getInShowIconByLevel(level); const item = this.getInShowIconByLevel(level);
console.log('地图页头像',level,item); // console.log('地图页头像',level,item);
if(item){ if(item){
const parent = item; const parent = item;
var avatarname:string = "avatarank"; var avatarname:string = "avatarank";
......
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