格式
typescript
NetClient.Emit(type, args)所属类: NetClient
描述
提交一个派生于Contract的对象。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| type | `` | 派生于Contract的对象 |
| 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);
}
}
NetClient.Emit(TestRequest, "hello world");