Example #1
0
    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();
    }
Example #2
0
    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();
    }