提交素材

This commit is contained in:
PC-20230316NUNE\Administrator
2024-01-05 17:45:57 +08:00
parent c0cfcf98fc
commit 8323fc141b
954 changed files with 67755 additions and 567 deletions

View File

@@ -0,0 +1,28 @@
import { _decorator, Component, Node } from 'cc';
import ChatData from '../../../data/ChatData';
import { GUIChatMessageDTO } from '../../../consts/GActionType';
import { Label } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('MainChatIcon')
export class MainChatIcon extends Component {
@property(Label)
text:Label;
onLoad(){
//监听消息
ChatData.getIns().on(this.onMessage.bind(this),this);
}
protected onDestroy(): void {
ChatData.getIns().off(this.onMessage.bind(this),this);
}
onMessage(info:GUIChatMessageDTO){
this.text.string = `${info.playerName} : ${info.message.message}`
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "792ecb74-f351-4d1e-ab12-37b671bb4172",
"files": [],
"subMetas": {},
"userData": {}
}