public void UserInBattle(NodeAddedEvent e, UserInBattleNode userInBattle, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen, [JoinAll] Optional <SelfBattleLobbyUser> selfBattleLobbyUser) { if (!selfBattleLobbyUser.IsPresent()) { this.ShowSpectatorButton(profileScreen); } }
public void SetFriendProfileHeader(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [Context, JoinByUser] FriendUserNode friendUser) { SetScreenHeaderEvent eventInstance = new SetScreenHeaderEvent(); eventInstance.Immediate(profileScreen.profileScreenLocalization.FriendsProfileHeaderText); base.ScheduleEvent(eventInstance, profileScreen); }
public void ShowScreenElementsForSelfUser(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] SelfUserNode selfUser, [JoinByLeague] LeagueNode leagueNode) { profileScreen.profileScreen.selfUserAccountButtonsTab.SetActive(true); profileScreen.profileScreen.otherUserAccountButtonsTab.SetActive(false); profileScreen.profileScreen.OtherPlayerNickname.gameObject.SetActive(false); profileScreen.profileScreen.Avatar.SpriteUid = selfUser.userAvatar.Id; profileScreen.profileScreen.IsPremium = selfUser.Entity.HasComponent <PremiumAccountBoostComponent>(); profileScreen.profileScreen.LeagueBorder.SelectedSpriteIndex = leagueNode.leagueConfig.LeagueIndex; }
public void RejectFriend(ButtonClickEvent e, SingleNode <RejectFriendButtonComponent> button, [JoinByScreen] ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] IncommingFriendNode incommingFriend, [JoinAll] SingleNode <SelfUserComponent> selfUser) { base.ScheduleEvent(new RejectFriendEvent(incommingFriend.Entity), selfUser); }
public void HideOutgoingFriendButtons(NodeRemoveEvent e, OutgoingFriendNode outgoingFriend, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen) { profileScreen.profileScreen.RevokeFriendRow.SetActive(false); profileScreen.profileScreen.AddToFriendRow.SetActive(true); }
public void HideRemoveFriendButton(NodeRemoveEvent e, FriendUserNode friendUser, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen) { profileScreen.profileScreen.RemoveFriendRow.SetActive(false); profileScreen.profileScreen.AddToFriendRow.SetActive(true); }
public void SetStatisticsInfo(NodeAddedEvent e, ProfileSummarySectionUINode sectionUI, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserStatisticsNode statistics) { Dictionary <string, long> dictionary = statistics.userStatistics.Statistics; long parameterValue = StatsTool.GetParameterValue <string>(dictionary, "VICTORIES"); sectionUI.profileSummarySectionUI.SetWinLossStatistics(parameterValue, StatsTool.GetParameterValue <string>(dictionary, "DEFEATS"), StatsTool.GetParameterValue <string>(dictionary, "ALL_BATTLES_PARTICIPATED") - StatsTool.GetParameterValue <string>(dictionary, "ALL_CUSTOM_BATTLES_PARTICIPATED")); }
public void HideIncommingFriendButtons(NodeRemoveEvent e, IncommingFriendNode incommingFriend, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen) { profileScreen.profileScreen.FriendRequestRow.SetActive(false); profileScreen.profileScreen.AddToFriendRow.SetActive(true); }
public void EnterAsSpectator(ButtonClickEvent e, SingleNode <EnterBattleAsSpectatorButtonComponent> button, [JoinAll] ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserInBattleNode userInBattle, [JoinAll] ClientSessionNode session, [JoinAll] Optional <SelfBattleLobbyUser> selfBattleLobbyUser) { if (!selfBattleLobbyUser.IsPresent()) { base.ScheduleEvent(new EnterBattleAsSpectatorFromLobbyRequestEvent(userInBattle.battleGroup.Key), session); } }
public void SetLevelInfo(NodeAddedEvent e, ProfileSummarySectionUINode sectionUI, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserStatisticsNode statistics, [JoinAll] RanksNamesNode rankNames) { GetUserLevelInfoEvent eventInstance = new GetUserLevelInfoEvent(); base.ScheduleEvent(eventInstance, statistics); sectionUI.profileSummarySectionUI.SetLevelInfo(eventInstance.Info, rankNames.ranksNames.Names[eventInstance.Info.Level + 1]); }
public void ShowIncommingFriendButtons(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [Context, JoinByUser] IncommingFriendNode incommingFriend) { profileScreen.profileScreen.FriendRequestRow.SetActive(true); profileScreen.profileScreen.AddToFriendRow.SetActive(false); }
public void ShowRemoveFriendButton(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [Context, JoinByUser] FriendUserNode friendUser) { profileScreen.profileScreen.RemoveFriendRow.SetActive(true); profileScreen.profileScreen.AddToFriendRow.SetActive(false); }
public void UserOutBattle(NodeRemoveEvent e, UserInBattleNode userInBattle, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen) { this.HideSpectatorButton(profileScreen); }
public void SetPlayerColor(NodeRemoveEvent e, AcceptedFriendNode friend, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen) { profileScreen.profileScreen.SetPlayerColor(false); }
public void SetNotFriendProfileHeader(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] NotFriendUserNode notFriendUser) { new SetScreenHeaderEvent().Immediate(profileScreen.profileScreenLocalization.ProfileHeaderText); base.ScheduleEvent <SetScreenHeaderEvent>(profileScreen); }
private void ShowSpectatorButton(ProfileScreenWithUserGroupNode profileScreen) { profileScreen.profileScreen.EnterBattleAsSpectatorRow.SetActive(true); }
public void SelfUserInLobby(NodeAddedEvent e, SelfBattleLobbyUser selfBattleLobbyUser, [JoinAll] ProfileScreenWithUserGroupNode profileScreen) { this.HideSpectatorButton(profileScreen); }
public void RemoveFriend(ButtonClickEvent e, SingleNode <BreakOffFriendButtonComponent> button, [JoinByScreen] ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] FriendUserNode friend, [JoinAll] SingleNode <SelfUserComponent> selfUser) { base.ScheduleEvent(new BreakOffFriendEvent(friend.Entity), selfUser); }
public void SetMyProfileHeader(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] SelfUserNode selfUser) { profileScreen.Entity.AddComponent(new ScreenHeaderTextComponent(profileScreen.profileScreenLocalization.MyProfileHeaderText)); }
public void RevokeFriend(ButtonClickEvent e, SingleNode <RevokeFriendRequestButtonComponent> button, [JoinByScreen] ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] OutgoingFriendNode outgoingFriend, [JoinAll] SingleNode <SelfUserComponent> selfUser) { base.ScheduleEvent(new RevokeFriendEvent(outgoingFriend.Entity), selfUser); }
public void SetNotFriendProfileHeader(NodeRemoveEvent e, FriendUserNode friendUser, [JoinByUser] ProfileScreenWithUserGroupNode profileScreen) { SetScreenHeaderEvent eventInstance = new SetScreenHeaderEvent(); eventInstance.Immediate(profileScreen.profileScreenLocalization.ProfileHeaderText); base.ScheduleEvent(eventInstance, profileScreen); }
public void ShowOutgoingFriendButtons(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [Context, JoinByUser] OutgoingFriendNode outgoingFriend) { profileScreen.profileScreen.RevokeFriendRow.SetActive(true); profileScreen.profileScreen.AddToFriendRow.SetActive(false); }
public void SetEquipmentStatisticsInfo(NodeAddedEvent e, SingleNode <MostPlayedEquipmentUIComponent> ui, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserStatisticsNode statistics, [JoinAll] SingleNode <SelectedPresetComponent> selectedPreset) { Dictionary <long, long> hullStatistics = statistics.favoriteEquipmentStatistics.HullStatistics; Dictionary <long, long> turretStatistics = statistics.favoriteEquipmentStatistics.TurretStatistics; if (!hullStatistics.Any <KeyValuePair <long, long> >() && !turretStatistics.Any <KeyValuePair <long, long> >()) { ui.component.SwitchState(false); } else { ui.component.SwitchState(true); Entity entityById = base.GetEntityById(StatsTool.GetItemWithLagestValue(hullStatistics)); Entity entity2 = base.GetEntityById(StatsTool.GetItemWithLagestValue(turretStatistics)); string turretUID = entity2.GetComponent <MarketItemGroupComponent>().Key.ToString(); ui.component.SetMostPlayed(turretUID, entity2.GetComponent <DescriptionItemComponent>().Name, entityById.GetComponent <MarketItemGroupComponent>().Key.ToString(), entityById.GetComponent <DescriptionItemComponent>().Name); } }
public void ShowRequestFriendButtonIfNeed(NodeAddedEvent e, ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] PossibleFriendNode possibleFriend, [JoinAll] SelfUserNode selfUser) { bool flag = (!selfUser.Entity.Equals(possibleFriend.Entity) && (!selfUser.friends.AcceptedFriendsIds.Contains(possibleFriend.Entity.Id) && !selfUser.friends.IncommingFriendsIds.Contains(possibleFriend.Entity.Id))) && !selfUser.friends.OutgoingFriendsIds.Contains(possibleFriend.Entity.Id); profileScreen.profileScreen.AddToFriendRow.SetActive(flag); }
public void SetLeagueInfo(NodeAddedEvent e, ProfileSummarySectionUINode sectionUI, ProfileScreenWithUserGroupNode profileScreen, [Context] LeagueUINode uiNode, [JoinByUser] UserWithLeagueNode user, [JoinByLeague, Context] LeagueNode league) { uiNode.leagueUI.SetLeague(league.leagueName.Name, league.leagueIcon.SpriteUid, user.userReputation.Reputation); sectionUI.profileSummarySectionUI.showRewardsButton.SetActive(user.Entity.HasComponent <SelfUserComponent>()); }