This commit is contained in:
guoqing.zhu 2022-06-07 16:34:49 +08:00
parent 0c7acd00b4
commit 62270ac449
2 changed files with 107 additions and 102 deletions

View File

@ -47,8 +47,8 @@
}, },
"_scale": { "_scale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1.026988988699419, "x": 0.5279307895527016,
"y": 1.026988988699419, "y": 0.5279307895527016,
"z": 1 "z": 1
}, },
"_quat": { "_quat": {

View File

@ -1,7 +1,7 @@
let viewCell = require("viewCell") let viewCell = require('viewCell');
var gameConfig = require("gameConfig") var gameConfig = require('gameConfig');
var NetManage = require("NetManage") var NetManage = require('NetManage');
var Utils = require("Utils") var Utils = require('Utils');
cc.Class({ cc.Class({
extends: viewCell, extends: viewCell,
@ -31,7 +31,6 @@ cc.Class({
type: cc.Label, type: cc.Label,
}, },
nd_doing: { nd_doing: {
default: null, default: null,
type: cc.Node, type: cc.Node,
@ -44,7 +43,6 @@ cc.Class({
default: null, default: null,
type: cc.Node, type: cc.Node,
}, },
}, },
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
@ -53,46 +51,53 @@ cc.Class({
init: function (index, data, reload, group) { init: function (index, data, reload, group) {
if (index >= data.array.length) { if (index >= data.array.length) {
this.node.active = false this.node.active = false;
return; return;
} }
this.target = data.target this.target = data.target;
var sdata = data.array[index] var sdata = data.array[index];
this.initdata(sdata) this.initdata(sdata);
}, },
initdata(v) { initdata(v) {
var state = v.state var state = v.state;
this.mid = v.mission_id this.mid = v.mission_id;
this.lb_jd.string = v.current + "/" + v.target this.lb_jd.string = v.current + '/' + v.target;
var cfg = gameConfig.task[this.mid] var cfg = gameConfig.task[this.mid];
if (cfg) { if (cfg) {
this.lb_des.string = cfg.des this.lb_des.string = cfg.des;
this.nd_lingqu.active = this.nd_finish.active = this.nd_doing.active = false this.nd_lingqu.active =
this.nd_finish.active =
this.nd_doing.active =
false;
if (state == 0) { if (state == 0) {
this.nd_lingqu.active = true this.nd_lingqu.active = true;
this.lb_jd.string = " " this.lb_jd.string = ' ';
} else if (state == 1) { } else if (state == 1) {
this.nd_finish.active = true this.nd_finish.active = true;
this.lb_jd.string = " " this.lb_jd.string = ' ';
} else if (state == 2) { } else if (state == 2) {
this.nd_doing.active = true this.nd_doing.active = true;
} }
// var items = cc.playerData.getDrop(cfg.reward) // var items = cc.playerData.getDrop(cfg.reward)
// this.lb_huoyue.string = items[0].num // this.lb_huoyue.string = items[0].num
// this.lb_count.string = items[1].num // this.lb_count.string = items[1].num
// Utils.setitem(this, items[1].id, this.sp_icon, this.sp_pz) // Utils.setitem(this, items[1].id, this.sp_icon, this.sp_pz)
// this.jump = cfg.jump_value // this.jump = cfg.jump_value
} }
}, },
onclickgo() { onclickgo() {
// console.log("open game") // console.log("open game")
if (!window.hasWallet) {
uimanger.showUI(GuestLoginTip.prefabPath);
return;
}
cc.uiMain.callbattlechosehero({ cc.uiMain.callbattlechosehero({
teamuuid: null, teamuuid: null,
}) });
// if (this.jump == 2) { // if (this.jump == 2) {
// cc.uiMain.callbattlechosehero({ // cc.uiMain.callbattlechosehero({
// teamuuid: null, // teamuuid: null,
@ -104,8 +109,8 @@ cc.Class({
onclickget() { onclickget() {
NetManage.commitMission(this.mid, () => { NetManage.commitMission(this.mid, () => {
NetManage.missionList(1) NetManage.missionList(1);
}) });
}, },
// update (dt) {}, // update (dt) {},
}); });