コード例 #1
0
        protected virtual void onProfileDataUpdated(ProfileData profileData)
        {
            DataEntityHandle entityByComponent = dataEntityCollection.GetEntityByComponent(profileData);
            int poolIndexFromHandle            = getPoolIndexFromHandle(entityByComponent);

            if (poolIndexFromHandle >= 0 && pooledScrollRect.IsIndexCellVisible(poolIndexFromHandle))
            {
                string displayName = dataEntityCollection.GetComponent <DisplayNameData>(entityByComponent).DisplayName;
                AbstractPlayerListItem component = pooledScrollRect.GetCellAtIndex(poolIndexFromHandle).GetComponent <AbstractPlayerListItem>();
                bool flag = getIsOnline(entityByComponent) || !ShowPlayerOfflineState;
                component.SetOnlineStatus(flag);
                component.UpdateProfileData(profileData);
                renderPlayer(component, entityByComponent, displayName, flag);
            }
        }