Commit b56b7f3a authored by wildfirecode's avatar wildfirecode

1

parent e6efb93b
...@@ -196,7 +196,7 @@ export default class MapScene extends Scene { ...@@ -196,7 +196,7 @@ export default class MapScene extends Scene {
if(!element.hasEventListener(egret.TouchEvent.TOUCH_TAP)){ if(!element.hasEventListener(egret.TouchEvent.TOUCH_TAP)){
element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => { element.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
if ( if (
(levelOrder > (homeData.levels.length + 1) && levelOrder > 1) (levelOrder > (getHomeData().levels.length + 1) && levelOrder > 1)
|| (levelOrder > window['last_level']) || (levelOrder > window['last_level'])
) { ) {
// showToast('必须通关前面的关卡才能开启本关'); // showToast('必须通关前面的关卡才能开启本关');
...@@ -354,6 +354,11 @@ export default class MapScene extends Scene { ...@@ -354,6 +354,11 @@ export default class MapScene extends Scene {
} }
this.scroll.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this); this.scroll.removeEventListener(egret.Event.ENTER_FRAME, this.onEnterFrame, this);
this._avatarsCache.forEach((item)=>{
if(item.parent) item.parent.removeChild(item);
});
this._avatarsCache=null;
} }
getScrollV(lastOrder, stageHeight) { getScrollV(lastOrder, stageHeight) {
...@@ -430,6 +435,7 @@ export default class MapScene extends Scene { ...@@ -430,6 +435,7 @@ export default class MapScene extends Scene {
this.updateSign(); this.updateSign();
} }
private _avatarsCache=[];
addAvatar(level, ele?) { addAvatar(level, ele?) {
const item = MapScene.iconHash[level]; const item = MapScene.iconHash[level];
const parent = item['mappart']; const parent = item['mappart'];
...@@ -442,6 +448,7 @@ export default class MapScene extends Scene { ...@@ -442,6 +448,7 @@ export default class MapScene extends Scene {
if (!MapScene.starHash[level].visible) { if (!MapScene.starHash[level].visible) {
avatar.y = item.y - avatar.height; avatar.y = item.y - avatar.height;
} }
this._avatarsCache.push(avatar);
} }
updateFriends() { updateFriends() {
......
...@@ -46,7 +46,7 @@ const config = { ...@@ -46,7 +46,7 @@ const config = {
data: './happyclear/openTreasureBox.json' data: './happyclear/openTreasureBox.json'
}, },
'/customActivity/happyclear/home': { '/customActivity/happyclear/home': {
data: './happyclear/homemax.json' data: './happyclear/home.json'
}, },
'/customActivity/happyclear/getLevelInfo': { '/customActivity/happyclear/getLevelInfo': {
data: './happyclear/getLevelInfo.json' data: './happyclear/getLevelInfo.json'
......
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
"wealth": 999, "wealth": 999,
"totalStars": 359, "totalStars": 359,
"levels": [ "levels": [
{
"levelNum": 1,
"maxScore": 47440,
"stars": 3
},
{
"levelNum": 2,
"maxScore": 47440,
"stars": 3
}
], ],
"remainProp": [ "remainProp": [
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"timestamp": 1571322224593, "timestamp": 1571322224593,
"data": [ "data": [
{ {
"levelNum": 19, "levelNum": 21,
"rank": [ "rank": [
{ {
"nickName": null, "nickName": null,
......
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