Commit a8279b28 authored by zjz1994's avatar zjz1994

优化map暂存

parent 4c007df4
......@@ -57,6 +57,10 @@ export default class MapScene extends Scene {
private icons = {};
private actIcon: ActIcon = null;
maptoppart:MapTopPart;
onemapreppart:MapRpeatPart;
twomapreppart:MapRpeatPart;
mapbotpart:MapBottomPart;
private sendInvite(panels: any[], parmas: any[]) {
const code = Utils.getRequestByKey('shareCode') || Utils.getRequestByKey('token');//0224新加用token取一边
if (!code) return false;
......@@ -249,6 +253,18 @@ export default class MapScene extends Scene {
//进度条文本发光
setGlow(this['totalStarTxt'], 0x0083e8, 1);
//新地图创建
var total_level = window['total_level'];
var maptop_level = MapTopPart.LEVEL_NUMS;
var maprep_level = MapRpeatPart.LEVEL_NUMS;
var mapbot_level = MapBottomPart.LEVEL_NUMS;
var maptop_height =
console.log('地图数据-----',this._data);
this.topPart = this._data.top;
this.repeatsPart = this._data.list;
this.bottomPart = this._data.bottom;
......@@ -328,6 +344,10 @@ export default class MapScene extends Scene {
constructor(data?){
super();
this._data = data;
this.maptoppart = new MapTopPart();
this.onemapreppart = new MapRpeatPart();
this.twomapreppart = new MapRpeatPart();
this.mapbotpart = new MapBottomPart();
this.once(egret.Event.ADDED_TO_STAGE,this.initMapScene,this);
}
......@@ -617,7 +637,8 @@ export default class MapScene extends Scene {
// loadFireworks();
this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
// this.scroll.addEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
this.scroll.addEventListener(egret.Event.CHANGE, this.onEnterFrame, this);
}
onAllPanelHide = () => {
......@@ -645,7 +666,7 @@ export default class MapScene extends Scene {
const offset = 0;
const y0 = this.scroll.viewport.scrollV + offset;
const y1 = this.stage.stageHeight + this.scroll.viewport.scrollV - offset;
// console.log(y0, y1);
console.log(y0, y1);
let count = 0;
for (const key in MapScene.iconHash) {
const icon = MapScene.iconHash[key];
......
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