Exemple #1
0
    private void dissoliveRoomResponse(ClientResponse response)
    {
        DissoliveRoomResponseVo dissoliveRoomResponseVo = JsonMapper.ToObject <DissoliveRoomResponseVo> (response.message);
        string plyerName = dissoliveRoomResponseVo.accountName;

        if (dissoliveRoomResponseVo.type == "1")
        {
            playerList [getPlayerIndex(plyerName)].changeResult("同意");
        }
        else if (dissoliveRoomResponseVo.type == "2")
        {
            GlobalDataScript.isonApplayExitRoomstatus = false;
            playerList [getPlayerIndex(plyerName)].changeResult("拒绝");
            disagreeCount += 1;
            bool isDisagree = false;
            if (GlobalDataScript.count_Players_DN - disagreeCount <= disagreeCount)
            {
                isDisagree = true;
            }
            if (disagreeCount >= 2 || isDisagree)
            {
                TipsManagerScript.getInstance().setTips("同意解散房间申请人数不够,本轮投票结束,继续游戏");
                removeListener();
                Destroy(this);
                Destroy(gameObject);
            }
        }
    }
Exemple #2
0
    private void dissoliveRoomResponse(ClientResponse response)
    {
        DissoliveRoomResponseVo dvo = JsonMapper.ToObject <DissoliveRoomResponseVo> (response.message);
        string plyerName            = dvo.accountName;

        if (dvo.type == "1")
        {
            getResultItem(plyerName).changeResult("同意");
        }
        else if (dvo.type == "2")
        {
            getResultItem(plyerName).changeResult("拒绝");
        }
    }