//protected override void Process () //{ // print("ggggggggggggggg"); // if(this.m_SecondSelectorParent.childCount == 0) // { // print("ggggggggggggggg1"); // if(this.m_CanGangPais.Count == 1) // { // print("ggggggggggggggg2"); // MaJiangGangPaiRequestParameter request = new MaJiangGangPaiRequestParameter(); // request.Pai = this.m_CanGangPais[0]; // CommunicationUtility.Instance.GangPai(request); // } // else // { // this.ConstructSecondSelector(); // } // } //} protected override void Process() { if (this.m_SecondSelectorParent.childCount == 0) { switch (this.m_CanGangPais.Count) { case 1: base.StopCount(); MaJiangGangPaiRequestParameter request = new MaJiangGangPaiRequestParameter(); request.Pai = this.m_CanGangPais[0]; CommunicationUtility.Instance.GangPai(request); break; default: List <KeyValuePair <int, ShouPaiBehavior> > gangPaiList = new List <KeyValuePair <int, ShouPaiBehavior> >(); foreach (int item in m_CanGangPais) { gangPaiList.AddRange(m_PaiFactory.SelfShouPais.Where(a => a.Value.Pai / 4 == item / 4)); } List <ShouPaiBehavior> ganList = new List <ShouPaiBehavior>(); gangPaiList.ForEach(a => ganList.Add(a.Value)); base.SetAllUnselectable(false, false); base.SetGangSelectable(true, true, ganList, this.m_CanGangPais); break; } } }
private void SelectGangPai() { if (this.IsGangSelectable) { MaJiangManager.Instance.ChuPaiButtonBehavior.StopCount(); this.IsGangSelectable = false; MaJiangGangPaiRequestParameter request = new MaJiangGangPaiRequestParameter(); request.Pai = this.GangPai; CommunicationUtility.Instance.GangPai(request); } }
void OnClick() { MaJiangGangPaiRequestParameter request = new MaJiangGangPaiRequestParameter(); request.Pai = this.Pai; CommunicationUtility.Instance.GangPai(request); this.FirstButton.SetAllUnselectable(false, true); for (int i = this.transform.parent.childCount - 1; i >= 0; i--) { GameObject.Destroy(this.transform.parent.GetChild(i).gameObject); } }
public void GangPai(MaJiangGangPaiRequestParameter parameter) { this.CommunicateWithServer(parameter.GetHashtableFromParameter(), ClientCommandConsts.MA_JIANG_GANG_PAI_REQUEST); }