格式
typescript
NetConversation.Emit(type, args)所属类: NetConversation
描述
提交数据。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| type | contructor | 构造函数 |
| args | ...params | 参数信息 |
返回值
| 类型 | 描述 |
|---|---|
T |
代码示例
typescript
class TestRequest extends Contract{
Exescute(msg: string): void {
Debug.Log("client send :: ", msg);
}
Receive(msg: string): void {
Debug.Log("client receive :: ", msg);
}
}
NetServer.on_converastion_connect = async (conv: NetConversation) => {
conv.Emit(TestRequest, "hello world");
}