Beispiel #1
0
    void AfterWash()
    {
        //myMachineState = MachineState.Finish;
        machineFull.SetActive(false);
        machineEmpty.SetActive(true);
        machineOccupied.SetActive(true);

        EmojiBubble.SetActive(true);
        KararaTalk(EmojiOpenDoor);

        HintUI.SetActive(true);
        HintUI.transform.localPosition = MachinePos;
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        if (TutorialTransition.TransitionStage == 3)
        {
            //set inactive
            if (TutorialTransition.TrainStart)
            {
                TutorialTransition.TrainStart.SetActive(false);
            }
            TutorialTransition.ResetStage1();
            clothBag.SetActive(true);



            print("TutorialTransition =" + 3);
            Hide(TutorialTransition.TransparentButton);
            MainCamera.GetComponent <Camera>().orthographicSize = 5;
            MainCamera.GetComponent <RectTransform>().position  = new Vector3(17.5f, 0, -10f);
            TutorialTransition.trainWithWindow.SetActive(false);

            TutorialTransition.TransitionStage = 4;
            //正式开始,进入车厢
            StartCoroutine(ShowExclamation());
        }

        if (!timerStop)
        {
            if (myMachineState == MachineState.Washing)
            {
                CalculateTime();
            }

            timer += Time.deltaTime;
        }

        //在inventory里穿衣服
        //穿上工作服>>穿上鞋>>>鱼开始让人还衣服
        if (isWearingClothNum == 3 && !longTap)
        {
            longTap = true;
            StartCoroutine(LongTap());
        }

        //还掉鞋之后出现返回地铁按钮
        if (putClothBack && stepCounter == 10)
        {
            forwardOneStep = true;
        }


        if (flashing)
        {
            Flashlight.alpha = Flashlight.alpha - Time.deltaTime;
            if (Flashlight.alpha < 0)
            {
                Flashlight.alpha = 0;
                flashing         = false;
            }
        }

        //在screen1永远不显示fish scream
        if (TutorialCameraController.currentPage == 1)
        {
            Hide(scream);
        }


        if (inLoop && TutorialCameraController.currentPage == 4)
        {
            TutorialCameraController.JumpToPage(3);
            Debug.Log("what's going on????");
        }



        if (TutorialCameraController.reachTarget)
        {
            Debug.Log("reach! manager");
            Hide(scream);
            ScrollHint.SetActive(false);
            TutorialCameraController.reachTarget = false;


            if (scrollTeaching)
            {
                TutorialCameraController.allowScroll = false;

                forwardOneStep = true;
            }

            else if (inLoop && TutorialCameraController.targetPage == 2)
            {   // 前提
                Debug.Log("前提");

                if (!machineOpen)
                {
                    Debug.Log("前提");
                    EmojiBubble.SetActive(true);
                    KararaTalk(EmojiOpenDoor);
                    HintUI.SetActive(true);
                }

                TutorialCameraController.targetPage = 1;
            }
            else if (inLoop && TutorialCameraController.targetPage == 1)
            {
                TutorialCameraController.targetPage = 2;

                forwardLater = false;
                if (machineOpen)
                {
                    FishTalk("CloseDoor", true);
                }
                else
                {
                    FishTalk("Right", true);
                }
            }
            else if (inLoop && TutorialCameraController.currentPage == 3)
            {
                TutorialCameraController.JumpToPage(2);
            }
            else if (TutorialCameraController.targetPage == 1)
            {
                //FishTalk("Return this bag!",true);
                // after ins ->return prep
            }

            TutorialCameraController.targetPage = -1;
        }

        //if(currentFT.isPlaying)
        //{
        //    FishTalkNextSentence();
        //}

        //go to next step
        if (forwardOneStep)
        {
            forwardOneStep = false;
            stepCounter++;
            switch (stepCounter)
            {
            case 1:
                ShowCameraBG();
                break;

            case 2:
                StartCoroutine(BackToSubway());
                StartCoroutine(ScrollTeaching(1));
                KararaB.SetActive(true);
                break;

            case 3:
                scrollTeaching = false;

                forwardLater = true;
                FishTalk("Late", true);

                break;

            case 4:
                //鱼讲完话前进
                BagOccur();
                //包出现在screen1
                //forward的时机:衣服进了洗衣机
                break;

            case 5:
                //衣服进了洗衣机
                // PhoneOccur();
                break;

            case 6:
                BackToWashing();    //时间开始前进
                break;

            case 7:
                AfterWash();
                //从洗完到小循环前提
                break;

            case 8:
                StartCoroutine(JumpToFish());
                //小循环-小循环跳出
                break;

            case 9:
                AfterPickUpCloth();
                break;

            case 10:
                ShowInventory();
                break;

            case 11:
                //还了鞋之后就可以显示返回地铁的按钮
                StartCoroutine(ShowBackButton());
                //一定是还了一件衣服才能返回的,所以洗衣机里又有衣服了
                machineFront.sprite = fullImg;

                break;

            case 12:
                ReadyForPhoto();
                break;

            case 13:
                //照相界面下面有个黑条,改变姿势的透明图层需要变小一点
                RectTransform rt = changePostureButton.GetComponent <RectTransform>();
                rt.anchoredPosition = new Vector2(rt.anchoredPosition.x, 20);
                rt.sizeDelta        = new Vector2(700, 500);

                ShowCameraBG();
                break;

            case 14:
                GoToIns();
                break;

            case 15:
                //从ins直接回到screen2
                StartCoroutine(AfterIns());
                break;

            case 16:
                //鱼说完还包之后从screen1跳转到screen2
                StartCoroutine(ReturnPrep());
                //ReturnPrep();
                break;

            case 17:
                FishTalkLast();
                break;

            case 18:
                // StartCoroutine(ShowComic());
                // StartCoroutine(AddFans());
                Handheld.Vibrate();
                Show(mobile);
                break;
            }
        }
    }