Пример #1
0
        public User CreateUser(string connectionId)
        {
            User user = new User(connectionId, Interlocked.Increment(ref _userIDs));
            _userList.TryAdd(connectionId, user);

            return user;
        }
Пример #2
0
        public void UserReady(User user)
        {
            if (_playersLoading.Contains(user.ID))
            {
                _playersLoading.Remove(user.ID);

                if (_playersLoading.Count == 0)
                {
                    _loadingComplete();
                }
            }
        }
Пример #3
0
 public void UserReady(User user)
 {
     if (State == MatchState.Loading)
     {
         _loadingHandler.UserReady(user);
     }
 }
Пример #4
0
 public void MovementCommand(User by, MovementFlag direction)
 {
     _cycles[by.ID].RegisterMove(direction);
 }