This commit is contained in:
zhuguoqing 2022-05-30 11:07:55 +08:00
parent 2c2c07454a
commit 1bf83f56fe
4 changed files with 84 additions and 12 deletions

View File

@ -47,8 +47,8 @@
},
"_scale": {
"__type__": "cc.Vec3",
"x": 0.4743179200523873,
"y": 0.4743179200523873,
"x": 0.583953857421875,
"y": 0.583953857421875,
"z": 1
},
"_quat": {
@ -13799,7 +13799,7 @@
"__id__": 411
}
],
"_active": true,
"_active": false,
"_level": 2,
"_components": [
{

View File

@ -16633,6 +16633,27 @@
"nd_team": {
"__id__": 307
},
"heroName": {
"__id__": 110
},
"gunt1Name": {
"__id__": 133
},
"gunt2Name": {
"__id__": 156
},
"hero_reward": {
"__id__": 113
},
"gun1_reward": {
"__id__": 136
},
"gun2_reward": {
"__id__": 159
},
"total_reward": {
"__id__": 197
},
"_id": ""
},
{

View File

@ -222,6 +222,11 @@ cc.Class({
window.canrename = false;
this.nd_editName.active = true;
}
// // update gold
// NetManage.getCurrentUserInfo((res)=>{
// console.log(`current user info :`+ userinfo.info.gold)
// });
},
getwalletEvent() {

View File

@ -1,12 +1,3 @@
// Learn cc.Class:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/class.html
// - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/class.html
// Learn Attribute:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
// - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
// - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
// - [English] https://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
var battlenet = require('battlenetmanage');
var SDKManage = require('SDKManage');
cc.Class({
@ -87,6 +78,42 @@ cc.Class({
default: null,
type: cc.Node,
},
heroName:{
default:null,
type:cc.Label
},
gunt1Name:{
default:null,
type:cc.Label
},
gunt2Name:{
default:null,
type:cc.Label
},
hero_reward:{
default:null,
type:cc.Label
},
gun1_reward:{
default:null,
type:cc.Label
},
gun2_reward:{
default:null,
type:cc.Label
},
total_reward:{
default:null,
type:cc.Label
}
},
// LIFE-CYCLE CALLBACKS:
@ -137,6 +164,7 @@ cc.Class({
this.lb_rank.string = res.team_rank;
},
refreshself(v) {
console.log(`game over data-----${v}`)
this.lb_killcount.string = v.kills;
this.lb_killcount2.string = v.kills;
this.lb_dmg.string = v.damage_amount;
@ -152,6 +180,23 @@ cc.Class({
);
this.lb_des.string = this.getTitleDesc(this.rankmun, v.kills);
// infos
// hero
if(v.hero_stats){
this.heroName.string = v.hero_stats.hero_name;
this.hero_reward = v.hero_stats.reward_ceg;
}
// weapons
if(v.weapons_stats){
if(v.weapons_stats[0]){
//gun1
}
if(v.weapons_stats[1]){
//gun2
}
}
},
showplayerinfo(v) {
for (var i = 0; i < 4; i++) {
@ -252,6 +297,7 @@ cc.Class({
onclickover() {
cc.director.loadScene('MainScene');
cc.Notifier.emit("refreshBaseInfo");
},
// update (dt) {},