Beispiel #1
0
    void MapRenderer_OnUserInfoUpdated(MinimapMetadata.MinimapUserInfo userInfo)
    {
        usersListView.AddOrUpdateUser(userInfo);

        if (!trackedUsersHashSet.Contains(userInfo.userId))
        {
            trackedUsersHashSet.Add(userInfo.userId);
            bool isMuted = profile.muted.Contains(userInfo.userId);
            usersListView.SetUserMuted(userInfo.userId, isMuted);

            if (isMuteAll && !isMuted)
            {
                OnMuteUser(userInfo.userId, true);
            }
        }

        usersButtonView?.SetUsersCount(trackedUsersHashSet.Count);
    }
Beispiel #2
0
    void OnOtherPlayersStatusAdded(string userId, PlayerStatus playerStatus)
    {
        usersListView.AddOrUpdateUser(playerStatus);

        if (!trackedUsersHashSet.Contains(userId))
        {
            trackedUsersHashSet.Add(userId);

            bool isMuted   = profile.muted.Contains(userId);
            bool isBlocked = profile.blocked != null?profile.blocked.Contains(userId) : false;

            usersListView.SetUserMuted(userId, isMuted);
            usersListView.SetUserBlocked(userId, isBlocked);

            if (isMuteAll && !isMuted)
            {
                OnMuteUser(userId, true);
            }
        }

        usersButtonView?.SetUsersCount(trackedUsersHashSet.Count);
    }