예제 #1
0
    private void ToGo()
    {
        isPause = true;
        Pauser.Pause();

        Vector3 targetEulerAngles = new Vector3(90.0f, 0.0f, 0.0f);

        if (tabletMoveState == TabletMoveState.before && Application.loadedLevelName != Scenes.EndScene.name)
        {
            tabletPC = Instantiate(tabletPCPrefab, tabletTransform.position, tabletTransform.rotation) as GameObject;
            tabletPC.transform.parent = tabletTransform;

            StartCoroutine(TabletMovement(tabletPCAxis, targetEulerAngles, true));
            player.ShowMiniMap(false);
            ExamineIconManager.SetVisible(false);
        }

        if (tabletMoveState == TabletMoveState.after)
        {
            pauseState       = PauseState.Run;
            tabletMoveState  = TabletMoveState.before;
            Cursor.visible   = true;
            Cursor.lockState = CursorLockMode.None;
        }
    }
예제 #2
0
    private void ToBack()
    {
        if (menu != null)
        {
            Destroy(menu.gameObject);
        }

        if (tabletScreen && tabletScreen.GetComponent <MeshRenderer>().material.color != EndScreenColor)
        {
            tabletScreen.GetComponent <MeshRenderer>().material.color = EndScreenColor;
        }

        Vector3 targetEulerAngles = new Vector3(360.0f, 0.0f, 0.0f);

        if (tabletPCAxis.localEulerAngles.x != 0 && tabletMoveState == TabletMoveState.before)
        {
            StartCoroutine(TabletMovement(tabletPCAxis, targetEulerAngles));
        }

        if (tabletMoveState == TabletMoveState.after)
        {
            if (tabletPCAxis.localEulerAngles != targetEulerAngles)
            {
                tabletPCAxis.localEulerAngles = targetEulerAngles;
            }

            if (tabletPC != null)
            {
                Destroy(tabletPC);
            }

            pauseState       = PauseState.None;
            tabletMoveState  = TabletMoveState.before;
            Cursor.lockState = CursorLockMode.Locked;
            Cursor.visible   = false;
            Pauser.Resume();
            isPause = false;
            player.ShowMiniMap(true);
            ExamineIconManager.SetVisible(true);
        }
    }