Commit 93e89a89 authored by zjz1994's avatar zjz1994

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into 776-800

parents ded96b53 4fa59434
...@@ -1227,6 +1227,25 @@ export default class MapScene extends Scene { ...@@ -1227,6 +1227,25 @@ export default class MapScene extends Scene {
// private _avatarsCache = []; // private _avatarsCache = [];
//清楚地图页面的头像
clearAvatar(mappartype:string,mappart:any){
var mapnums:number;
if(mappartype=="top"){
mapnums = MapTopPart.LEVEL_NUMS;
}else if(mappartype=="mid"){
mapnums = MapRpeatPart.LEVEL_NUMS;
}else if(mappartype=="bot"){
mapnums = MapBottomPart.LEVEL_NUMS;
}
for(var i=0;i<mapnums;i++){
let icon = mappart.getIcon(i);
var avatarname:string = "avatarank";
var avatar = icon.getChildByName(avatarname);
if(avatar){
avatar.parent.removeChild(avatar);
}
}
}
//添加地图页头像 //添加地图页头像
addAvatar(level, ele?) { addAvatar(level, ele?) {
...@@ -1256,6 +1275,11 @@ export default class MapScene extends Scene { ...@@ -1256,6 +1275,11 @@ export default class MapScene extends Scene {
// 更新地图上的排行榜 // 更新地图上的排行榜
updateFriends() { updateFriends() {
this.maprankdata = new Array(); this.maprankdata = new Array();
this.clearAvatar("top",this.maptoppart);
this.clearAvatar("mid",this.onemapreppart);
this.clearAvatar("mid",this.twomapreppart);
this.clearAvatar("bot",this.mapbotpart);
NetManager.ins.hc_mapRank(() => { NetManager.ins.hc_mapRank(() => {
const hc_mapRank = DataManager.ins.getData('hc_mapRank').data; const hc_mapRank = DataManager.ins.getData('hc_mapRank').data;
if (!hc_mapRank) return; if (!hc_mapRank) return;
......
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