Ejemplo n.º 1
0
        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]);
        }
Ejemplo n.º 2
0
        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"));
        }
Ejemplo n.º 3
0
 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>());
 }