//有座玩家财富变更 public void SeatPlayerwealth(long uid, long exchangeGold, long residueGold) { if (PlayerCache.SeatPlayerinfoDic.ContainsKey(uid)) { PlayerCache.SeatPlayerinfoDic.TryGetValue(uid, out GameDicePositionPlayerInfoDto value); SeatList[value.position].transform.GetChild(0).GetChild(2).GetComponent <Text>().text = NumberConvert.ConvertW(residueGold); GameDicePositionPlayerInfoDto player = value; player.gold = residueGold; PlayerCache.SeatPlayerinfoDic.Remove(uid); PlayerCache.SeatPlayerinfoDic.Add(uid, player); } }
//有人上座 public override void playerPositionUp(GameDicePositionPlayerInfoDto dto) { UIDicePlane uIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>(); if (PlayerCache.SeatPlayerinfoDic.ContainsKey(dto.uid)) { PlayerCache.SeatPlayerinfoDic.Remove(dto.uid); } //把玩家信息添加进字典中 PlayerCache.SeatPlayerinfoDic.Add(dto.uid, dto); //调用座位增加方法 uIDicePlane.UISeatReduch(); }
//本人上座位 public override void positionUp2CallBack(bool callBackParam) { UIDicePlane UIDicePlane = MessageManager.GetInstance.GetUIDict <UIDicePlane>(); if (callBackParam == true) {//存进座位字典中 GameDicePositionPlayerInfoDto playerRoomBaseInfoDto = new GameDicePositionPlayerInfoDto(); playerRoomBaseInfoDto.uid = PlayerCache.loginInfo.uid; playerRoomBaseInfoDto.useAutoId = PlayerCache.loginInfo.useAutoId; playerRoomBaseInfoDto.gold = PlayerCache.loginInfo.gold; playerRoomBaseInfoDto.headUrl = PlayerCache.loginInfo.headImgUrl; playerRoomBaseInfoDto.position = UIDicePlane.PostionSeat; playerRoomBaseInfoDto.userName = PlayerCache.loginInfo.userName; playerRoomBaseInfoDto.vipLv = PlayerCache.loginInfo.vipLv; PlayerCache.SeatPlayerinfoDic.Add(playerRoomBaseInfoDto.uid, playerRoomBaseInfoDto); //调用座位增加方法 UIDicePlane.UISeatReduch(); } }
/// <summary> /// 有人上位置 /// </summary> public virtual void playerPositionUp(GameDicePositionPlayerInfoDto dto) { }