예제 #1
0
 public void UserOffline(ServerUser user)
 {
     if (userDictionary.ContainsKey(user.userName))
     {
         userDictionary.Remove(user.userName);
         user.MoveToUserGroup(null);
     }
 }
예제 #2
0
 public bool UserOnline(ServerUser user)
 {
     if(!userDictionary.ContainsKey(user.userName))
     {
         userDictionary.Add(user.userName, user);
         user.MoveToUserGroup(lobby);
         return true;
     }
     else
     {
         return false;
     }
 }