pubgv3/assets/scripts/UI/userinfo/UIChangeInfo.js
zhuguoqing ff550d5d6a init
2022-05-22 10:32:02 +08:00

47 lines
972 B
JavaScript

var gameConfig = require("gameConfig")
cc.Class({
extends: cc.Component,
properties: {
nd_tableview: {
default: null,
type: cc.Node
},
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
start() {
this.onface()
},
onclose() {
this.node.destroy()
},
refresh(v) {
this.nd_tableview.getComponent("tableView").initTableView(v.length, {
array: v,
target: this,
});
},
onface() {
var base = cc.playerData.head_list
this.refresh(base)
},
onkuang() {
var base = cc.playerData.head_frame_list
this.refresh(base)
},
onhero() {
var base = []
for (var i = 0; i < cc.playerData.hero_list.length; i++) {
base.push(cc.playerData.hero_list[i].hero_id)
}
this.refresh(base)
},
// update (dt) {},
});