예제 #1
0
파일: Book.cs 프로젝트: bolcof/OS2020
        public void TurnPageBack()
        {
            ShowPage();
            PageTurnedBack = true;
            PageAnimator.SetBool("TurnPageNormal", false);
            PageAnimator.SetBool("TurnPageBackNormal", true);

            Details.TurnPageBack();
            InsideFrontCover.mainTexture = Details.LeftPage();
            PageFront.mainTexture        = Details.RightPage();
            PageBack.mainTexture         = Details.NextLeftPage();
            InsideBackCover.mainTexture  = Details.NextRightPage();
        }
예제 #2
0
파일: Book.cs 프로젝트: bolcof/OS2020
        public void Update()
        {
            if (Input.GetKeyDown("c"))
            {
                string   screenshotFilename;
                DateTime td = System.DateTime.Now;
                screenshotFilename = "..//ScreenShots//SS - " + td.ToString("yyyy MM dd-HH-mm-ss-ffff") + ".png";
                ScreenCapture.CaptureScreenshot(screenshotFilename);
                Debug.Log("Taken Snap Shot." + td.ToString("yyyy MM dd-HH-mm-ss-ffff"));
            }

            if (PageTurning || PageTurnedBack)
            {
                AnimatorStateInfo currentBaseState = PageAnimator.GetCurrentAnimatorStateInfo(0);
                if (currentBaseState.IsName("WaitBackTurn"))
                {
                    if (PageTurning)
                    {
                        PageTurning = false;
                        Details.TurnPage();
                        HidePage();
                        PageAnimator.SetBool("TurnPageNormal", false);

                        InsideFrontCover.mainTexture = Details.LeftPage();
                    }
                }
                if (currentBaseState.IsName("WaitTurnMid"))
                {
                    if (PageTurnedBack)
                    {
                        PageTurnedBack = false;

                        HidePage();
                        PageAnimator.SetBool("TurnPageBackNormal", false);
                        InsideBackCover.mainTexture = Details.RightPage();
                    }
                }
            }
        }