protected void renderPlayer(AbstractPlayerListItem playerListItem, DataEntityHandle handle, string displayName, bool isOnline) { if (!playerListItem.IsRendered) { playerListItem.IsRendered = true; playerListItem.SetPreloaderActive(isActive: true); playerListItem.SetAvatarIconActive(isActive: false); if (playerAvatarRenderer.IsRenderInProgress(displayName)) { playerAvatarRenderer.CancelRender(displayName); } if (isOnline) { AvatarAnimationFrame avatarAnimationFrame = new AvatarAnimationFrame(IdlePenguinState, 0.5f); playerAvatarRenderer.RequestImage(handle, avatarAnimationFrame, "FriendsListIdle"); } else { AvatarAnimationFrame avatarAnimationFrame = new AvatarAnimationFrame(SleepingPenguinState, 0.75f); playerAvatarRenderer.RequestImage(handle, avatarAnimationFrame, "FriendsListSleeping"); } } }
private void renderOwner(FriendListItem friendListItem, DataEntityHandle handle, string displayName, bool isOnline) { if (!friendListItem.IsRendered || (friendListItem.IsOnlineSet && isOnline != friendListItem.IsOnline)) { friendListItem.IsRendered = true; friendListItem.SetPreloaderActive(isActive: true); friendListItem.SetAvatarIconActive(isActive: false); if (friendAvatarRenderer.IsRenderInProgress(displayName)) { friendAvatarRenderer.CancelRender(displayName); } if (isOnline) { AvatarAnimationFrame avatarAnimationFrame = new AvatarAnimationFrame(IdlePenguinState, 0.5f); friendAvatarRenderer.RequestImage(handle, avatarAnimationFrame, "FriendsListIdle"); } else { AvatarAnimationFrame avatarAnimationFrame = new AvatarAnimationFrame(SleepingPenguinState, 0.75f); friendAvatarRenderer.RequestImage(handle, avatarAnimationFrame, "FriendsListSleeping"); } } }