This commit is contained in:
guoqing.zhu 2022-06-04 22:14:38 +08:00
parent bc54ca812a
commit 20d0a96752
5 changed files with 4299 additions and 1017 deletions

File diff suppressed because it is too large Load Diff

View File

@ -14840,9 +14840,6 @@
"pb_gun": { "pb_gun": {
"__uuid__": "a3b39117-4888-4cb6-8e8c-34edcb2e834c" "__uuid__": "a3b39117-4888-4cb6-8e8c-34edcb2e834c"
}, },
"nd_upperNode": {
"__id__": 310
},
"_id": "" "_id": ""
}, },
{ {
@ -14867,12 +14864,10 @@
"mission_detail": { "mission_detail": {
"__id__": 290 "__id__": 290
}, },
"allAddNode": { "missionTitle": null,
"__id__": 85 "missionDesc": null,
}, "herolistNode": null,
"needNode": { "gunlistNode": null,
"__id__": 244
},
"_id": "" "_id": ""
}, },
{ {

View File

@ -124,13 +124,12 @@ cc.Class({
// }, // },
onLoad() { onLoad() {
// cc.Notifier.on('hasChoose', this, (data) => { cc.Notifier.on('hasChoose', this, (data) => {
// this.allAddNode.children[this.currentBtn] this.herolistNode.children[this.currentBtn]
// .getComponent('mission_oneBox') .getComponent('mission_oneBox')
// .init(data); .init(data);
// this.allChoose[this.currentBtn] = data; this.allChooseHero[this.currentBtn] = data;
// this.setIcon(); });
// });
// cc.Notifier.on('ClearOneBox', this, (data) => { // cc.Notifier.on('ClearOneBox', this, (data) => {
// this.allChoose[data] = null; // 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() { close() {
this.node.destroy(); this.node.destroy();
@ -174,10 +144,13 @@ cc.Class({
onClickAdd(event, param) { onClickAdd(event, param) {
this.currentBtn = param; this.currentBtn = param;
console.log(this.currentBtn)
this.mission_detail.active = true; this.mission_detail.active = true;
// this.mission_detail // set currentdata
// .getComponent('mission_chooseDetail')
// .init(this.missionData); this.mission_detail
.getComponent('mission_chooseDetail')
.init(this.allChooseHero);
}, },
check() { check() {

View File

@ -44,21 +44,19 @@ cc.Class({
type: cc.Prefab, type: cc.Prefab,
}, },
// nd_upperNode: {
// default: null,
// type: cc.Node,
// },
}, },
init(data) { init(data) {
// this.allParam = new Array();
console.log(JSON.stringify(data))
// this.allParam.forEach((param) => {
// if (param.toString()[0] == '2') { this.allHasGot = new Array()
// var pp = dropItemConfig[param.toString()].link_sort; for(let i=0;i<data.length;i+=1){
// this.allParam.push(pp.toString()); if(data[i]) this.allHasGot.push(data[i].hero_uniid)
// } }
// });
this.set()
}, },
@ -75,7 +73,7 @@ cc.Class({
this.currentData = null; this.currentData = null;
}, },
onLoad() { set() {
this.nd_gunContent.destroyAllChildren(); this.nd_gunContent.destroyAllChildren();
this.nd_heroContent.destroyAllChildren(); this.nd_heroContent.destroyAllChildren();
@ -95,16 +93,12 @@ cc.Class({
node.scale = 1.1; node.scale = 1.1;
this.currentData = element; this.currentData = element;
}); });
var type = playerConfig[element.hero_id].herotype;
//set cover //set cover
// if ( if (
// this.allParam.includes(element.hero_id.toString()) || this.allHasGot.includes(element.hero_uniid.toString())
// this.allParam.includes(type.toString()) ) {
// ) { node.getComponent('wantedHero').showCover();
// node.getComponent('wantedHero').hideCover(); }
// }
//
this.nd_heroContent.addChild(node); this.nd_heroContent.addChild(node);
}); });
}); });

View File

@ -17,10 +17,10 @@ cc.Class({
}, },
showCover() { showCover() {
// this.nd_cover.active = true; this.nd_cover.active = true;
}, },
hideCover() { hideCover() {
// this.nd_cover.active = false; this.nd_cover.active = false;
}, },
}); });