Commit b56b7f3a authored by wildfirecode's avatar wildfirecode

1

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