23 lines
400 B
TypeScript
23 lines
400 B
TypeScript
import { _decorator, Component, Node } from 'cc';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('MessageManager')
|
|
export class MessageManager extends Component {
|
|
start() {
|
|
|
|
}
|
|
|
|
update(deltaTime: number) {
|
|
|
|
}
|
|
|
|
//处理逻辑
|
|
public handleMessage(msg: string) {
|
|
//获取服务器消息队列
|
|
|
|
console.log('处理消息:' + msg);
|
|
}
|
|
}
|
|
|
|
|