Ejemplo n.º 1
0
        /**左上角显示房间规则**/
        public void updateRule()
        {
            RoomVO rvo = _data.replayVO.roomvo;

            roomRemarkText.text  = GameHelper.getHelper(rvo.roomType).getRuleStr(rvo);
            remainRoundText.text = (rvo.roundNumber - _data.AvatarList [_data.myIndex].gameRound).ToString();
        }
Ejemplo n.º 2
0
        public void inviteFriend()
        {
            RoomVO rvo = GlobalData.getInstance().roomVO;

            if (rvo != null)
            {
                string       title = "铁脚麻将    " + "房间号:" + rvo.roomId;
                ShareContent s     = new ShareContent();
                s.SetTitle(title);
                s.SetText(GameHelper.getHelper().getInviteRuleStr(rvo));
                s.SetUrl(Constants.Download_URL);
                s.SetImageUrl(Constants.ImgUrl + "icon96.png");
                s.SetShareType(ContentType.Webpage);
                s.SetObjectID("");
                shareSdk.ShowShareContentEditor(PlatformType.WeChat, s);
            }
        }
Ejemplo n.º 3
0
        /**
         * 胡牌请求回调
         */
        private void onHuNotify(ClientResponse response)
        {
            HupaiResponseVo hvo = JsonMapper.ToObject <HupaiResponseVo> (response.message);

            _data.hupaiResponseVO = hvo;
            string scores = hvo.currentScore;

            hupaiCoinChange(scores);


            if (hvo.type == "0")
            {
                SoundManager.getInstance().playSoundByAction("hu", GlobalData.getInstance().myAvatarVO.account.sex);
                _actionHlpr.showEffect(ActionType.HU);

                for (int i = 0; i < hvo.avatarList.Count; i++)
                {
                    var item   = hvo.avatarList [i];
                    var hutype = GameHelper.getHelper().getHuType(item.totalInfo.getHuInfo());
                    if (hutype == HuType.JIE_PAO)
                    {
                        _uiHelper.getCardGOs(i).PlayerItem.setHuFlagDisplay();
                        SoundManager.getInstance().playSoundByAction("hu", avatarList [i].account.sex);
                    }
                    else if (hutype == HuType.ZI_MO)
                    {
                        _uiHelper.getCardGOs(i).PlayerItem.setHuFlagDisplay();
                        SoundManager.getInstance().playSoundByAction("zimo", avatarList [i].account.sex);
                    }
                    else
                    {
                        _uiHelper.getCardGOs(i).PlayerItem.setHuFlagHidde();
                    }
                }

                string allMas = hvo.allMas;
                if (GlobalData.getInstance().roomVO.roomType == GameType.ZHUAN_ZHUAN || GlobalData.getInstance().roomVO.roomType == GameType.JI_PING_HU)                    //只有转转麻将才显示抓码信息
                {
                    if (GlobalData.getInstance().roomVO.ma > 0 && allMas != null && allMas.Length > 0)
                    {
                        zhuamaPanel = SceneManager.getInstance().loadPerfab("prefab/Panel_ZhuaMa");
                        zhuamaPanel.GetComponent <ZhuaMaView> ().init(_data);
                        zhuamaPanel.GetComponent <ZhuaMaView> ().arrageMas(allMas, hvo.validMas);
                        Invoke("openGameOverView", 7);
                    }
                    else
                    {
                        Invoke("openGameOverView", 3);
                    }
                }
                else
                {
                    Invoke("openGameOverView", 3);
                }
            }
            else if (hvo.type == "1")
            {
                SoundManager.getInstance().playSoundByAction("liuju", GlobalData.getInstance().myAvatarVO.account.sex);
                _actionHlpr.showEffect(ActionType.LIUJU);
                Invoke("openGameOverView", 3);
            }
            else
            {
                Invoke("openGameOverView", 3);
            }
        }
Ejemplo n.º 4
0
        /**左上角显示房间规则**/
        public void updateRule()
        {
            RoomVO rvo = GlobalData.getInstance().roomVO;

            roomRemarkText.text = GameHelper.getHelper().getRuleStr(rvo);
        }