예제 #1
0
파일: NavManager.cs 프로젝트: Joeriri/Tic
    IEnumerator TransitionIn()
    {
        //disable navigation
        canNavigate = false;
        currentNavItem.Deactivate();
        // do transition
        transition.StartTransitionIn();
        yield return(new WaitForSeconds(transition.transitionClip.length));

        // enable navigation
        canNavigate = true;
        currentNavItem.Activate();
    }
예제 #2
0
파일: NavManager.cs 프로젝트: Joeriri/Tic
    IEnumerator MoveToNavItemRoutine(NavItem targetNavItem)
    {
        // disable current nav item
        currentNavItem.Deactivate();

        // when target NavItem is not in the same room, move to correct room
        if (targetNavItem.room != currentNavItem.room)
        {
            MoveToRoom(targetNavItem.room);
            yield return(new WaitForSeconds(camSwipeDuration));
        }

        // change current nav item and enable it!
        currentNavItem = targetNavItem;
        currentNavItem.Activate();
    }