コード例 #1
0
 /// <summary>
 /// Hide the learning pill. Logic varies slightly if there is further help to display.
 /// </summary>
 public void ClosePill(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         UIManagement.Blocker.onClick.RemoveAllListeners();
     }
     if (_furtherHelp.Count == 0)
     {
         StartCoroutine(Animate());
         UIManagement.Blocker.transform.SetAsLastSibling();
         transform.SetAsLastSibling();
         UIManagement.DisableBlocker();
     }
     if (_furtherHelp.Count > 0)
     {
         StartCoroutine(Animate(false, true));
         Invoke(nameof(SetFurtherHelp), 1.1f);
     }
     else
     {
         UIManagement.EventImpact.Display();
     }
     TrackerEventSender.SendEvent(new TraceEvent("LearningPillClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
     {
         { TrackerContextKey.LearningPillID, _currentHelp },
         { TrackerContextKey.TriggerUI, source }
     }, AccessibleTracker.Accessible.Accessible));
     UIManagement.Tutorial.ShareEvent(GetType().Name, MethodBase.GetCurrentMethod().Name);
 }
コード例 #2
0
 private void OnDisable()
 {
     UIManagement.DisableBlocker();
     UIManagement.Blocker.transform.SetAsFirstSibling();
     transform.SetAsFirstSibling();
     Localization.LanguageChange -= OnLanguageChange;
     BestFit.ResolutionChange    -= DoBestFit;
 }
コード例 #3
0
 /// <summary>
 /// Close the promotion pop-up
 /// </summary>
 public void Close(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         gameObject.Active(false);
         UIManagement.DisableBlocker();
         if (!string.IsNullOrEmpty(source))
         {
             TrackerEventSender.SendEvent(new TraceEvent("PromotionPopUpClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
             {
                 { TrackerContextKey.BoatLayout, GameManagement.PositionString },
                 { TrackerContextKey.TriggerUI, source }
             }, AccessibleTracker.Accessible.Screen));
         }
     }
     UIManagement.PostRaceEvents.ToList().ForEach(e => e.Display());
 }
コード例 #4
0
 /// <summary>
 /// Close the promotion pop-up
 /// </summary>
 public void Close(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         gameObject.Active(false);
         UIManagement.DisableBlocker();
         TrackerEventSender.SendEvent(new TraceEvent("CupResultPopUpClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
         {
             { TrackerContextKey.CupFinishingPosition, _cupPosition },
             { TrackerContextKey.TriggerUI, source }
         }, AccessibleTracker.Accessible.Screen));
         if (GameManagement.RageMode)
         {
             UIManagement.StateManager.GoToState(State.Questionnaire);
         }
     }
 }
コード例 #5
0
 /// <summary>
 /// Clear and close the impact pop-up
 /// </summary>
 public void Close(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         _impacts.Clear();
         gameObject.Active(false);
         UIManagement.DisableBlocker();
         if (!string.IsNullOrEmpty(source))
         {
             TrackerEventSender.SendEvent(new TraceEvent("PostRaceEventImpactPopUpClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
             {
                 { TrackerContextKey.TriggerUI, source }
             }, AccessibleTracker.Accessible.Screen));
             UIManagement.Tutorial.ShareEvent(GetType().Name, MethodBase.GetCurrentMethod().Name);
         }
     }
     UIManagement.PostRaceEvents.ToList().ForEach(e => e.Display());
 }
コード例 #6
0
 /// <summary>
 /// Close the pop-up and trigger the notes to be resaved for this entity
 /// </summary>
 public void Close(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         GameManagement.EventController.SaveNote(_notesSubject, _notesField.text);
         gameObject.Active(false);
         UIManagement.DisableBlocker();
         _notesSubject = null;
         UIManagement.Tutorial.ShareEvent(GetType().Name, MethodBase.GetCurrentMethod().Name);
         if (!string.IsNullOrEmpty(source))
         {
             TrackerEventSender.SendEvent(new TraceEvent("NotesPopUpClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
             {
                 { TrackerContextKey.TriggerUI, source }
             }, AccessibleTracker.Accessible.Screen));
         }
     }
 }
コード例 #7
0
 private void OnDisable()
 {
     Localization.LanguageChange -= OnLanguageChange;
     BestFit.ResolutionChange    -= DoBestFit;
     //if the close button is active, hide all dialogue options (helps with best fit sometimes) and disable the blocker if this pop-up is actually using it
     if (_closeButton.activeSelf)
     {
         foreach (var person in _postRacePeople)
         {
             person.EnableQuestions();
             DoBestFit();
         }
         if (transform.parent.GetSiblingIndex() == transform.parent.parent.childCount - 1)
         {
             UIManagement.DisableBlocker();
         }
         UIManagement.Tutorial.ShareEvent(GetType().Name, MethodBase.GetCurrentMethod().Name);
     }
 }
コード例 #8
0
 /// <summary>
 /// Close the hire warning
 /// </summary>
 public void CloseHireCrewWarning(string source)
 {
     _hireWarningPopUp.Active(false);
     if (gameObject.activeInHierarchy)
     {
         transform.EnableBlocker(() => CloseRecruitmentPopUp(TrackerTriggerSource.PopUpBlocker.ToString()));
     }
     else
     {
         UIManagement.DisableBlocker();
     }
     TrackerEventSender.SendEvent(new TraceEvent("HirePopUpClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
     {
         { TrackerContextKey.CrewMemberName, _currentSelected },
         { TrackerContextKey.CurrentTalkTime, GameManagement.ActionAllowance },
         { TrackerContextKey.HiringCost, ConfigKey.RecruitmentCost.ValueString(false) },
         { TrackerContextKey.TriggerUI, source }
     }, AccessibleTracker.Accessible.Screen));
     _currentSelected = string.Empty;
 }
コード例 #9
0
 /// <summary>
 /// Close the race result pop-up
 /// </summary>
 public void Close(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         gameObject.Active(false);
         UIManagement.DisableBlocker();
         TrackerEventSender.SendEvent(new TraceEvent("ResultPopUpClosed", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
         {
             { TrackerContextKey.FinishingPosition, _lastRaceFinishPosition },
             { TrackerContextKey.TriggerUI, source }
         }, AccessibleTracker.Accessible.Screen));
         if (!GameManagement.SeasonOngoing)
         {
             UIManagement.CupResult.Display();
         }
         else
         {
             UIManagement.Promotion.Display();
         }
         UIManagement.Tutorial.ShareEvent(GetType().Name, MethodBase.GetCurrentMethod().Name);
     }
 }
コード例 #10
0
 /// <summary>
 /// triggered by Unity event. Player has declined, so close this pop-up and allow them to continue playing before racing
 /// </summary>
 public void CloseConfirmPopUp(string source)
 {
     if (gameObject.activeInHierarchy)
     {
         gameObject.Active(false);
         UIManagement.DisableBlocker();
         if (_isRace)
         {
             if (!string.IsNullOrEmpty(source))
             {
                 if (GameManagement.IsRace)
                 {
                     TrackerEventSender.SendEvent(new TraceEvent("RaceConfirmDeclined", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
                     {
                         { TrackerContextKey.CurrentTalkTime, GameManagement.ActionAllowance },
                         { TrackerContextKey.TriggerUI, source }
                     }, AccessibleTracker.Accessible.Screen));
                 }
                 else
                 {
                     TrackerEventSender.SendEvent(new TraceEvent("SkipToRaceDeclined", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
                     {
                         { TrackerContextKey.CurrentTalkTime, GameManagement.ActionAllowance },
                         { TrackerContextKey.RemainingSessions, GameManagement.SessionsRemaining },
                         { TrackerContextKey.TriggerUI, source }
                     }, AccessibleTracker.Accessible.Screen));
                 }
             }
         }
         else
         {
             TrackerEventSender.SendEvent(new TraceEvent("RepeatLineUpDeclined", TrackerAsset.Verb.Skipped, new Dictionary <TrackerContextKey, object>
             {
                 { TrackerContextKey.TriggerUI, source }
             }, AccessibleTracker.Accessible.Screen));
         }
     }
 }