update
This commit is contained in:
parent
0c7acd00b4
commit
62270ac449
@ -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": {
|
||||||
|
@ -1,111 +1,116 @@
|
|||||||
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,
|
||||||
|
|
||||||
properties: {
|
properties: {
|
||||||
sp_icon: {
|
sp_icon: {
|
||||||
default: null,
|
default: null,
|
||||||
type: cc.Sprite,
|
type: cc.Sprite,
|
||||||
},
|
},
|
||||||
sp_pz: {
|
sp_pz: {
|
||||||
default: null,
|
default: null,
|
||||||
type: cc.Sprite,
|
type: cc.Sprite,
|
||||||
},
|
},
|
||||||
lb_des: {
|
lb_des: {
|
||||||
default: null,
|
default: null,
|
||||||
type: cc.Label,
|
type: cc.Label,
|
||||||
},
|
},
|
||||||
lb_huoyue: {
|
lb_huoyue: {
|
||||||
default: null,
|
default: null,
|
||||||
type: cc.Label,
|
type: cc.Label,
|
||||||
},
|
},
|
||||||
lb_count: {
|
lb_count: {
|
||||||
default: null,
|
default: null,
|
||||||
type: cc.Label,
|
type: cc.Label,
|
||||||
},
|
},
|
||||||
lb_jd: {
|
lb_jd: {
|
||||||
default: null,
|
default: null,
|
||||||
type: cc.Label,
|
type: cc.Label,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
nd_doing: {
|
||||||
|
default: null,
|
||||||
|
type: cc.Node,
|
||||||
|
},
|
||||||
|
nd_finish: {
|
||||||
|
default: null,
|
||||||
|
type: cc.Node,
|
||||||
|
},
|
||||||
|
nd_lingqu: {
|
||||||
|
default: null,
|
||||||
|
type: cc.Node,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
nd_doing: {
|
// LIFE-CYCLE CALLBACKS:
|
||||||
default: null,
|
|
||||||
type: cc.Node,
|
|
||||||
},
|
|
||||||
nd_finish: {
|
|
||||||
default: null,
|
|
||||||
type: cc.Node,
|
|
||||||
},
|
|
||||||
nd_lingqu: {
|
|
||||||
default: null,
|
|
||||||
type: cc.Node,
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
// onLoad () {},
|
||||||
|
|
||||||
// LIFE-CYCLE CALLBACKS:
|
init: function (index, data, reload, group) {
|
||||||
|
if (index >= data.array.length) {
|
||||||
|
this.node.active = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.target = data.target;
|
||||||
|
var sdata = data.array[index];
|
||||||
|
this.initdata(sdata);
|
||||||
|
},
|
||||||
|
initdata(v) {
|
||||||
|
var state = v.state;
|
||||||
|
this.mid = v.mission_id;
|
||||||
|
this.lb_jd.string = v.current + '/' + v.target;
|
||||||
|
var cfg = gameConfig.task[this.mid];
|
||||||
|
if (cfg) {
|
||||||
|
this.lb_des.string = cfg.des;
|
||||||
|
this.nd_lingqu.active =
|
||||||
|
this.nd_finish.active =
|
||||||
|
this.nd_doing.active =
|
||||||
|
false;
|
||||||
|
if (state == 0) {
|
||||||
|
this.nd_lingqu.active = true;
|
||||||
|
this.lb_jd.string = ' ';
|
||||||
|
} else if (state == 1) {
|
||||||
|
this.nd_finish.active = true;
|
||||||
|
this.lb_jd.string = ' ';
|
||||||
|
} else if (state == 2) {
|
||||||
|
this.nd_doing.active = true;
|
||||||
|
}
|
||||||
|
// var items = cc.playerData.getDrop(cfg.reward)
|
||||||
|
// this.lb_huoyue.string = items[0].num
|
||||||
|
// this.lb_count.string = items[1].num
|
||||||
|
|
||||||
// onLoad () {},
|
// Utils.setitem(this, items[1].id, this.sp_icon, this.sp_pz)
|
||||||
|
// this.jump = cfg.jump_value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
init: function(index, data, reload, group) {
|
onclickgo() {
|
||||||
if (index >= data.array.length) {
|
// console.log("open game")
|
||||||
this.node.active = false
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.target = data.target
|
|
||||||
var sdata = data.array[index]
|
|
||||||
this.initdata(sdata)
|
|
||||||
},
|
|
||||||
initdata(v) {
|
|
||||||
var state = v.state
|
|
||||||
this.mid = v.mission_id
|
|
||||||
this.lb_jd.string = v.current + "/" + v.target
|
|
||||||
var cfg = gameConfig.task[this.mid]
|
|
||||||
if(cfg){
|
|
||||||
this.lb_des.string = cfg.des
|
|
||||||
this.nd_lingqu.active = this.nd_finish.active = this.nd_doing.active = false
|
|
||||||
if (state == 0) {
|
|
||||||
this.nd_lingqu.active = true
|
|
||||||
this.lb_jd.string = " "
|
|
||||||
} else if (state == 1) {
|
|
||||||
this.nd_finish.active = true
|
|
||||||
this.lb_jd.string = " "
|
|
||||||
} else if (state == 2) {
|
|
||||||
this.nd_doing.active = true
|
|
||||||
}
|
|
||||||
// var items = cc.playerData.getDrop(cfg.reward)
|
|
||||||
// this.lb_huoyue.string = items[0].num
|
|
||||||
// this.lb_count.string = items[1].num
|
|
||||||
|
|
||||||
|
if (!window.hasWallet) {
|
||||||
|
uimanger.showUI(GuestLoginTip.prefabPath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Utils.setitem(this, items[1].id, this.sp_icon, this.sp_pz)
|
cc.uiMain.callbattlechosehero({
|
||||||
// this.jump = cfg.jump_value
|
teamuuid: null,
|
||||||
}
|
});
|
||||||
},
|
// if (this.jump == 2) {
|
||||||
|
// cc.uiMain.callbattlechosehero({
|
||||||
|
// teamuuid: null,
|
||||||
|
// })
|
||||||
|
// } else if (this.jump == 3) {
|
||||||
|
// cc.uiMain.callteammatch()
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
|
||||||
|
onclickget() {
|
||||||
onclickgo() {
|
NetManage.commitMission(this.mid, () => {
|
||||||
// console.log("open game")
|
NetManage.missionList(1);
|
||||||
cc.uiMain.callbattlechosehero({
|
});
|
||||||
teamuuid: null,
|
},
|
||||||
})
|
// update (dt) {},
|
||||||
// if (this.jump == 2) {
|
});
|
||||||
// cc.uiMain.callbattlechosehero({
|
|
||||||
// teamuuid: null,
|
|
||||||
// })
|
|
||||||
// } else if (this.jump == 3) {
|
|
||||||
// cc.uiMain.callteammatch()
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
|
|
||||||
onclickget() {
|
|
||||||
NetManage.commitMission(this.mid, () => {
|
|
||||||
NetManage.missionList(1)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// update (dt) {},
|
|
||||||
});
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user