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); } }
protected virtual void setUpObject(RectTransform item, int poolIndex) { AbstractPlayerListItem component = item.GetComponent <AbstractPlayerListItem>(); DataEntityHandle handleFromPoolIndex = getHandleFromPoolIndex(poolIndex); AbstractPlayerListItem component2 = item.GetComponent <AbstractPlayerListItem>(); string displayName2 = (component2.Name = dataEntityCollection.GetComponent <DisplayNameData>(handleFromPoolIndex).DisplayName); component2.SetPlayer(handleFromPoolIndex); ProfileData component3; bool flag = dataEntityCollection.TryGetComponent <ProfileData>(handleFromPoolIndex, out component3); if (!flag) { Service.Get <OtherPlayerDetailsRequestBatcher>().RequestOtherPlayerDetails(handleFromPoolIndex); } if (flag) { bool flag2 = getIsOnline(handleFromPoolIndex) || !ShowPlayerOfflineState; component.SetOnlineStatus(flag2); renderPlayer(component, handleFromPoolIndex, displayName2, flag2); } }