コード例 #1
0
ファイル: ClientSenderProxy.cs プロジェクト: wjlovefql/HouHai
        public void SendMessage(int userID, string message)
        {
            NewTransferObject to = transferObjectFactory.createNewTransferObject();

            to.setCalleeMethod(ExecuteClientCallMethodName);
            to.putString("receiveMessage"); //callee method
            to.putInt(userID);
            to.putString(message);
            to.registerReturnType(TransferObject.DATATYPE_VOID);
            ServerExecutor.execute(to);
        }
コード例 #2
0
ファイル: ClientSenderProxy.cs プロジェクト: wjlovefql/HouHai
        public void EnterLobby(int userID, string userName, int userLevel, int equipedWeaponTypeId, float[] position)
        {
            NewTransferObject to = transferObjectFactory.createNewTransferObject();

            to.setCalleeMethod(ExecuteClientCallMethodName);
            to.putString("enterLobby"); //callee method
            to.putInt(userID);
            to.putString(userName);
            to.putInt(userLevel);
            to.putInt(equipedWeaponTypeId);
            to.putFloatArray(position);
            to.registerReturnType(TransferObject.DATATYPE_VOID);
            ServerExecutor.execute(to);
        }
コード例 #3
0
ファイル: ClientSenderProxy.cs プロジェクト: wjlovefql/HouHai
        public void ExitLobby(int userID)
        {
            NewTransferObject to = transferObjectFactory.createNewTransferObject();

            to.setCalleeMethod(ExecuteClientCallMethodName);
            to.putString("exitLobby"); //callee method
            to.putInt(userID);
            to.registerReturnType(TransferObject.DATATYPE_VOID);
            ServerExecutor.execute(to);
        }
コード例 #4
0
ファイル: ClientSenderProxy.cs プロジェクト: wjlovefql/HouHai
        public void SendMovement(int userID, float[] target)
        {
            NewTransferObject to = transferObjectFactory.createNewTransferObject();

            to.setCalleeMethod(ExecuteClientCallMethodName);
            to.putString("receiveMovement"); //callee method
            to.putInt(userID);
            to.putFloatArray(target);
            to.registerReturnType(TransferObject.DATATYPE_VOID);
            ServerExecutor.execute(to);
        }
コード例 #5
0
        public String sayHello(int Id, String name)
        {
            NewTransferObject to = transferObjectFactory.createNewTransferObject();

            to.setCalleeClass("com.qileyuan.tatala.example.proxy.NewToServerProxy");
            to.setCalleeMethod("sayHello");
            to.registerReturnType(TransferObject.DATATYPE_STRING);

            to.putInt(Id);
            to.putString(name);

            Object resultObj = ServerExecutor.execute(to);
            String result    = (String)resultObj;

            return(result);
        }