IEnumerator initMediumShow() { var iLen = lCardDatas.Count; for (int i = 0; i < 5; i++) { for (int j = 0; j < 10; j++) { int idx = iLen - 1 - (j + 10 * i); int iCard = lCardDatas[idx]; int iCardNum = iCard % 100; int iCardType = (int)Mathf.Floor(iCard / 100); int iRow = i; CardSpider card = lCards[idx]; card.init(iCardNum, iCardType, 1, iRow, this); var iPosX = _prx - 30 * (4 - i); card.transform.localPosition = new Vector3(iPosX - 30, _ply, 0); var pos = card.gameObject.GetComponent <RectTransform>().anchoredPosition; card.showMove(iPosX - pos.x, 0, iPosX); } yield return(new WaitForSeconds(0.2f)); } }
IEnumerator playCards() { yield return(new WaitForSeconds(1.2f)); adMgr.PlaySound("start"); int len = lCardDatas.Count - 50; for (var i = 0; i < 6; i++) { for (int j = 0; j < IROWCOUNT; j++) { int idx = j + IROWCOUNT * i; if (idx >= len) { break; } int iCard = lCardDatas[idx]; int iCardNum = iCard % 100; int iCardType = (int)Mathf.Floor(iCard / 100); CardSpider card = lCards[idx]; card.init(iCardNum, iCardType, 0, j, this); var iPosX = _px + 60 * j; var iPosY = _py - 30 * i; var pos = card.gameObject.GetComponent <RectTransform>().anchoredPosition; card.showMove(iPosX - pos.x, iPosY - pos.y, iPosX); } yield return(new WaitForSeconds(0.2f)); } showInitCards(); coPlayTime = StartCoroutine(playTextTime()); yield return(new WaitForSeconds(0.5f)); setTouchable(true); }