protected override YxBaseGameUserInfo OnInitUser(ISFSObject userData) { var userInfo = new MahjongUserInfo(); userInfo.Parse(userData); return(userInfo); }
public override void SetData(ISFSObject datam, MahjongUserInfo userInfo) { if (datam.ContainsKey("laiziGang")) { mParams["laiziGang"] = new VarIntArray(datam.GetIntArray("laiziGang")); } }
public override void SetData(ISFSObject datam, MahjongUserInfo userInfo) { if (datam.ContainsKey("visibleCards")) { mParams["nius"] = new VarIntArray(datam.GetIntArray("visibleCards")); } }
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { base.SetData(data, userInfo); //胡牌 if (data.ContainsKey("hucardlist")) { mParams["hucardlist"] = new VarIntArray(data.GetIntArray("hucardlist")); } }
/// <summary> /// 设置玩家Item信息 /// </summary> private void SetPlayerInfo(int chair, MahjongUserInfo data) { if (!GameCenter.GameProcess.IsCurrState <StateGamePlaying>()) { PlayersOther.ReadyState(chair, data.IsReady); } PlayerInfoItem item = this[chair]; item.IsTing = data.IsAuto; }
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { if (data.ContainsKey("visibleCards")) { var hasLiang = data.TryGetBool(ProtocolKey.KeyHasLiang); mParams["liangdaoCards"] = new VarIntArray(data.GetIntArray("visibleCards")); mParams["hasLiang"] = new VarBool(hasLiang); userInfo.IsAuto = hasLiang; } }
public MahjongResult(int seat) { Seat = seat; Chair = MahjongUtility.GetChair(seat); MahjongUserInfo data = GameCenter.DataCenter.Players[Chair]; if (null != data) { Id = data.Id; Name = data.NickM; } }
public static void PlayPlayerSound(int chair, string soundName) { MahjongUserInfo data = GameCenter.DataCenter.Players[chair]; string sound = Sex(data.SexI); string source = sound; if (LanguageVoice == (int)CtrlSwitchType.Close) { source = GameKey + sound; } PlaySound(sound + "_" + soundName, source); }
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { if (data.ContainsKey("qiduitings")) { int[] array = data.GetIntArray("qiduitings"); userInfo.SetTinglist(array); } if (data.ContainsKey("guoval")) { mParams["guoval"] = new VarInt(data.GetInt("guoval")); } }
private void SetPlayerInfo() { ResetPlayersItem(); MahjongUserInfo data = null; MahjongPlayersData playersData = GameCenter.DataCenter.Players; for (int i = 0; i < playersData.CurrPlayerCount; i++) { data = playersData[i]; PlayersItem[data.Chair].gameObject.SetActive(true); PlayersItem[data.Chair].SetDismissSelect(StateSprites[0]); PlayersItem[data.Chair].SetDismissInfo(data.NickM, playersData.GetPlayerHead(data.Chair)); } }
/// <summary> /// CPG等特效和声音 /// </summary> /// <param name="chair">座位号</param> /// <param name="effectType">特效对象</param> /// <param name="music">特效声音</param> public static void PlayOperateEffect(int chair, PoolObjectType effectType) { MahjongUserInfo data = GameCenter.DataCenter.Players[chair]; string sound = Sex(data.SexI); string source = sound; if (LanguageVoice == (int)CtrlSwitchType.Close) { source = GameKey + sound; } //播放特效 GameCenter.Hud.UIPanelController.PlayPlayerUIEffect(chair, effectType); //播放特效声音 PlaySound(sound + "_" + effectType.ToString(), source); }
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { //状态 if (data.ContainsKey("xuezhanstatue")) { VarInt state = data.GetInt("xuezhanstatue"); mParams["state"] = state; } //定缺 if (data.ContainsKey("huanType")) { mParams["htype"] = new VarInt(data.GetInt("huanType")); } //胡牌 if (data.ContainsKey("hucard")) { mParams["hcard"] = new VarInt(data.GetInt("hucard")); } }
//播放麻将音效 public static void PlayMahjongSound(int chair, int value) { MahjongUserInfo data = GameCenter.DataCenter.Players[chair]; string sound = Sex(data.SexI); string source = sound; if (LanguageVoice == (int)CtrlSwitchType.Close) { source = GameKey + sound; } if (GameCenter.DataCenter.Config.RondomPlayMahjongSound) { int n = Random.Range(0, 2); if (n == 1) { PlaySound(sound + "_" + value + "_1", source); return; } } PlaySound(sound + "_" + value, source); }
public abstract void SetData(ISFSObject datam, MahjongUserInfo userInfo);
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { userInfo.IsAuto = data.ContainsKey("cards"); }
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { mParams["userdata"] = new VarIsfsobject(data); }
public override void SetData(ISFSObject data, MahjongUserInfo userInfo) { mParams["diling"] = new VarInt(data.TryGetInt("diling")); }