Ejemplo n.º 1
0
    protected void onPengClicked(GameObject obj)
    {
        CSConfirmAction confirm = mSocketNetManager.createPacket(PACKET_TYPE.PT_CS_CONFIRM_ACTION) as CSConfirmAction;

        confirm.mAction.mValue = (byte)ACTION_TYPE.AT_PENG;
        mSocketNetManager.sendMessage(confirm);
        afterActionSelected();
    }
Ejemplo n.º 2
0
    //------------------------------------------------------------------------------------------------------
    protected void onActionClicked(GameObject obj)
    {
        ACTION_TYPE action = ACTION_TYPE.AT_MAX;
        int         count  = mAction.Length;

        for (int i = 0; i < count; ++i)
        {
            if (mLayout.getUIObject(obj) == mAction[i])
            {
                action = (ACTION_TYPE)i;
                break;
            }
        }
        if (action != ACTION_TYPE.AT_MAX)
        {
            CSConfirmAction confirm = mSocketNetManager.createPacket <CSConfirmAction>();
            confirm.mAction.mValue = (byte)action;
            mSocketNetManager.sendMessage(confirm);
            afterActionSelected();
        }
    }
Ejemplo n.º 3
0
    //------------------------------------------------------------------------------------------------------
    protected void onActionClicked(GameObject obj)
    {
        ACTION_TYPE action = ACTION_TYPE.AT_MAX;
        int         count  = mAction.Length;

        for (int i = 0; i < count; ++i)
        {
            if (mLayout.getUIObject(obj) == mAction[i])
            {
                action = (ACTION_TYPE)i;
                break;
            }
        }
        if (action != ACTION_TYPE.AT_MAX)
        {
            CSConfirmAction confirm = mSocketManager.createPacket <CSConfirmAction>();
            confirm.mAction.mValue = (byte)action;
            mSocketManager.sendMessage(confirm);
            afterActionSelected();
            // 通知其他布局行为已经选择
            mScriptMahjongHandIn.notifyAbleToPengOrGang(PLAYER_POSITION.PP_MYSELF, MAHJONG.M_MAX);
        }
    }