Esempio n. 1
0
    IEnumerator StartLoadCoroutine(int num)
    {
        //Debug.Log(num + "번 파일 로드 준비");
        theDB.phaseNum = num;
        Fade2Manager.instance.FadeOut(0.02f, 1f);
        yield return(new WaitForSeconds(2f));

        //SceneManager.LoadScene("start");

        theLT.loadWindow.SetActive(true);  //로딩창 온


        yield return(new WaitForSeconds(0.01f));

        ObjectManager.instance.FadeIn(loadIcon);
        Fade2Manager.instance.FadeIn(0.02f);

        yield return(new WaitForSeconds(0.5f));   //오브젝트 불러오는 시간 필요 (개중요)

        thePlayer.notMove = true;


        theSL.CallLoad(num);
        yield return(new WaitForSeconds(2f));

        theBook.BookOff();
        alertPop_Load.SetActive(false);

        thePlayer.exc.SetBool("on", false);
        thePlayer.canInteractWith = 0;

        thePlayer.animator.SetBool("onFish", false);
        FadeManager.instance.fog0.SetActive(false);

        ObjectManager.instance.FadeOut(loadIcon);
        Fade2Manager.instance.FadeOut(0.02f, 1f);


        yield return(new WaitForSeconds(2f));

        theLT.loadWindow.SetActive(false);
        thePlayer.LetBegin();
        //yield return new WaitForSeconds(2f);
        //theSL.CallLoad(num);
    }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
#if DEV_MODE
        if (Input.GetKeyDown(KeyCode.F2))
        {
            AudioManager.instance.Play("button22");
            devMode.SetActive(!devMode.activeSelf);
        }
#endif

        if (theDB.bookActivated && !(thePlayer.notMove && !theBook.book.activeSelf && !(thePlayer.isPlayingGame || thePlayer.isPlayingPuzzle)) && !thePlayer.isChased && !redAlert.activeSelf)
        {
            //if(!((thePlayer.notMove&&!thePlayer.isPlayingGame&&!thePlayer.isPlayingPuzzle)||thePlayer.isChased||redAlert.activeSelf)){
            //if(theDB.bookActivated&&!thePlayer.isWakingup&&!thePlayer.isInteracting&&!thePlayer.isChased){

            if (Input.GetKeyDown(KeyCode.Q))
            {
                if (!theBook.book.activeSelf)
                {
                    theBook.BookOn();
                }
                else if (theBook.paper.activeSelf)
                {
                    theBook.BookOff();
                }
                theBook.OnPaper();
            }
            if (Input.GetKeyDown(KeyCode.I))
            {
                if (!theBook.book.activeSelf)
                {
                    theBook.BookOn();
                }
                else if (theBook.item.activeSelf)
                {
                    theBook.BookOff();
                }
                theBook.OnItem();
            }
            if (Input.GetKeyDown(KeyCode.M))
            {
                if (!theBook.book.activeSelf)
                {
                    theBook.BookOn();
                }
                else if (theBook.map.activeSelf)
                {
                    theBook.BookOff();
                }
                theBook.OnMap();
            }
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                if (manual.activeSelf)
                {
                    PopUpHelp();
                }
                else if (makerInfo.activeSelf)
                {
                    makerInfo.SetActive(false);
                }
                else if (!theBook.book.activeSelf)
                {
                    theBook.BookOn();
                }
                else if (theBook.setting.activeSelf)
                {
                    theBook.BookOff();
                }
                theBook.OnSetting();
            }
            if (Input.GetKeyDown(KeyCode.Tab))
            {
                if (theBook.book.activeSelf)
                {
                    if (theBook.paper.activeSelf)
                    {
                        theBook.OnItem();
                    }
                    else if (theBook.item.activeSelf)
                    {
                        theBook.OnMap();
                    }
                    else if (theBook.map.activeSelf)
                    {
                        theBook.OnSetting();
                    }
                    else if (theBook.setting.activeSelf)
                    {
                        theBook.OnPaper();
                    }
                }
            }

            if (Input.GetKeyDown(KeyCode.F1))
            {
                PopUpHelp();
            }

            /*
             * if(theBook.book.activeSelf && Input.GetKeyDown(KeyCode.Tab)){
             * if(theBook.paper.activeSelf){
             *  theBook.OnItem();
             * }
             * else if(theBook.item.activeSelf){
             *  theBook.OnMap();
             * }
             * else if(theBook.map.activeSelf){
             *  theBook.OnSetting();
             * }
             * else if(theBook.setting.activeSelf){
             *  theBook.OnPaper();
             * }
             * }*/
        }
        // if(Input.GetKeyDown(KeyCode.F8)){
        //     loadFading();
        // }
    }