public void PickHai(Hai hai, bool newPicked = false, bool isShow = false) { tehai.AddPai(hai, newPicked, isShow); }
private IEnumerator Show_Internel() { for (int i = 0; i < agariInfoList.Count; i++) { currentAgari = agariInfoList[i]; InitYakuInfo(); SetTenbouInfo(false); InitDoraHais(currentAgari.allOmoteDoraHais, currentAgari.allUraDoraHais); ShowOmoteDora(currentAgari.openedOmoteDoraCount); ShowUraDora(currentAgari.openedUraDoraCount); Player player = currentAgari.agariPlayer; tehai.BindPlayer(player); fuuro.BindPlayer(player); UpdateKyokuInfo(); Fuuro[] fuuros = player.Tehai.getFuuros(); fuuro.UpdateFuuro(fuuros); Hai addHai = currentAgari.agariHai; Hai[] hais = player.Tehai.getJyunTehai(); tehai.SetTehai(hais, false); tehai.AddPai(addHai, true, true); tehai.SetAllHaisVisiable(true); float tehaiPosOffsetX = 0; // move to left if Fuuro has too many DaiMinKan or AnKan. // TODO: it's not fit the UI on 4 fuuros and over 3 KaKan or DaiMinKan // move tehai position or scale down fuuros for (int f = 0; f < fuuros.Length; f++) { switch (fuuros[i].Type) { case EFuuroType.MinKou: case EFuuroType.MinShun: tehaiPosOffsetX += (MahjongPai.Height - MahjongPai.Width); break; case EFuuroType.AnKan: tehaiPosOffsetX += MahjongPai.Width * 0.5f; break; case EFuuroType.DaiMinKan: case EFuuroType.KaKan: tehaiPosOffsetX += (MahjongPai.Height - MahjongPai.Width) + MahjongPai.Width * 0.5f; break; } } Vector3 pos = tehai.transform.localPosition; pos.x = -tehaiPosOffsetX; tehai.transform.localPosition = pos; yield return(StartCoroutine(ShowYakuOneByOne())); yield return(new WaitForSeconds(3f)); } ShowSkipButton(); currentAgari = null; }