private List <MsgGameOverInfo> CreateEndInfo() { List <MsgGameOverInfo> mGameOverInfoList = new List <MsgGameOverInfo>(); ArgsMsgRoomInfo roominfo = RoomInfo.Instance.mRoom; MsgGameOverInfo gameinfo = new MsgGameOverInfo(); gameinfo.player_id = PlayerInfo.Instance.mPlayerPid; //只用到了id gameinfo.upgrade_card = 2; //打到几 mGameOverInfoList.Add(gameinfo); gameinfo = new MsgGameOverInfo(); gameinfo.player_id = RoomInfo.Instance.GetIdByName("left"); //只用到了id gameinfo.upgrade_card = 2; //打到几 mGameOverInfoList.Add(gameinfo); gameinfo = new MsgGameOverInfo(); gameinfo.player_id = RoomInfo.Instance.GetIdByName("right"); //只用到了id gameinfo.upgrade_card = 2; //打到几 mGameOverInfoList.Add(gameinfo); gameinfo = new MsgGameOverInfo(); gameinfo.player_id = RoomInfo.Instance.GetIdByName("top"); //只用到了id gameinfo.upgrade_card = 2; //打到几 mGameOverInfoList.Add(gameinfo); return(mGameOverInfoList); }
public void ClearInfo() { room = null; mSameIpArgs = new ArgsSameIpPlayer(); PlayerInfo.Instance.mTeamSelfIndex = "2"; PlayerInfo.Instance.mTeamEnemyIndex = "2"; nextIndex = "2"; PlayerInfo.Instance.mPlayerData.roomCode = 0; RoomInfo.Instance.mIsExistWaitGameView = false; NotificationCenter.Instance().PostDispatchEvent((uint)ENotificationMsgType.EUpdateCreateRoomSpr); ClearPlayersDic(); }
public void GetRoomInfo(MsgRoomInfo info) { if (room == null) { room = new ArgsMsgRoomInfo(); } room.card_use_type = info.card_use_type; room.creater_id = info.creater_id; room.creater_pay = info.creater_pay; room.game_num = info.game_num; room.game_type = info.game_type; room.other_pay = info.other_pay; room.endingInfo = info.gd_ending; }
public List <MsgGameOverInfo> GetmGameOverInfoList() { ArgsMsgRoomInfo roominfo = RoomInfo.Instance.mRoom; if (roominfo == null) { return(null); } if (roominfo.endingInfo == null) { return(null); } if (roominfo.endingInfo.Count == 0) { Debug.LogError("ArgsMsgRoomInfo.endingInfo的count数量为0"); return(null); } MsgGameOverInfo gameinfo = new MsgGameOverInfo(); gameinfo.player_id = roominfo.endingInfo[0].player_id[0]; //只用到了id gameinfo.upgrade_card = roominfo.endingInfo[0].level; //打到几 mGameOverInfoList.Add(gameinfo); gameinfo = new MsgGameOverInfo(); gameinfo.player_id = roominfo.endingInfo[0].player_id[1]; //只用到了id gameinfo.upgrade_card = roominfo.endingInfo[0].level; //打到几 mGameOverInfoList.Add(gameinfo); gameinfo = new MsgGameOverInfo(); gameinfo.player_id = roominfo.endingInfo[1].player_id[0]; //只用到了id gameinfo.upgrade_card = roominfo.endingInfo[1].level; //打到几 mGameOverInfoList.Add(gameinfo); gameinfo = new MsgGameOverInfo(); gameinfo.player_id = roominfo.endingInfo[1].player_id[1]; //只用到了id gameinfo.upgrade_card = roominfo.endingInfo[1].level; //打到几 mGameOverInfoList.Add(gameinfo); return(mGameOverInfoList); }