private void HandleBei(InTurnOperation operation) { int playerIndex = CurrentRoundStatus.CurrentPlayerIndex; Debug.Log($"Player {playerIndex} has claimed a bei-dora"); ServerBehaviour.Instance.BeiDora(playerIndex); }
private void HandleRoundDraw(InTurnOperation operation) { int playerIndex = CurrentRoundStatus.CurrentPlayerIndex; Debug.Log($"Player {playerIndex} has claimed 9-orphans"); ServerBehaviour.Instance.RoundDraw(RoundDrawType.NineOrphans); }
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); }
public void OnInTurnButtonClicked(InTurnOperation operation) { Debug.Log($"Requesting to proceed operation: {operation}"); int bonusTimeLeft = controller.TurnTimeController.StopCountDown(); OnInTurnOperationTaken(operation, bonusTimeLeft); controller.InTurnPanelManager.Close(); }
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); }
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); }
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(); }
private void HandleTsumo(InTurnOperation operation) { int playerIndex = CurrentRoundStatus.CurrentPlayerIndex; ServerBehaviour.Instance.Tsumo(playerIndex, operation.Tile, tsumoPointInfo); }