예제 #1
0
        public override void OnClientStateEnter()
        {
            CurrentRoundStatus.SetCurrentPlaceIndex(TsumoPlayerIndex);
            var placeIndex = CurrentRoundStatus.CurrentPlaceIndex;

            CurrentRoundStatus.DrawTile(placeIndex, WinningTile);
            var data = new SummaryPanelData
            {
                HandInfo = new PlayerHandInfo
                {
                    HandTiles         = TsumoHandData.HandTiles,
                    OpenMelds         = TsumoHandData.OpenMelds,
                    WinningTile       = WinningTile,
                    DoraIndicators    = DoraIndicators,
                    UraDoraIndicators = UraDoraIndicators,
                    IsRichi           = IsRichi,
                    IsTsumo           = true
                },
                PointInfo   = new PointInfo(TsumoPointInfo),
                TotalPoints = TotalPoints,
                PlayerName  = TsumoPlayerName
            };

            // reveal hand tiles
            controller.StartCoroutine(controller.RevealHandTiles(placeIndex, TsumoHandData));
            controller.StartCoroutine(ShowAnimations(placeIndex, data));
        }
예제 #2
0
        private IEnumerator ShowAnimations(int placeIndex, SummaryPanelData data)
        {
            var duration = controller.ShowEffect(placeIndex, PlayerEffectManager.Type.Tsumo);

            yield return(new WaitForSeconds(duration));

            controller.PointSummaryPanelManager.ShowPanel(data, () =>
            {
                Debug.Log("Sending readiness message");
                ClientBehaviour.Instance.ClientReady();
            });
        }
예제 #3
0
        public void ShowPanel(SummaryPanelData data, UnityAction callback)
        {
            ConfirmButton.onClick.RemoveAllListeners();
            ConfirmButton.onClick.AddListener(() =>
            {
                ConfirmCountDownController.StopCountDown();
                callback();
            });
            gameObject.SetActive(true);
            PlayerNameText.text = data.PlayerName;
            HandTileManager.SetHandTiles(data.HandInfo.HandTiles, data.HandInfo.OpenMelds, data.HandInfo.WinningTile);
            WinTypeManager.SetType(data.HandInfo.IsTsumo);
            var uraDora = data.HandInfo.IsRichi ? data.HandInfo.UraDoraIndicators : null;

            DoraPanelManager.SetDoraIndicators(data.HandInfo.DoraIndicators, uraDora);
            // yaku list, total point and yaku rank
            Timing.RunCoroutine(YakuListCoroutine(data.PointInfo, data.TotalPoints, data.HandInfo.IsRichi, callback));
        }