Exemple #1
0
    void initGameState_Playing()
    {
        //隐藏退出和就位等按钮
        readyBtn.gameObject.SetActive(false);
        leaveBtn.gameObject.SetActive(false);
        changeRoomBtn.gameObject.SetActive(false);
        //显示麻将剩余数量
        numOfMJText.text = room.public_roomInfo.numOfMJ + "";
        print("庄家索引是" + room.public_roomInfo.button);
        print(room.public_roomInfo.playerInfo[1].userId + " 玩家手牌数量==" + room.public_roomInfo.playerInfo[1].holdsCount);
        //初始化打出牌,碰、杠、胡牌
        for (int i = 0; i < room.public_roomInfo.playerInfo.Count; i++)
        {
            PLAYER_PUBLIC_INFO pb = room.public_roomInfo.playerInfo[i];
            playerInfo         pi = GetPlayerInfoByServerIndex(i);
            realyPlayer.Add(pi);             //按照房间人数安排的玩家列表
            pi.initSeat(i);
            pi.upDataHandCards();            //初始化手中牌
            pi.upDataFlodsCard();            //更新打出的牌
            pi.upDataPengCard();             //更新碰的牌
            pi.upDataGangCard();             //更新杠的牌
        }
        //处理正在打出的牌
        int chuPai = room.public_roomInfo.chuPai;

        if (chuPai != -1)
        {
            GetPlayerInfoByServerIndex(room.public_roomInfo.turn).showChuPai(chuPai);
        }
        foreach (PLAYER_PUBLIC_INFO pb in room.public_roomInfo.playerInfo)
        {
        }
    }
Exemple #2
0
 public void initIdle()
 {
     readyBtn.gameObject.SetActive(true);
     leaveBtn.gameObject.SetActive(true);
     changeRoomBtn.gameObject.SetActive(true);
     numOfMJText.text = "";
     for (int i = 0; i < room.public_roomInfo.playerInfo.Count; i++)
     {
         //PLAYER_PUBLIC_INFO pb = room.public_roomInfo.playerInfo[i];
         playerInfo pi = GetPlayerInfoByServerIndex(i);
         pi.root.gameObject.SetActive(true);
         pi.initSeat(i);
     }
 }
Exemple #3
0
    void initGameState_Playing()
    {
        //隐藏退出和就位等按钮
        readyBtn.gameObject.SetActive(false);
        leaveBtn.gameObject.SetActive(false);
        changeRoomBtn.gameObject.SetActive(false);
        //显示麻将剩余数量
        numOfMJText.text = room.public_roomInfo.numOfMJ + "";
        //初始化打出牌,碰、杠、胡牌
        for (int i = 0; i < room.public_roomInfo.playerInfo.Count; i++)
        {
            PLAYER_PUBLIC_INFO pb = room.public_roomInfo.playerInfo[i];
            playerInfo         pi = GetPlayerInfoByServerIndex(i);
            realyPlayer.Add(pi);              //按照房间人数安排的玩家列表
            pi.initSeat(i);
            //隐藏准备的图片
            pi.changeReady(0);
            pi.upDataHandCards();         //初始化手中牌
            pi.upDataFlodsCard();         //更新打出的牌
            pi.upDataPengCard();          //更新碰的牌
            pi.upDataGangCard();          //更新杠的牌
            pi.upDataHuCard();            //更新胡的牌
        }

        //处理正在打出的牌
        int chuPai = room.public_roomInfo.chuPai;

        if (chuPai != -1)
        {
            GetPlayerInfoByServerIndex(room.public_roomInfo.turn).showChuPai(chuPai);
        }
        //处理操作信息
        if (account.actionData.gang == 1 || account.actionData.peng == 1 || account.actionData.hu == 1)
        {
            account.showActionData();
            _actionData.UpDataActionData();
        }
    }