Exemplo n.º 1
0
        private void JoinGameBtn_Click(object sender, EventArgs e)
        {
            string playerName = UserNameInput.Text;

            if (!IsPlayerNameValid(playerName))
            {
                UserNameInput.Text = "Enter your name";
                return;
            }

            string sessionName = SessionCodeInput.Text;

            if (!IsSessionNameValid(sessionName))
            {
                SessionCodeInput.Text = "Enter the session code";
                return;
            }

            networking.JoinSession(sessionName, playerName);
            RunGame();
        }