예제 #1
0
 public virtual void NavigateTo(Navigateable target, NavigationArgs args = null)
 {
     HandleExit(target);
     target.HandleEnter(args ?? new NavigationArgs {
         current = this
     });
 }
예제 #2
0
        public override void HandleEnter(NavigationArgs args)
        {
            if (!args.isReturning)
            {
                returnTarget = args.current;
            }

            base.HandleEnter(args);
        }
예제 #3
0
        public void SwitchTo(Navigateable newTab)
        {
            if (newTab == activeTab)
            {
                return;
            }

            activeTab.NavigateTo(newTab, new NavigationArgs {
                current = activeTab
            });

            activeTab = newTab;
        }
예제 #4
0
 public void SetDefaultActive(Navigateable tab)
 {
     activeTab = tab;
     activeTab.HandleEnter(null);
 }
예제 #5
0
 public virtual void HandleExit(Navigateable target)
 {
     gameObject.SetActive(false);
 }