Includes core gameplay, 600 exported levels, visual assets, web bridge, and bootstrap scene. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
523 B
TypeScript
21 lines
523 B
TypeScript
import { _decorator, Component } from 'cc';
|
||
import { GameManager } from '../manager/GameManager';
|
||
|
||
const { ccclass } = _decorator;
|
||
|
||
/** 对应 Unity UIMain,JS 可 SendMessage("UIMain", "SetText", ...) */
|
||
@ccclass('UIMain')
|
||
export class UIMain extends Component {
|
||
private textVisible = false;
|
||
private textContent = '';
|
||
|
||
setText(str: string) {
|
||
this.textContent = str;
|
||
console.log('[UIMain]', str);
|
||
}
|
||
|
||
setTextActive(active: string) {
|
||
this.textVisible = active === 'true';
|
||
}
|
||
}
|