Пример #1
0
        private void HandleLocalPlayerKong()
        {
            CurrentRoundStatus.SetCurrentPlaceIndex(KongPlayerIndex);
            int placeIndex = CurrentRoundStatus.CurrentPlaceIndex;

            Assert.IsTrue(placeIndex == 0);
            CurrentRoundStatus.CheckLocalHandTiles(HandData.HandTiles);
            CurrentRoundStatus.ClearLastDraws();
            CurrentRoundStatus.SetMahjongSetData(MahjongSetData);
            controller.TableTilesManager.SetMelds(placeIndex, HandData.OpenMelds);
            ClientBehaviour.Instance.OnSkipOutTurnOperation(BonusTurnTime);
            controller.ShowEffect(placeIndex, PlayerEffectManager.Type.Kong);
        }
Пример #2
0
        private void HandleOtherPlayerKong()
        {
            CurrentRoundStatus.SetCurrentPlaceIndex(KongPlayerIndex);
            int placeIndex = CurrentRoundStatus.CurrentPlaceIndex;

            Debug.Log($"Hand tile count of player {KongPlayerIndex}: {HandData.HandTiles.Length}");
            CurrentRoundStatus.SetHandTiles(placeIndex, HandData.HandTiles.Length);
            CurrentRoundStatus.ClearLastDraws();
            CurrentRoundStatus.SetMahjongSetData(MahjongSetData);
            controller.TableTilesManager.SetMelds(placeIndex, HandData.OpenMelds);
            controller.ShowEffect(placeIndex, PlayerEffectManager.Type.Kong);
            controller.ShowOutTurnPanels(Operations, BonusTurnTime);
        }
        private IEnumerator UpdateHandData(int currentPlaceIndex, bool discardingLastDraw, Tile tile, RiverData[] rivers)
        {
            CurrentRoundStatus.ClearLastDraws();
            controller.TableTilesManager.DiscardTile(currentPlaceIndex, discardingLastDraw);
            Debug.Log($"Playing player (place: {currentPlaceIndex}) discarding animation");
            yield return(new WaitForEndOfFrame());

            for (int playerIndex = 0; playerIndex < rivers.Length; playerIndex++)
            {
                int placeIndex = CurrentRoundStatus.GetPlaceIndex(playerIndex);
                CurrentRoundStatus.SetRiverData(placeIndex, rivers[playerIndex]);
            }
            var panelShown = controller.ShowOutTurnPanels(Operations, BonusTurnTime);

            if (panelShown)
            {
                controller.TableTilesManager.ShineLastTile(currentPlaceIndex);
            }
        }