格式
typescript
Contract.Echo(type, args)所属类: Contract
描述
接收一个派生于Contract和IContractEchocapable的对象。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| type | T | 派生于Contract和IContractEchocapable的对象 |
| args | Parameters | 参数 |
返回值
| 类型 | 描述 |
|---|---|
void |
代码示例
typescript
class TestRequest extends Contract implements IContractEchocapable{
Exescute(msg: string): void {
Debug.Log("client send :: ", msg);
this.Send(TestRequest, msg);
}
Receive(msg: string): void {
Debug.Log("client receive :: ", msg);
this.Echo(TestRequest,msg);
}
Respond(msg: string): void {
Debug.Log("server receive :: ", msg);
}
}