first commit

This commit is contained in:
ytc1012
2025-11-18 18:38:53 +08:00
commit bea9db4488
1582 changed files with 335346 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
// // Learn TypeScript:
// // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// // Learn Attribute:
// // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// // Learn life-cycle callbacks:
// // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import { _decorator, Component, Label } from 'cc';
const {ccclass, property} = _decorator;
@ccclass('Dialog')
export default class Dialog extends Component {
@property(Label)
label: Label = null;
protected closeCallBack: Function = null;
protected onClickClose(): void {
if (this.closeCallBack){
this.closeCallBack()
}
this.node.active = false;
}
public text(text: any): void {
this.label.string = text
}
public setClose(close :Function){
this.closeCallBack = close
}
}