Esempio n. 1
0
        public bool JoinRoom(string roomName)
        {
            string msg;

            if (_inputManager.JoinRoom(roomName, out msg))
            {
                GameStateManager.ChangeState(new MainGameGameState(this));
                return(true);
            }
            else
            {
                MessageHandler.CreateMessage(msg);
                return(false);
            }
        }
Esempio n. 2
0
 public bool Register(string username, string password, string ip, string port)
 {
     if (username != "" && password != "" && ip != "" && port != "")
     {
         string temp;
         if (_netManager.Register(username, password, ip, int.Parse(port),
                                  out temp))
         {
             return(true);
         }
         else
         {
             MessageHandler.CreateMessage(temp);
             return(false);
         }
     }
     return(false);
 }