private IEnumerator HijackHealthAndSafety()
        {
            healthWarningFlowCoordinator = Resources.FindObjectsOfTypeAll <HealthWarningFlowCoordinator>().First();
            healthWarningViewController  = healthWarningFlowCoordinator.GetField <HealthWarningViewController>("_healthWarningViewContoller");
            eulaViewController           = healthWarningFlowCoordinator.GetField <EulaViewController>("_eulaViewController");

            yield return(new WaitUntil(() => healthWarningViewController.isInViewControllerHierarchy));

            healthWarningViewController.didFinishEvent -= healthWarningFlowCoordinator.HandleHealthWarningViewControllerdidFinish;
            healthWarningViewController.didFinishEvent += HandleHealtWarningViewControllerdidFinish;
        }
예제 #2
0
        public void HandleEulaViewControllerdidFinish(bool agreed)
        {
            eulaViewController.didFinishEvent -= HandleEulaViewControllerdidFinish;

            if (agreed)
            {
                healthWarningFlowCoordinator.GetField <ScenesTransitionSetupDataSO>("_nextScenesTransitionSetupData").ReplaceScenes(0.7f, null, null);
            }
            else
            {
                healthWarningFlowCoordinator.GetField <Ease01>("_fadeInOut").FadeOutInstant();
                Application.Quit();
            }
        }