/** * 客户端请求用户信息 * @param playerInfoData 玩家信息 */ public void GC_QUERY_PLAYER_INFO(InputMessage data) { PlayerInfoData playerInfoData = new PlayerInfoData(); playerInfoData.playerId = data.GetLong(); //玩家id playerInfoData.name = data.GetString(); //名字 playerInfoData.img = data.GetString(); //图片 playerInfoData.gold = data.GetLong(); //玩家筹码 playerInfoData.diamond = data.GetLong(); //钻石 playerInfoData.charm = data.GetLong(); //玩家筹码 playerInfoData.level = data.GetLong(); //等级 playerInfoData.sex = data.GetInt(); //性别 playerInfoData.viplevel = data.GetInt(); //vip等级 playerInfoData.countries = data.GetString(); //国籍 playerInfoData.age = data.GetInt(); //年龄 playerInfoData.slotRotate = data.GetLong(); //总转次数 playerInfoData.slotWin = data.GetLong(); //总赢得分 playerInfoData.slotSingleWin = data.GetLong(); //单次赢取最大 playerInfoData.slotWinNum = data.GetLong(); //玩家总胜利次数 playerInfoData.integral = data.GetLong(); //排行榜积分 playerInfoData.isRequest = data.GetInt(); //是否已经申请添加好友 0:未申请,1:已申请 playerInfoData.newGuyGift = data.GetInt(); //新手大礼包:1已购买,0 未购买 playerInfoData.clubId = data.GetString(); //俱乐部id,空字符串表示未加入俱乐部 playerInfoData.clubIco = data.GetInt(); //俱乐部图标 playerInfoData.clubInvitedTimes = data.GetInt(); //被俱乐部邀请次数,0为未被邀请 PlayerHandler.Instance().GC_QUERY_PLAYER_INFO(playerInfoData); }
/** * 客户端请求用户信息 * @param playerInfoData 玩家信息 */ public void GC_QUERY_PLAYER_INFO_NAME(InputMessage data) { int i, size; ArrayList playerInfoData = new ArrayList(); size = data.GetShort(); for (i = 0; i < size; i++) { PlayerInfoData playerInfoData_Datas = new PlayerInfoData(); playerInfoData_Datas.playerId = data.GetLong(); playerInfoData_Datas.name = data.GetString(); //名字 playerInfoData_Datas.img = data.GetString(); //图片 playerInfoData_Datas.gold = data.GetLong(); playerInfoData_Datas.diamond = data.GetLong(); playerInfoData_Datas.charm = data.GetLong(); playerInfoData_Datas.level = data.GetLong(); playerInfoData_Datas.sex = data.GetInt(); //性别 playerInfoData_Datas.viplevel = data.GetInt(); //vip等级 playerInfoData_Datas.countries = data.GetString(); //国籍 playerInfoData_Datas.age = data.GetInt(); //年龄 playerInfoData_Datas.slotRotate = data.GetLong(); playerInfoData_Datas.slotWin = data.GetLong(); playerInfoData_Datas.slotSingleWin = data.GetLong(); playerInfoData_Datas.slotWinNum = data.GetLong(); playerInfoData_Datas.integral = data.GetLong(); playerInfoData_Datas.isRequest = data.GetInt(); //是否已经申请添加好友 0:未申请,1:已申请 playerInfoData_Datas.newGuyGift = data.GetInt(); //新手大礼包:1已购买,0 未购买 playerInfoData_Datas.clubId = data.GetString(); //俱乐部id,空字符串表示未加入俱乐部 playerInfoData_Datas.clubIco = data.GetInt(); //俱乐部图标 playerInfoData_Datas.clubInvitedTimes = data.GetInt(); //被俱乐部邀请次数,0为未被邀请 playerInfoData_Datas.achieveRate = data.GetString(); //无双吹牛 成就 完成个数/总个数 playerInfoData.Add(playerInfoData_Datas); } PlayerHandler.Instance().GC_QUERY_PLAYER_INFO_NAME(playerInfoData); }
static public void Save(PlayerInfo.Info info) { datas = new ArrayList(); datas.Add(info); PlayerInfoData.SaveData("PlayerInfoData.sav"); }
/** * 客户端请求好友列表 * @param friendRequestInfoDataList 玩家信息 */ public void GC_LOAD_FRIEND_REQUEST_LIST(InputMessage data) { int i, size; ArrayList friendRequestInfoDataList = new ArrayList(); size = data.GetShort(); for (i = 0; i < size; i++) { PlayerInfoData friendRequestInfoDataList_Datas = new PlayerInfoData(); friendRequestInfoDataList_Datas.playerId = data.GetLong(); friendRequestInfoDataList_Datas.name = data.GetString(); //名字 friendRequestInfoDataList_Datas.img = data.GetString(); //图片 friendRequestInfoDataList_Datas.gold = data.GetLong(); friendRequestInfoDataList_Datas.diamond = data.GetLong(); friendRequestInfoDataList_Datas.charm = data.GetLong(); friendRequestInfoDataList_Datas.level = data.GetLong(); friendRequestInfoDataList_Datas.sex = data.GetInt(); //性别 friendRequestInfoDataList_Datas.viplevel = data.GetInt(); //vip等级 friendRequestInfoDataList_Datas.countries = data.GetString(); //国籍 friendRequestInfoDataList_Datas.age = data.GetInt(); //年龄 friendRequestInfoDataList_Datas.slotRotate = data.GetLong(); friendRequestInfoDataList_Datas.slotWin = data.GetLong(); friendRequestInfoDataList_Datas.slotSingleWin = data.GetLong(); friendRequestInfoDataList_Datas.slotWinNum = data.GetLong(); friendRequestInfoDataList_Datas.integral = data.GetLong(); friendRequestInfoDataList_Datas.isRequest = data.GetInt(); //是否已经申请添加好友 0:未申请,1:已申请 friendRequestInfoDataList_Datas.newGuyGift = data.GetInt(); //新手大礼包:1已购买,0 未购买 friendRequestInfoDataList_Datas.clubId = data.GetString(); //俱乐部id,空字符串表示未加入俱乐部 friendRequestInfoDataList_Datas.clubIco = data.GetInt(); //俱乐部图标 friendRequestInfoDataList_Datas.clubInvitedTimes = data.GetInt(); //被俱乐部邀请次数,0为未被邀请 friendRequestInfoDataList_Datas.achieveRate = data.GetString(); //无双吹牛 成就 完成个数/总个数 friendRequestInfoDataList.Add(friendRequestInfoDataList_Datas); } RelationHandler.Instance().GC_LOAD_FRIEND_REQUEST_LIST(friendRequestInfoDataList); }
/** * 请求添加好友同步 * @param friendRequestInfoData 玩家信息 */ public void GC_REQUEST_FRIEND_SYNC(InputMessage data) { PlayerInfoData friendRequestInfoData = new PlayerInfoData(); friendRequestInfoData.playerId = data.GetLong(); //玩家id friendRequestInfoData.name = data.GetString(); //名字 friendRequestInfoData.img = data.GetString(); //图片 friendRequestInfoData.gold = data.GetLong(); //玩家筹码 friendRequestInfoData.diamond = data.GetLong(); //钻石 friendRequestInfoData.charm = data.GetLong(); //玩家筹码 friendRequestInfoData.level = data.GetLong(); //等级 friendRequestInfoData.sex = data.GetInt(); //性别 friendRequestInfoData.viplevel = data.GetInt(); //vip等级 friendRequestInfoData.countries = data.GetString(); //国籍 friendRequestInfoData.age = data.GetInt(); //年龄 friendRequestInfoData.slotRotate = data.GetLong(); //总转次数 friendRequestInfoData.slotWin = data.GetLong(); //总赢得分 friendRequestInfoData.slotSingleWin = data.GetLong(); //单次赢取最大 friendRequestInfoData.slotWinNum = data.GetLong(); //玩家总胜利次数 friendRequestInfoData.integral = data.GetLong(); //排行榜积分 friendRequestInfoData.isRequest = data.GetInt(); //是否已经申请添加好友 0:未申请,1:已申请 friendRequestInfoData.newGuyGift = data.GetInt(); //新手大礼包:1已购买,0 未购买 friendRequestInfoData.clubId = data.GetString(); //俱乐部id,空字符串表示未加入俱乐部 friendRequestInfoData.clubIco = data.GetInt(); //俱乐部图标 friendRequestInfoData.clubInvitedTimes = data.GetInt(); //被俱乐部邀请次数,0为未被邀请 friendRequestInfoData.achieveRate = data.GetString(); //无双吹牛 成就 完成个数/总个数 RelationHandler.Instance().GC_REQUEST_FRIEND_SYNC(friendRequestInfoData); }
protected override void HandleComs(List <BaseCom> comList) { BackgroundCom com = GetCom <BackgroundCom>(comList[0]); //背景滚动 for (int i = 0; i < com.BGBoxs.Count; i++) { MoveBg(com, com.BGBoxs[i], 0.1f + i * 0.1f); } //背景复用 PlayerInfoData playerInfo = ECSLayerLocate.Info.GetWorldInfo <PlayerInfoData>(WorldInfoKey.PlayerInfo); Vector3 playerPos = playerInfo.Pos; Vector3 pos = new Vector3(playerPos.x - 45, -10); Vector3 size = new Vector3(90, 20); Rect bgCheck = new Rect(pos, size); for (int i = 0; i < com.BGBoxs.Count; i++) { ReplaceBg(com, com.BGBoxs[i], bgCheck, playerPos.x); } com.LastCameraPosition = com.CameraTran.position; }
public static PlayerInfoData Deserialize(byte[] bin) { PlayerInfoData data = new PlayerInfoData(); data.id = IPAddress.NetworkToHostOrder(BitConverter.ToInt32(bin, 0)); data.team = (Team)BitConverter.ToChar(bin, 4); return(data); }
// Start is called before the first frame update void Start() { data = new PlayerInfoData(); if (GetComponent <PhotonView>().IsMine) { data.id = GetComponent <PhotonView>().ViewID; data.team = (Team)PhotonNetwork.LocalPlayer.CustomProperties["team"]; } }
/** * 客户端请求用户信息 * @param playerInfoData 玩家信息 * @param bazooPersonalInfo 玩家信息 */ public void GC_QUERY_PLAYER_INFO(InputMessage data) { int i, size; PlayerInfoData playerInfoData = new PlayerInfoData(); playerInfoData.playerId = data.GetLong(); //玩家id playerInfoData.name = data.GetString(); //名字 playerInfoData.img = data.GetString(); //图片 playerInfoData.gold = data.GetLong(); //玩家筹码 playerInfoData.diamond = data.GetLong(); //钻石 playerInfoData.charm = data.GetLong(); //玩家筹码 playerInfoData.level = data.GetLong(); //等级 playerInfoData.sex = data.GetInt(); //性别 playerInfoData.viplevel = data.GetInt(); //vip等级 playerInfoData.countries = data.GetString(); //国籍 playerInfoData.age = data.GetInt(); //年龄 playerInfoData.slotRotate = data.GetLong(); //总转次数 playerInfoData.slotWin = data.GetLong(); //总赢得分 playerInfoData.slotSingleWin = data.GetLong(); //单次赢取最大 playerInfoData.slotWinNum = data.GetLong(); //玩家总胜利次数 playerInfoData.integral = data.GetLong(); //排行榜积分 playerInfoData.isRequest = data.GetInt(); //是否已经申请添加好友 0:未申请,1:已申请 playerInfoData.newGuyGift = data.GetInt(); //新手大礼包:1已购买,0 未购买 playerInfoData.clubId = data.GetString(); //俱乐部id,空字符串表示未加入俱乐部 playerInfoData.clubIco = data.GetInt(); //俱乐部图标 playerInfoData.clubInvitedTimes = data.GetInt(); //被俱乐部邀请次数,0为未被邀请 playerInfoData.achieveRate = data.GetString(); //无双吹牛 成就 完成个数/总个数 ArrayList bazooPersonalInfo = new ArrayList(); size = data.GetShort(); for (i = 0; i < size; i++) { BazooPersonalInfo bazooPersonalInfo_Datas = new BazooPersonalInfo(); bazooPersonalInfo_Datas.modeType = data.GetInt(); //性别 bazooPersonalInfo_Datas.numberOfGame = data.GetInt(); //所有模式:局数 bazooPersonalInfo_Datas.singleTopGold = data.GetLong(); bazooPersonalInfo_Datas.rateOfWinning = data.GetInt(); //吹牛模式:胜率 bazooPersonalInfo_Datas.aWinningStreak = data.GetInt(); //吹牛模式:连胜 bazooPersonalInfo_Datas.passToKill = data.GetInt(); //牛牛模式:通杀 bazooPersonalInfo_Datas.bigPatterns = data.GetString(); //牛牛模式:最大牌型 bazooPersonalInfo_Datas.pantherNumber = data.GetInt(); //梭哈模式:豹子数 bazooPersonalInfo_Datas.threeKill = data.GetInt(); //三杀 bazooPersonalInfo_Datas.fourKill = data.GetInt(); //四杀 bazooPersonalInfo_Datas.fiveKill = data.GetInt(); //五杀 bazooPersonalInfo_Datas.dayProfit = data.GetLong(); bazooPersonalInfo_Datas.weekProfit = data.GetLong(); bazooPersonalInfo_Datas.monthProfit = data.GetLong(); bazooPersonalInfo.Add(bazooPersonalInfo_Datas); } PlayerHandler.Instance().GC_QUERY_PLAYER_INFO(playerInfoData, bazooPersonalInfo); }
public override void Unpack(byte[] data) { Reset(data); int count = ReadByte(); for (int i = 0; i < count; i++) { PlayerInfoData info = new PlayerInfoData(); info.PlayerID = ReadByte(); info.Attributes = (PlayerAttributes)ReadByte(); PlayerUpdates.Add(info); } }
protected override void HandleComs(List <BaseCom> comList) { if (MapCom == null) { MapCom = GetCom <MapCom>(comList[0]); } if (GoCom == null) { GoCom = GetCom <GameObjectCom>(comList[1]); } PlayerInfoData playerInfo = ECSLayerLocate.Info.GetWorldInfo <PlayerInfoData>(WorldInfoKey.PlayerInfo); RefreshMap(playerInfo.Pos); UpdatePlayerMapPos(playerInfo.Pos); }
private void OnDrawGizmos() { if (DrawGizmos == false) { return; } if (!Application.isPlaying) { return; } PlayerInfoData playerInfo = ECSLayerLocate.Info.GetWorldInfo <PlayerInfoData>(WorldInfoKey.PlayerInfo); //地图检测 DrawMapCheckBox(playerInfo.Pos); //背景检测 DrawBgCheckBox(playerInfo.Pos); }
private IEnumerator GetAllPlayerInfo() { var msg = NetManager.Instance.GetAllCharactersLoginInfo(-1); yield return(msg.SendAndWaitUntilDone()); if (msg.State == MessageState.Reply) { mServerListDataModel.PlayerList.Clear(); var filterList = FilterPlayer(msg.Response.CharacterInfos); foreach (var info in filterList) { var playerInfo = new PlayerInfoData { PlayerName = info.Name, PlayerType = info.TypeId }; playerInfo.FaceId = GameUtils.GetRebornCircleIconId(info.TypeId, info.RebornTimes); var tableId = info.RebornTimes <= 0 ? 1053 : 1038; var dicDesc = GameUtils.GetDictionaryText(tableId); if (!string.IsNullOrEmpty(dicDesc)) { if (info.RebornTimes <= 0) { playerInfo.LevelAndReborn = string.Format(dicDesc, info.Level); } else { playerInfo.LevelAndReborn = string.Format(dicDesc, info.RebornTimes, info.Level); } } ServerInfoData serverInfo; if (serverCacheDictionary.TryGetValue(info.ServerId, out serverInfo)) { playerInfo.ServerInfo = serverInfo; mServerListDataModel.PlayerList.Add(playerInfo); } } if (mServerListDataModel.PlayerList.Count >= 1) { mServerListDataModel.PlayerList[0].IsSelectedRole = true; } } }
private void OnPlayerInfoReceived(NetworkMessage netMsg) { var objectMessage = netMsg.ReadMessage <PlayerInfoMessage>(); PlayerInfoData playerInfo = new PlayerInfoData { id = objectMessage.id, Nom = objectMessage.lastName, Prenom = objectMessage.firstName, Sex = "", Age = objectMessage.age, Specialite = objectMessage.specialty, Etablissement = objectMessage.establishment, Remarques = "", }; //string json = JsonUtility.ToJson(playerInfo); //print(json); playerInfos.Add(objectMessage.id, playerInfo); Text_Connexion.addConnectedPlayer(); //File.WriteAllText(Application.dataPath + "/joueur_"+ playerInfo.Nom+"," + DateTime.Now.ToString("dd-MM-yyyy") + "_a_" + DateTime.Now.ToString("hh") + "h" + DateTime.Now.ToString("mm") + "m" + DateTime.Now.ToString("ss") + "s" +.json", json); }