public SelectPlayerMenuViewModel(Game game, ShowCardButton showCardButton)
 {
     AddCardToPlayer1 = new AddCardToPlayerCommand(game.Players[0], showCardButton.Card);
     AddCardToPlayer2 = new AddCardToPlayerCommand(game.Players[1], showCardButton.Card);
     AddCardToPlayer3 = new AddCardToPlayerCommand(game.Players[2], showCardButton.Card);
     AddCardToPlayer4 = new AddCardToPlayerCommand(game.Players[3], showCardButton.Card);
 }
예제 #2
0
 public void ShowDetails()
 {
     cardImage.SetActive(false);
     ViewingPanel.SetActive(true);
     ButtonPanel.SetActive(true);
     ShowCardButton.SetActive(true);
     ShowDetailsButton.SetActive(false);
 }
예제 #3
0
        private void SendButtonImageResponse(Socket socket, ShowCardButton cardButton)
        {
            var buttonImageResponse = new ButtonImageResponse {
                Name  = cardButton?.Card.Name,
                Bytes = cardButton?.Card.ButtonImageAsBytes
            };

            Send(socket, buttonImageResponse.ToString());
        }