mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
29 lines
622 B
TypeScript
29 lines
622 B
TypeScript
import { _decorator, Component, Label, Node } from 'cc';
|
|
import { app, JNGLayerBase } from '../../App';
|
|
import { GUI } from '../UIConfig';
|
|
import ChatData from '../../data/ChatData';
|
|
import PlayerData from '../../data/PlayerData';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('MainView')
|
|
export class MainView extends JNGLayerBase {
|
|
|
|
|
|
onJNLoad(data?: any): void {
|
|
|
|
//发送消息
|
|
ChatData.getIns().onSend({
|
|
message:`${PlayerData.getIns().data.playerId} 加入游戏`
|
|
});
|
|
|
|
}
|
|
|
|
//打开聊天页面
|
|
onOpenChat(){
|
|
app.layer.Open(GUI.MainChat);
|
|
}
|
|
|
|
}
|
|
|
|
|