Ejemplo n.º 1
0
    public void sendMsg(GameProtocol pID, msgPlayerAct msg, Action <Message> action)
    {
        JsonObject jsonMsg = new JsonObject();

        jsonMsg.Add("act", (int)msg.act);
        jsonMsg.Add("seat", msg.seat);
        sendMsg(pID, jsonMsg, action);
    }
Ejemplo n.º 2
0
    //用户点击准备或者自动准备
    void onEventPlayerAct(object data)
    {
        RoomEvent.sV2C_PlayerAct pact = (RoomEvent.sV2C_PlayerAct)data;

        Room.Player?player = Room.Room.getPlayerBySeat(Room.Room.selfSeat);
        if (player.Value.talentList.Count == 0 &&
            Room.Room.roomType == CommonDefine.eCreateRoomType.ROOM_ROOM /*只有房间模式才提示*/)
        {
            //天赋未配置,作出提示,这里可以直接到请求准备到时候提示
            CommonUtil.Util.showDialog("温馨提示", "您未配置天赋,请配置后再准备");
            return;
        }


        msgPlayerAct pa = new msgPlayerAct();

        pa.act  = (msgPlayerAct.ACT_TYPE)(pact.act);
        pa.seat = Room.Room.selfSeat;

        ProtocolManager.getInstance().sendMsg(GameProtocol.P_GAME_PLAYER_ACT, pa, OnRespPlayerAct);
    }