start() {
//var self = this;
this.UpdatePlaneShop();
}
// update (dt) {}
public UpdatePlaneShop(): void {
for (this.i = 0; this.i < this.planeContent.childrenCount; this.i++) {
cc.log(this.plane[this.i].name);
cc.log(cc.find("txt_planeName", this.planeContent.children[this.i]).getComponent(cc.Label).string);
cc.find("txt_planeName", this.planeContent.children[this.i]).getComponent(cc.Label).string = this.plane[this.i].name;
cc.log("-------------------------------------------");
cc.log(cc.find("txt_planeName", this.planeContent.children[this.i]).getComponent(cc.Label).string);
cc.log("endend");
cc.log("endend");
}
}`文字缩进4格`
start中报错,系统就在不停地重复执行start
