//****************** User Interaction *********************// public override void OnOkSelected() { if (gameState == GameState.TurnSelectingNumber && localPlayer == currentTurnPlayer) { if (selectedCard != null) { netCode.NotifyHostPlayerRankSelected((int)selectedCard.Rank); } } else if (gameState == GameState.TurnWaitingForOpponentConfirmation && localPlayer == currentTurnTargetPlayer) { netCode.NotifyHostPlayerOpponentConfirmed(); } else if (gameState == GameState.GameFinished) { netCode.LeaveRoom(); } }
// User Interactions public override void OnOkSelected() { if (gameState == GameState.TurnSelectingNumber && localPlayer == currentTurnPlayer) { if (selectedCards.Count > 0) { netCode.NotifyHostPlayerRankSelected((int)selectedCards[0].Rank); //TODO fix == not correct way } } else if (gameState == GameState.TurnConfirmedSelectedNumber && localPlayer == currentTurnTargetPlayer) { netCode.NotifyHostPlayerOpponentConfirmed(); } else if (gameState == GameState.GameFinished) { netCode.LeaveRoom(); } }
//****************** User Interaction *********************// public override void OnBetSelected(float sliderVal) { if (gameState == GameState.Bet && localPlayer == currentTurnPlayer) { if (betSlider != null) { currentBet = sliderVal; gameState = GameState.ConfirmBet; netCode.NotifyHostPlayerRankSelected((int)selectedCard.Rank); } } else if (gameState == GameState.WaitingForOpponent && localPlayer == currentTurnTargetPlayer) { netCode.NotifyHostPlayerOpponentConfirmed(); } else if (gameState == GameState.GameFinished) { netCode.LeaveRoom(); } }