Beispiel #1
0
    protected void onCheckNameClick(GameObject button)
    {
        string nameText = mNameEdit.getText();

        if (nameText != "")
        {
            CSCheckName checkName = mSocketManager.createPacket <CSCheckName>();
            byte[]      nameBytes = stringToBytes(nameText, BinaryUtility.getGB2312());
            checkName.setName(nameBytes);
            mSocketManager.sendMessage(checkName);
            // 检测按钮点击后就禁用该按钮
            mCheckNameButton.setHandleInput(false);
        }
    }