private IEnumerator <float> ZhaNiaoAnimation() { if (mArgs.ZhaMa != null && !GameUtils.CheckStopTask()) { yield return(Config.TimeZhaniaoAni * 2); var zhaArr = mArgs.ZhaMa; var zhongArr = mArgs.ZhongMa; if (zhaArr != null && zhaArr.Length != 0) { //有中码 var flag = null != zhongArr && zhongArr.Length > 0; ZhaniaoArgs args = new ZhaniaoArgs(); args.ZhaMaList.AddRange(zhaArr); if (flag) { args.ZhongMaAllList.AddRange(zhongArr); } GameCenter.Hud.GetPanel <PanelZhaniao>().Open(args); float time = (zhaArr.Length) * 0.7f + 0.5f; yield return(time); } } }
public void Open(ZhaniaoArgs args) { base.Open(); mZhaniaoItems.Clear(); mZhamaList = args.ZhaMaList; mZhongmaList = args.ZhongMaAllList; SetBgLayout(mZhamaList.Count); for (int i = 0; i < mZhamaList.Count; i++) { var item = ItemStore.GetItem <ZhaniaoItem>(i); if (item != null) { mZhaniaoItems.Add(item); item.OnInit(mZhamaList[i]); } } // 动画 ContinueTaskManager.NewTask().AppendFuncTask(ShowCardTask).Start(); // 中码声音 MahjongUtility.PlayEnvironmentSound("biyou"); }