add
This commit is contained in:
parent
bc54ca812a
commit
20d0a96752
File diff suppressed because it is too large
Load Diff
@ -14840,9 +14840,6 @@
|
||||
"pb_gun": {
|
||||
"__uuid__": "a3b39117-4888-4cb6-8e8c-34edcb2e834c"
|
||||
},
|
||||
"nd_upperNode": {
|
||||
"__id__": 310
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
@ -14867,12 +14864,10 @@
|
||||
"mission_detail": {
|
||||
"__id__": 290
|
||||
},
|
||||
"allAddNode": {
|
||||
"__id__": 85
|
||||
},
|
||||
"needNode": {
|
||||
"__id__": 244
|
||||
},
|
||||
"missionTitle": null,
|
||||
"missionDesc": null,
|
||||
"herolistNode": null,
|
||||
"gunlistNode": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
|
@ -124,13 +124,12 @@ cc.Class({
|
||||
// },
|
||||
|
||||
onLoad() {
|
||||
// cc.Notifier.on('hasChoose', this, (data) => {
|
||||
// this.allAddNode.children[this.currentBtn]
|
||||
// .getComponent('mission_oneBox')
|
||||
// .init(data);
|
||||
// this.allChoose[this.currentBtn] = data;
|
||||
// this.setIcon();
|
||||
// });
|
||||
cc.Notifier.on('hasChoose', this, (data) => {
|
||||
this.herolistNode.children[this.currentBtn]
|
||||
.getComponent('mission_oneBox')
|
||||
.init(data);
|
||||
this.allChooseHero[this.currentBtn] = data;
|
||||
});
|
||||
|
||||
// cc.Notifier.on('ClearOneBox', this, (data) => {
|
||||
// this.allChoose[data] = null;
|
||||
@ -138,35 +137,6 @@ cc.Class({
|
||||
// });
|
||||
},
|
||||
|
||||
setIcon() {
|
||||
// this.needNode.children.forEach((element) => {
|
||||
// element.children[0].active = false;
|
||||
// });
|
||||
// this.allChoose.forEach((data) => {
|
||||
// if (data) {
|
||||
// if (data.hero_id) {
|
||||
// var type = playerConfig[data.hero_id].herotype;
|
||||
// this.needNode.children.forEach((nd) => {
|
||||
// if (
|
||||
// nd.name == `${data.hero_id}` ||
|
||||
// nd.name == type.toString()
|
||||
// ) {
|
||||
// nd.children[0].active = true;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// if (data.gun_id) {
|
||||
// this.needNode.children.forEach((nd) => {
|
||||
// if (nd.name == `${data.gun_id}`) {
|
||||
// nd.children[0].active = true;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
close() {
|
||||
this.node.destroy();
|
||||
@ -174,10 +144,13 @@ cc.Class({
|
||||
|
||||
onClickAdd(event, param) {
|
||||
this.currentBtn = param;
|
||||
console.log(this.currentBtn)
|
||||
this.mission_detail.active = true;
|
||||
// this.mission_detail
|
||||
// .getComponent('mission_chooseDetail')
|
||||
// .init(this.missionData);
|
||||
// set currentdata
|
||||
|
||||
this.mission_detail
|
||||
.getComponent('mission_chooseDetail')
|
||||
.init(this.allChooseHero);
|
||||
},
|
||||
|
||||
check() {
|
||||
|
@ -44,21 +44,19 @@ cc.Class({
|
||||
type: cc.Prefab,
|
||||
},
|
||||
|
||||
// nd_upperNode: {
|
||||
// default: null,
|
||||
// type: cc.Node,
|
||||
// },
|
||||
},
|
||||
|
||||
init(data) {
|
||||
// this.allParam = new Array();
|
||||
|
||||
// this.allParam.forEach((param) => {
|
||||
// if (param.toString()[0] == '2') {
|
||||
// var pp = dropItemConfig[param.toString()].link_sort;
|
||||
// this.allParam.push(pp.toString());
|
||||
// }
|
||||
// });
|
||||
|
||||
console.log(JSON.stringify(data))
|
||||
|
||||
this.allHasGot = new Array()
|
||||
for(let i=0;i<data.length;i+=1){
|
||||
if(data[i]) this.allHasGot.push(data[i].hero_uniid)
|
||||
}
|
||||
|
||||
this.set()
|
||||
|
||||
},
|
||||
|
||||
|
||||
@ -75,7 +73,7 @@ cc.Class({
|
||||
this.currentData = null;
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
set() {
|
||||
this.nd_gunContent.destroyAllChildren();
|
||||
this.nd_heroContent.destroyAllChildren();
|
||||
|
||||
@ -95,16 +93,12 @@ cc.Class({
|
||||
node.scale = 1.1;
|
||||
this.currentData = element;
|
||||
});
|
||||
var type = playerConfig[element.hero_id].herotype;
|
||||
|
||||
//set cover
|
||||
// if (
|
||||
// this.allParam.includes(element.hero_id.toString()) ||
|
||||
// this.allParam.includes(type.toString())
|
||||
// ) {
|
||||
// node.getComponent('wantedHero').hideCover();
|
||||
// }
|
||||
//
|
||||
if (
|
||||
this.allHasGot.includes(element.hero_uniid.toString())
|
||||
) {
|
||||
node.getComponent('wantedHero').showCover();
|
||||
}
|
||||
this.nd_heroContent.addChild(node);
|
||||
});
|
||||
});
|
||||
|
@ -17,10 +17,10 @@ cc.Class({
|
||||
},
|
||||
|
||||
showCover() {
|
||||
// this.nd_cover.active = true;
|
||||
this.nd_cover.active = true;
|
||||
},
|
||||
|
||||
hideCover() {
|
||||
// this.nd_cover.active = false;
|
||||
this.nd_cover.active = false;
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user