Skip to content

格式

typescript
Contract.Echo(type, args)

所属类: Contract

描述

接收一个派生于Contract和IContractEchocapable的对象。

参数

参数名类型描述
typeT派生于Contract和IContractEchocapable的对象
argsParameters参数

返回值

类型描述
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);
    }
}