コード例 #1
0
ファイル: UITabBar.cs プロジェクト: FizzCorp/unity3d-sample
        private void TabBarItemPressed(UITabBarItem button)
        {
            int lastIndex    = -1;
            int currentIndex = -1;

            if (_current != null)
            {
                _current.SetInteractable(true);
                _current.SetColor(_normalColor);
                lastIndex = _items.FindIndex(a => a.Id.Equals(_current.Id));
            }

            _current = button;
            _current.SetInteractable(false);
            _current.SetColor(_selectionColor);
            currentIndex = _items.FindIndex(a => a.Id.Equals(_current.Id));

            UITransitionSlideIn.Config config = new UITransitionSlideIn.Config(0f, (currentIndex > lastIndex)? UITransitionSlide.SlideDirection.right : UITransitionSlide.SlideDirection.left);
            _router.Show(_current.View, RouterHistoryMode.replaceState, config);

            if (onTabChange != null)
            {
                onTabChange.Invoke(_current.Id);
            }
        }
コード例 #2
0
ファイル: FizzUI.cs プロジェクト: FizzCorp/unity3d-sample
 public void LaunchFizz()
 {
     if (MainView != null)
     {
         var config = new UITransitionSlideIn.Config(0.25f, UITransitionSlide.SlideDirection.bottom);
         MainView.Show(RouterHistoryMode.pushState, config);
         isUIActive = true;
     }
     else
     {
         Debug.Log("STATUS_ERROR: mainView == null In Ack");
     }
 }