예제 #1
0
        private void HandleBei(InTurnOperation operation)
        {
            int playerIndex = CurrentRoundStatus.CurrentPlayerIndex;

            Debug.Log($"Player {playerIndex} has claimed a bei-dora");
            ServerBehaviour.Instance.BeiDora(playerIndex);
        }
예제 #2
0
        private void HandleRoundDraw(InTurnOperation operation)
        {
            int playerIndex = CurrentRoundStatus.CurrentPlayerIndex;

            Debug.Log($"Player {playerIndex} has claimed 9-orphans");
            ServerBehaviour.Instance.RoundDraw(RoundDrawType.NineOrphans);
        }
예제 #3
0
        private void HandleKong(InTurnOperation operation)
        {
            int playerIndex = CurrentRoundStatus.CurrentPlayerIndex;
            var kong        = operation.Meld;

            Debug.Log($"Server is handling the operation of player {playerIndex} of claiming kong {kong}");
            ServerBehaviour.Instance.Kong(playerIndex, kong);
        }
예제 #4
0
        public void OnInTurnButtonClicked(InTurnOperation operation)
        {
            Debug.Log($"Requesting to proceed operation: {operation}");
            int bonusTimeLeft = controller.TurnTimeController.StopCountDown();

            OnInTurnOperationTaken(operation, bonusTimeLeft);
            controller.InTurnPanelManager.Close();
        }
예제 #5
0
 public void OnRichiButtonClicked(InTurnOperation operation)
 {
     if (operation.Type != InTurnOperationType.Richi)
     {
         Debug.LogError($"Cannot send a operation with type {operation.Type} within OnRichiButtonClicked method");
         return;
     }
     // show richi selection panel
     Debug.Log($"Showing richi selection panel, candidates: {string.Join(",", operation.RichiAvailableTiles)}");
     CurrentRoundStatus.SetRichiing(true);
     controller.HandPanelManager.SetCandidates(operation.RichiAvailableTiles);
 }
예제 #6
0
        private void OnInTurnOperationTaken(InTurnOperation operation, int bonusTurnTime)
        {
            var info = new EventMessages.InTurnOperationInfo
            {
                PlayerIndex   = CurrentRoundStatus.LocalPlayerIndex,
                Operation     = operation,
                BonusTurnTime = bonusTurnTime
            };

            PhotonNetwork.RaiseEvent(
                EventMessages.InTurnOperationEvent, info,
                EventMessages.ToMaster, EventMessages.SendReliable);
        }
예제 #7
0
        public void OnTsumoButtonClicked(InTurnOperation operation)
        {
            if (operation.Type != InTurnOperationType.Tsumo)
            {
                Debug.LogError($"Cannot send a operation with type {operation.Type} within OnTsumoButtonClicked method");
                return;
            }
            int bonusTimeLeft = controller.TurnTimeController.StopCountDown();

            Debug.Log($"Sending request of tsumo operation with bonus turn time {bonusTimeLeft}");
            OnInTurnOperationTaken(operation, bonusTimeLeft);
            controller.InTurnPanelManager.Close();
        }
예제 #8
0
        private void HandleTsumo(InTurnOperation operation)
        {
            int playerIndex = CurrentRoundStatus.CurrentPlayerIndex;

            ServerBehaviour.Instance.Tsumo(playerIndex, operation.Tile, tsumoPointInfo);
        }