Пример #1
0
        protected override void OnEnter(BossContext context)
        {
            context.HorizontalSpeed = _settings.RetreatHorizontalSpeed;
            context.VerticalSpeed   = _settings.RetreatVerticalSpeed;

            InputWrapper.Enabled = false;
            SetDelay(1.5f, () =>
            {
                _fadeService.FadeOut(() =>
                {
                    var scene = SceneManager.GetActiveScene();
                    SceneManager.LoadScene(scene.name);
                });
            });
        }
Пример #2
0
        protected override void OnEnter(CharacterContext context)
        {
            context.Animator.SetTrigger("Fall");
            context.VerticalSpeed        = 0f;
            context.VerticalAcceleration = 0f;
            context.HorizontalSpeed      = 0f;

            InputWrapper.Enabled = false;
            SetDelay(1.5f, () =>
            {
                _fadeService.FadeOut(() =>
                {
                    var scene = SceneManager.GetActiveScene();
                    SceneManager.LoadScene(scene.name);
                });
            });
        }
Пример #3
0
 public void Navigate <T>(T page) where T : BasePage
 {
     if (page == null || _currentPage == page)
     {
         return;
     }
     InputWrapper.Enabled = false;
     if (_currentPage != null)
     {
         _fadeService.FadeOut(() =>
         {
             _currentPage.gameObject.SetActive(false);
             ShowNewPage(page);
         });
     }
     else
     {
         ShowNewPage(page);
     }
 }