Exemplo n.º 1
0
        public void GetBattleType(GetBattleTypeEvent e, Node any, [JoinAll] ResultsNode results, [JoinAll] ICollection <SingleNode <TutorialSetupEndgameScreenHandler> > tutorialHandlers)
        {
            BattleResultForClient resultForClient = results.battleResults.ResultForClient;

            BattleResultsAwardsScreenComponent.BattleTypes none = BattleResultsAwardsScreenComponent.BattleTypes.None;
            if (resultForClient.Custom)
            {
                none = BattleResultsAwardsScreenComponent.BattleTypes.Custom;
            }
            else if (tutorialHandlers.Count > 0)
            {
                foreach (SingleNode <TutorialSetupEndgameScreenHandler> node in tutorialHandlers)
                {
                    node.component.gameObject.SetActive(false);
                }
                none = BattleResultsAwardsScreenComponent.BattleTypes.Tutorial;
            }
            else
            {
                BattleType matchMakingModeType = resultForClient.MatchMakingModeType;
                if (matchMakingModeType == BattleType.ENERGY)
                {
                    none = BattleResultsAwardsScreenComponent.BattleTypes.Quick;
                }
                else if (matchMakingModeType == BattleType.ARCADE)
                {
                    none = BattleResultsAwardsScreenComponent.BattleTypes.Arcade;
                }
                else if (matchMakingModeType == BattleType.RATING)
                {
                    none = !e.WithCashback ? BattleResultsAwardsScreenComponent.BattleTypes.Ranked : BattleResultsAwardsScreenComponent.BattleTypes.RankedWithCashback;
                }
            }
            e.BattleType = none;
        }
Exemplo n.º 2
0
        public void ScreenInit(NodeAddedEvent e, ScreenNode screen, [JoinAll] ResultsNode results, [JoinAll] SelfUserNode selfUser, [JoinAll] ICollection <QuestNode> quests)
        {
            BattleResultForClient         resultForClient = results.battleResults.ResultForClient;
            PersonalBattleResultForClient personalResult  = resultForClient.PersonalResult;
            bool flag  = personalResult.MaxEnergySource == EnergySource.MVP_BONUS;
            bool flag2 = (personalResult.MaxEnergySource == EnergySource.UNFAIR_MM) || (personalResult.MaxEnergySource == EnergySource.DISBALANCE_BONUS);
            GetBattleTypeEvent eventInstance = new GetBattleTypeEvent {
                WithCashback = flag || flag2
            };

            base.ScheduleEvent(eventInstance, screen);
            screen.battleResultsAwardsScreen.SetBattleType(eventInstance.BattleType);
            int userDMPlace = (resultForClient.BattleMode != BattleMode.DM) ? 0 : (resultForClient.DmUsers.IndexOf(resultForClient.FindUserResultByUserId(selfUser.Entity.Id)) + 1);

            this.ShowTitle(screen, results, userDMPlace);
            this.ShowReputation(screen, results, selfUser);
        }
        public void ScreenInit(NodeAddedEvent e, SingleNode <BattleResultCommonUIComponent> battleResultScreenUI, [JoinAll] SelfUserNode selfUserNode, [JoinAll] SingleNode <BattleResultsComponent> results)
        {
            BattleResultForClient resultForClient = results.component.ResultForClient;

            if (resultForClient.Spectator)
            {
                battleResultScreenUI.component.ShowScreen(resultForClient.Custom, true, false, false, false);
            }
            else
            {
                bool flag  = resultForClient.PersonalResult.MaxEnergySource == EnergySource.MVP_BONUS;
                bool flag2 = (resultForClient.PersonalResult.MaxEnergySource == EnergySource.UNFAIR_MM) || (resultForClient.PersonalResult.MaxEnergySource == EnergySource.DISBALANCE_BONUS);
                GetBattleTypeEvent eventInstance = new GetBattleTypeEvent {
                    WithCashback = flag || flag2
                };
                base.ScheduleEvent(eventInstance, battleResultScreenUI);
                bool tutor = (selfUserNode.userStatistics.Statistics["ALL_BATTLES_PARTICIPATED"] <= 4L) || (eventInstance.BattleType == BattleResultsAwardsScreenComponent.BattleTypes.Tutorial);
                battleResultScreenUI.component.ShowScreen(resultForClient.Custom, false, tutor, selfUserNode.Entity.HasComponent <SquadGroupComponent>(), true);
            }
        }
Exemplo n.º 4
0
 public void TutorialsTriggered(GetBattleTypeEvent e, Node any, [JoinAll, Combine] SingleNode <TutorialEndGameTriggerComponent> tutorialTrigger)
 {
     tutorialTrigger.component.GetComponent <TutorialShowTriggerComponent>().Triggered();
 }