| 123456789101112131415161718192021222324252627282930 |
- /*
- * @Author: mojunshou 1637302775@qq.com
- * @Date: 2025-02-26 17:11:55
- * @LastEditors: mojunshou 1637302775@qq.com
- * @LastEditTime: 2025-02-27 16:29:40
- * @FilePath: \Cocos_android\assets\script\game\account\view\DemoViewComp.ts
- * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
- */
- import { _decorator } from "cc";
- import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
- import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
- import { Label } from "cc";
- const { ccclass, property } = _decorator;
- /** 视图层对象 */
- @ccclass('DemoViewComp')
- @ecs.register('DemoView', false)
- export class DemoViewComp extends CCComp {
- start() {
- const text = this.node.getChildByName("textLb")?.getComponent(Label);
- if (text) {
- text.string = "这是开始游戏的场景";
- }
- }
- reset() {
- this.node.destroy();
- }
- }
|