Commit 51bb863b authored by zjz1994's avatar zjz1994

地图优化,红包炸弹调整

parent 4962aa7d
......@@ -228,7 +228,7 @@
<script>
window['SAUP'] = {
sendLogData: (click,p) => {
console.log('发送买点',p.sapmodid,p.eleid)
// console.log('发送买点',p.sapmodid,p.eleid)
}
}
</script>
......
......@@ -9,7 +9,7 @@ export default ([sapmodid, eleid], saData = {}) => {
try {
elem.setAttribute('sa-data', JSON.stringify(saData));
if (window['SAUP'] && window['SAUP'].sendLogData) {
console.log('发送埋点',sapmodid,eleid)
// console.log('发送埋点',sapmodid,eleid)
window['SAUP'].sendLogData("click", {
tag: elem,   // 必传;如果需要传拓展的信息,在tag中加一个sa-data,将需要传的内容用json格式传到sa-data
sapmodid: sapmodid,    // 必传;区块编码
......
......@@ -1732,15 +1732,25 @@ export default class MapScene extends Scene {
var i0level = i0+1;
var icon = this.getInShowIconByLevel(i0level);
if(icon&&icon.parent){
keys.push(icon.parent);
const p = (icon.localToGlobal(0, 0));
const pic = createRedBagIcon(this);
pic.visible = false;
pic['__p2__'] = p;
pic['__icon__'] = icon;
p.x += 50;
p.y += 25;
pics.push(pic);
//另加判断当前是否有显示
var scrollv = this.scroll.viewport.scrollV;
var stageheight = this.stage.stageHeight;
var showy0 = scrollv;
var showy1 = scrollv+stageheight;
var icony = icon.y+icon.parent.y;
var offsety = 100;
//在显示范围内
if(icony+offsety>showy0&&icony-offsety<showy1){
keys.push(icon.parent);
const p = (icon.localToGlobal(0, 0));
const pic = createRedBagIcon(this);
pic.visible = false;
pic['__p2__'] = p;
pic['__icon__'] = icon;
p.x += 50;
p.y += 25;
pics.push(pic);
}
}
}
// console.log(keys);
......
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