mirror of
https://github.com/szrpf/DataBoardDemo.git
synced 2024-12-25 03:08:33 +00:00
v2.1
This commit is contained in:
parent
046002dcbe
commit
08dd874a91
@ -142,12 +142,12 @@ export default class DataBoard extends cc.Component {
|
|||||||
private customLabelStringSplit: string[] = null;
|
private customLabelStringSplit: string[] = null;
|
||||||
private monitorComp: cc.Component = null;
|
private monitorComp: cc.Component = null;
|
||||||
|
|
||||||
protected onLoad() {
|
protected start() {
|
||||||
|
this.boardNode = this.node.getChildByName('DataBoard');
|
||||||
if (!CC_EDITOR && !window['DATABOARD']) {
|
if (!CC_EDITOR && !window['DATABOARD']) {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.boardNode = this.node.getChildByName('DataBoard');
|
|
||||||
if (cc.isValid(this.boardNode)) {
|
if (cc.isValid(this.boardNode)) {
|
||||||
this.boardNode.removeFromParent();
|
this.boardNode.removeFromParent();
|
||||||
this.boardNode.destroy();
|
this.boardNode.destroy();
|
||||||
@ -310,7 +310,7 @@ export default class DataBoard extends cc.Component {
|
|||||||
if (cc.isValid(this.boardNode)) {
|
if (cc.isValid(this.boardNode)) {
|
||||||
this.boardNode.removeFromParent();
|
this.boardNode.removeFromParent();
|
||||||
this.boardNode.destroy();
|
this.boardNode.destroy();
|
||||||
};
|
}
|
||||||
this.node.targetOff(this);
|
this.node.targetOff(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user