Пример #1
0
 public User(int id, string token, Session session, UserAccountData userAccount)
 {
     mID              = id;
     mToken           = token;
     mClient          = session;
     mAccountData     = userAccount;
     mUserState       = UserState.OffLine;
     mUserBattleState = UserState.Lobbying;
 }
Пример #2
0
 /// <summary>
 /// 添加用户
 /// </summary>
 public void AddUser(string account, Session session, UserAccountData accountData)
 {
     numberOfUser++;
     if (IsValidAccount(account) == false)
     {
         string token = Guid.NewGuid().ToString();
         AllUser.Add(account, new User(numberOfUser, token, session, accountData));
     }
 }