You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
948 B
38 lines
948 B
// Learn TypeScript:
|
|
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/typescript.html
|
|
// Learn Attribute:
|
|
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/reference/attributes.html
|
|
// Learn life-cycle callbacks:
|
|
// - https://docs.cocos.com/creator/2.4/manual/en/scripting/life-cycle-callbacks.html
|
|
|
|
import Common5 from "../../Platform/th/Common5";
|
|
|
|
const {ccclass, property} = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class ChaDianScript extends cc.Component {
|
|
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
// onLoad () {}
|
|
|
|
start () {
|
|
|
|
}
|
|
|
|
setChadianIconData(data_){
|
|
this.refreshView(data_)
|
|
}
|
|
|
|
refreshView(data_){
|
|
let labName = this.node.getChildByName('labName')
|
|
labName.getComponent(cc.Label).string = data_.name
|
|
|
|
|
|
let icon = this.node.getChildByName('icon')
|
|
Common5.getSpriteFrameFromBundle(data_.bandleName, data_.url, icon.getComponent(cc.Sprite));
|
|
}
|
|
|
|
|
|
}
|
|
|