Exemplo n.º 1
0
    IEnumerator Start()
    {
        imgMeat.gameObject.SetActive(false);
        imgMeat2.gameObject.SetActive(false);

        imgVegetables1.gameObject.SetActive(false);
        imgVegetables2.gameObject.SetActive(false);

        imgSauce.gameObject.SetActive(false);

        animButtonNext.gameObject.SetActive(false);
        //imgFlavorDough.gameObject.SetActive(false);
        //BlockClicks.Instance.SetBlockAll(true);
        yield return(new WaitForSeconds(.1f));

        //LevelTransition.Instance.ShowScene();

        yield return(new WaitForSeconds(.1f));

        //BlockClicks.Instance.SetBlockAll(false);

        scrollMenu.gameObject.SetActive(true);
        scrollMenu.ShowMenu(0);
        if (SoundManager.Instance != null)
        {
            SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
        }
        phase = 1;
        Tutorial.Instance.ShowTutorial(0);
    }
Exemplo n.º 2
0
    IEnumerator Start()
    {
        DragItem.OneItemEnabledNo = 0;
        ButtonStove.enabled       = false;
        bowl.GetComponent <ItemAction>().enabled = false;
        BowlCollider.SetActive(false);
        Tray.gameObject.SetActive(false);
        int selectedCol = (GameData.selectedColor > -1)? GameData.selectedColor : 1;


        progressBar.gameObject.SetActive(false);

        //BlockClicks.Instance.SetBlockAll(true);
        animButtonNext.gameObject.SetActive(false);
        yield return(new WaitForSeconds(.1f));

        scrollMenu.ShowMenu(0);
        yield return(new WaitForSeconds(.1f));

        //LevelTransition.Instance.ShowScene();

        yield return(new WaitForSeconds(.3f));

        //BlockClicks.Instance.SetBlockAll(false);
        bowl.gameObject.SetActive(false);

        Tutorial.Instance.ShowTutorial(0);
        EscapeButtonManager.AddEscapeButonFunction("ButtonHomeClicked");
    }
    IEnumerator CEndStretching()
    {
        DragItem.OneItemEnabledNo = 0;
        yield return(new WaitForEndOfFrame());

        rollingPin.EndStretching();

        float pom = 1;

        while (pom > 0)
        {
            pom -= Time.deltaTime * 2;
            imgRollingPin.color = new Color(1, 1, 1, pom);
            yield return(new WaitForEndOfFrame());
        }
        scrollMenu.gameObject.SetActive(true);
        scrollMenu.ShowMenu(0);
        if (SoundManager.Instance != null)
        {
            SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
        }
        ScrollMenuDragItem.bEnableDrag = true;
        yield return(new WaitForSeconds(1));

        rollingPin.transform.parent.gameObject.SetActive(false);

        if (phase == 1)
        {
            Tutorial.Instance.ShowTutorial(2);
        }
        //DragItem.OneItemEnabledNo = 1;
    }
Exemplo n.º 4
0
    IEnumerator CNextPhase()
    {
        Tutorial.Instance.StopTutorial();
        yield return(new WaitForEndOfFrame());

        if (phase == 1)        //kuvanje dim-suma na pari zavrseno
        {
            animDeepFryer.enabled = false;

            Tutorial.Instance.ShowTutorial(2);
            scrollMenu.ShowMenu(0);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            ScrollMenuDragItem.bEnableDrag = true;
        }
    }
Exemplo n.º 5
0
    IEnumerator Start()
    {
        //BlockClicks.Instance.SetBlockAll(true);
        animButtonNext.gameObject.SetActive(false);
        yield return(new WaitForSeconds(.1f));

        scrollMenu.ShowMenu(0);
        yield return(new WaitForSeconds(.9f));

        //LevelTransition.Instance.ShowScene();

        yield return(new WaitForSeconds(1f));

        //BlockClicks.Instance.SetBlockAll(false);

        Tutorial.Instance.ShowTutorial(0);
        EscapeButtonManager.AddEscapeButonFunction("ButtonHomeClicked");
    }
Exemplo n.º 6
0
    IEnumerator Start()
    {
        if (GameData.selectedFlavor == -1)
        {
            GameData.selectedFlavor = 2;
        }
        if (GameData.chocolateFillColor == -1)
        {
            GameData.chocolateFillColor = 0;
        }



        //BlockClicks.Instance.SetBlockAll(true);

        imgFortuneCookie.color             = doughColors.colors[GameData.selectedFlavor];
        imgFortuneCookieChocolate.color    = chocolateColors.colors[GameData.chocolateFillColor];
        SC_imgFortuneCookie.color          = doughColors.colors[GameData.selectedFlavor];
        SC_imgFortuneCookieChocolate.color = chocolateColors.colors[GameData.chocolateFillColor];

        colider2D.gameObject.SetActive(false);

        yield return(new WaitForEndOfFrame());

        //scrollMenu.HideMenu();

        yield return(new WaitForSeconds(.1f));

        //LevelTransition.Instance.ShowScene();

        yield return(new WaitForSeconds(.3f));


        Tutorial.Instance.ShowTutorial(0);
        EscapeButtonManager.AddEscapeButonFunction("ButtonHomeClicked");

        scrollMenu.ShowMenu(0);
        scrollMenu.scrollRect.horizontalNormalizedPosition = 0;
        yield return(new WaitForSeconds(.5f));
        //BlockClicks.Instance.SetBlockAll(false);
    }
    IEnumerator Start()
    {
        animButtonNext.gameObject.SetActive(false);
        cs.knife.gameObject.SetActive(false);
        DoughCut.gameObject.SetActive(false);
        knd.enabled     = false;
        knd.bEnableDrag = false;
        imgFlavorDough.gameObject.SetActive(false);
        //BlockClicks.Instance.SetBlockAll(true);
        yield return(new WaitForSeconds(.1f));

        //LevelTransition.Instance.ShowScene();

        yield return(new WaitForSeconds(.1f));

        //BlockClicks.Instance.SetBlockAll(false);

        scrollMenu.gameObject.SetActive(true);
        scrollMenu.ShowMenu(0);

        ScrollMenuDragItem.bEnableDrag = true;
        //scrollMenu.gameObject.SetActive(false);
        Tutorial.Instance.ShowTutorial(0);
    }
Exemplo n.º 8
0
    IEnumerator CNextPhase()
    {
        if (phase == 2)        //dodavanje mesa
        {
            //BlockClicks.Instance.SetBlockAll(true);


            imgMeat.gameObject.SetActive(true);
            imgMeat.color = Color.clear;
            imgMeat2.gameObject.SetActive(true);
            imgMeat2.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgMeat.transform.position = Vector3.Lerp(Meat1StartPos.position, Meat1EndPos.position, pom);
                imgMeat.color = new Color(1, 1, 1, pom);
                imgMeat2.transform.position = Vector3.Lerp(Meat2StartPos.position, Meat2EndPos.position, pom);
                imgMeat2.color = imgMeat.color;

                yield return(new WaitForFixedUpdate());
            }
            imgMeat.color  = Color.white;
            imgMeat2.color = Color.white;

            scrollMenu.ChangeMenu(1);
            yield return(new WaitForSeconds(1));

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            //BlockClicks.Instance.SetBlockAll(false);
            phase = 3;
            Tutorial.Instance.ShowTutorial(1);
        }

        else if (phase == 4)        //dodavanje povrca
        {
            //BlockClicks.Instance.SetBlockAll(true);

            imgVegetables1.gameObject.SetActive(true);
            imgVegetables1.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgVegetables1.transform.position = Vector3.Lerp(Vegetables1StartPos.position, Vegetables1EndPos.position, pom);
                imgVegetables1.color = new Color(1, 1, 1, pom);
                yield return(new WaitForFixedUpdate());
            }
            imgVegetables1.color = Color.white;

            yield return(new WaitForSeconds(.5f));

            //BlockClicks.Instance.SetBlockAll(false);
            phase = 5;
            Tutorial.Instance.ShowTutorial(2);
        }

        else if (phase == 6)        //dodavanje povrca
        {
            //BlockClicks.Instance.SetBlockAll(true);


            imgVegetables2.gameObject.SetActive(true);
            imgVegetables2.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgVegetables2.transform.position = Vector3.Lerp(Vegetables2StartPos.position, Vegetables2EndPos.position, pom);
                imgVegetables2.color = new Color(1, 1, 1, pom);
                yield return(new WaitForFixedUpdate());
            }
            imgVegetables2.color = Color.white;

            scrollMenu.HideMenu();

            yield return(new WaitForSeconds(1));

            //BlockClicks.Instance.SetBlockAll(false);
            phase = 7;

            //yield return new WaitForSeconds(1);
            scrollMenu.gameObject.SetActive(false);
            scrollMenu2.gameObject.SetActive(true);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            scrollMenu2.ShowMenu(0);
            ScrollMenuDragItem.bEnableDrag = true;
            Tutorial.Instance.ShowTutorial(3);
        }

        else if (phase == 8)        //dodavanje sosa
        {
            yield return(new WaitForSeconds(1));

            //BlockClicks.Instance.SetBlockAll(true);

            Color c = imgSauce.color;
            imgSauce.gameObject.SetActive(true);
            imgSauce.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgSauce.transform.localScale = Vector3.Lerp(Vector3.zero, Vector3.one, pom);
                imgSauce.color = new Color(c.r, c.g, c.b, pom);
                yield return(new WaitForFixedUpdate());
            }
            imgSauce.color = c;

            yield return(new WaitForSeconds(2));

            scrollMenu2.HideMenu();

            yield return(new WaitForSeconds(1));

            //BlockClicks.Instance.SetBlockAll(false);
            phase = 9;
            scrollMenu2.gameObject.SetActive(false);

            animSpringRoll.enabled = true;
            animSpringRoll.Play("P1");
            actionSpringRolls.enabled = true;

            //animButtonNext.gameObject.SetActive(true);
            Tutorial.Instance.ShowTutorial(4);
        }
        else if (phase == 10)
        {
            animSpringRoll.Play("P2");      yield return(new WaitForSeconds(1));  actionSpringRolls.bEnabled = true;
        }
        else if (phase == 11)
        {
            animSpringRoll.Play("P3");      yield return(new WaitForSeconds(1.5f));  actionSpringRolls.bEnabled = true;
        }
        else if (phase == 12)
        {
            Tutorial.Instance.StopTutorial();
            animSpringRoll.Play("P4");
            yield return(new WaitForSeconds(2f));

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            yield return(new WaitForSeconds(.5f));

            actionSpringRolls.bEnabled       = true;
            actionSpringRolls.bDragForAction = true;
            Tutorial.Instance.ShowTutorial(5);
        }
        else if (phase == 13)
        {
            Tutorial.Instance.StopTutorial();
            animSpringRoll.Play("P5");

            yield return(new WaitForSeconds(1));

            animButtonNext.gameObject.SetActive(true);
            psLevelCompleted.gameObject.SetActive(true);
            psLevelCompleted.Play();
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ActionCompleted);
            }
        }
    }
Exemplo n.º 9
0
    IEnumerator CNextPhase()
    {
        if (phase == 0)      //ukljucena masina
        {
            Tutorial.Instance.StopTutorial();
            //BlockClicks.Instance.SetBlockAll(true);

            float   pom = 0;
            Vector3 sp  = Cable.localPosition;
            while (pom < 1)
            {
                pom += 1.5f * Time.deltaTime;
                Cable.localPosition = Vector3.Lerp(sp, Vector3.zero, pom);
                yield return(new WaitForEndOfFrame());
            }
            Cable.localPosition = Vector3.zero;


            //BlockClicks.Instance.SetBlockAll(false);
            ButtonDimSumMachine.bEnabled = true;


            phase = 1;
            yield return(new WaitForEndOfFrame());

            ScrollMenuDragItem.bEnableDrag = true;
            scrollMenu.gameObject.SetActive(true);
            scrollMenu.ShowMenu(0);
            Tutorial.Instance.ShowTutorial(1);
        }
        else if (phase > 0 && phase < 5)        //ukljucena je masina za pravljenje testa
        {
            Tutorial.Instance.StopTutorial();
            ScrollMenuDragItem.bEnableDrag = false;
            if (selectedFlavor >= 0)
            {
                dimSumPiece[phase - 1].color = dimSumColors.colors[selectedFlavor];
                foreach (Transform t in dimSumPiece[phase - 1].transform)
                {
                    if (t.CompareTag("ScrollMenuColor"))
                    {
                        t.GetComponent <Image>().color = dimSumColors.colors[selectedFlavor];
                    }
                }
            }

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.MachineOnSound);
            }
            ButtonDimSumMachine.transform.GetChild(0).gameObject.SetActive(false);
            ButtonDimSumMachine.transform.GetChild(1).gameObject.SetActive(true);
            ButtonDimSumMachine.transform.GetChild(2).gameObject.SetActive(true);

            animDimSumMachine.Play("p" + phase);
            yield return(new WaitForSeconds(3));

            ButtonDimSumMachine.bEnabled = true;
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Stop_Sound(SoundManager.Instance.MachineOnSound);
            }
            ButtonDimSumMachine.transform.GetChild(0).gameObject.SetActive(true);
            ButtonDimSumMachine.transform.GetChild(1).gameObject.SetActive(false);
            ButtonDimSumMachine.transform.GetChild(2).gameObject.SetActive(false);

            GameData.dimSumFlavors[phase - 1] = selectedFlavor;

            phase++;
            if (phase == 5)            //ZAVRSENO PRESOVANJE KOMADICA TESTA I POTREBNO JE POJAVITI TANJIR SA FILOM, KASIKU...
            {
                bShowTut2 = false;
                yield return(new WaitForSeconds(1));

                Cable.gameObject.SetActive(false);
                scrollMenu.HideMenu();
                animDimSumMachine.Play("Hide");
                Plate.SetParent(PlateHolder);
                DoughParent.SetParent(Plate);
                DoughParent.SetAsFirstSibling();
                yield return(new WaitForSeconds(2));

                scrollMenu.gameObject.SetActive(false);
                animDimSumMachine.gameObject.SetActive(false);


                fillPlateHolder.gameObject.SetActive(true);

                Vector3 smStartPos = fillPlateHolder.position;
                Vector3 smEndPos   = fillPlateEndPos.position;
                Vector3 bsStartPos = bambooSteamer.position;
                Vector3 bsEndPos   = bambooSteamerEndPos.position;
                Vector3 scStartPos = scoop.transform.position;
                Vector3 scEndPos   = scoopEndPos.position;
                Plate.gameObject.SetActive(true);
                scoop.gameObject.SetActive(true);
                bambooSteamer.gameObject.SetActive(true);

                Vector3 arcMax = new Vector3(0, 2, 0);

                float pom = 0;
                while (pom < 1)
                {
                    pom += .8f * Time.fixedDeltaTime;
                    fillPlateHolder.position = Vector3.Lerp(smStartPos, smEndPos, pom) + pom * (1 - pom) * arcMax;
                    bambooSteamer.position   = Vector3.Lerp(bsStartPos, bsEndPos, pom) + pom * (1 - pom) * arcMax;

                    yield return(new WaitForFixedUpdate());
                }

                phase = 6;

                smStartPos = dimSumPiece[3].transform.position;
                smEndPos   = FillDoughPos.position;

                pom = 0;

                //podesava se image punjenja
                scoop.imgFillOnDough = dimSumPiece[3].transform.GetChild(0).GetComponent <Image>();

                if (SoundManager.Instance != null)
                {
                    SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
                }
                while (pom < 1)
                {
                    pom += Time.fixedDeltaTime;
                    dimSumPiece[3].transform.position   = Vector3.Lerp(smStartPos, smEndPos, pom);
                    dimSumPiece[3].transform.localScale = Vector3.Lerp(Vector3.one, 1.8f * Vector3.one, pom);
                    scoop.transform.position            = Vector3.Lerp(scStartPos, scEndPos, pom) + pom * (1 - pom) * arcMax;
                    yield return(new WaitForFixedUpdate());
                }
                dimSumPiece[3].transform.SetParent(FillDoughPos);
                dimSumLeftToDo = 3;
                Tutorial.Instance.ShowTutorial(3);
            }
            else
            {
                ScrollMenuDragItem.bEnableDrag = true;
            }
        }
    }
    IEnumerator WaitNextPhase(int phase)
    {
        Tutorial.Instance.StopTutorial();
        yield return(new WaitForEndOfFrame());

        if (phase == 1)
        {
            yield return(new WaitForSeconds(.5f));

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.StopAndPlay_Sound(SoundManager.Instance.WaterSound);
            }
            yield return(new WaitForSeconds(.5f));

            animBowl.Play("Water");
        }

        else if (phase == 2)
        {
            yield return(new WaitForSeconds(1.3f));

            animBowl.Play("InsertFlour");

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.StopAndPlay_Sound(SoundManager.Instance.SugarSound);
            }
        }
        else if (phase == 3)
        {
            yield return(new WaitForSeconds(.8f));

            animBowl.Play("InsertSugar");

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.StopAndPlay_Sound(SoundManager.Instance.SugarSound);
            }
        }
        else if (phase == 4)
        {
            scrollMenu.gameObject.SetActive(true);
            yield return(new WaitForEndOfFrame());

            scrollMenu.ShowMenu(0);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
        }
        else if (phase == 5)
        {
            yield return(new WaitForSeconds(5f));

            scrollMenu.HideMenu();
            Debug.Log("HIDE");
            yield return(new WaitForSeconds(1));

            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            cgMixerHolder.gameObject.SetActive(true);
            cgMixerHolder.alpha = 0;
            float pom = 0;
            while (pom < 1)
            {
                pom += Time.deltaTime * 3;
                yield return(new WaitForEndOfFrame());

                cgMixerHolder.alpha = pom;
            }
            scrollMenu.gameObject.SetActive(false);
            Tutorial.Instance.ShowTutorial(5);
            //Tutorial.Instance.StartCoroutine("ShowMixerTut");
        }
    }
Exemplo n.º 11
0
    IEnumerator CNextPhase()
    {
        Tutorial.Instance.StopTutorial();

        if (phase == 0)       //sipanje ulja
        {
            Tutorial.Instance.StopTutorial();
            float pom = 0;

            oilFryingPan.color = new Color(1, 1, 1, 0);
            oilFryingPan.gameObject.SetActive(true);

            while (pom < 1)
            {
                pom += Time.deltaTime * .45f;
                oilFryingPan.color = new Color(1, 1, 1, pom);
                yield return(new WaitForEndOfFrame());
            }
            oilFryingPan.color   = Color.white;
            ButtonStove.bEnabled = true;
            phase = 1;
            Tutorial.Instance.ShowTutorial(1);
        }

        else if (phase == 1)        //zagrevanje ulja
        {
            ButtonStove.transform.GetChild(0).gameObject.SetActive(false);
            ButtonStove.transform.GetChild(1).gameObject.SetActive(true);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.FryingSound);
            }
            int waitTime = 1;
            yield return(new WaitForSeconds(1f));



            Vector3 smStartPos = Plate.position;
            Vector3 smEndPos   = PlateEndPos.position;
            Plate.gameObject.SetActive(true);

            Vector3 arcMax = new Vector3(0, 2, 0);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            float pom = 0;
            while (pom < 1)
            {
                pom           += .8f * Time.fixedDeltaTime;
                Plate.position = Vector3.Lerp(smStartPos, smEndPos, pom) + pom * (1 - pom) * arcMax;
                yield return(new WaitForFixedUpdate());
            }
            Plate.GetComponent <ItemAction>().bEnabled = true;
            phase = 2;
            Tutorial.Instance.ShowTutorial(2);
        }

        else if (phase == 2)        //sipanje testa u tiganj
        {
            float pom = 0;

            Vector3 smStartPos = noodlesPlate.position;
            Vector3 smEndPos   = NoodlesEndPos.position;
            Vector3 arcMax     = new Vector3(0, .7f, 0);



            while (pom < 1)
            {
                pom           += Time.fixedDeltaTime;
                Plate.rotation = Quaternion.Lerp(Quaternion.identity, Quaternion.Euler(0, 0, -40), pom);
                yield return(new WaitForFixedUpdate());
            }
            while (pom < 1)
            {
                pom += .5f * Time.fixedDeltaTime;
                Quaternion startRotation = noodlesPlate.rotation;
                noodlesPlate.rotation = Quaternion.Lerp(startRotation, Quaternion.identity, pom);
                noodlesPlate.position = Vector3.Lerp(smStartPos, smEndPos, pom) + pom * (1 - pom) * arcMax;
            }

            pom = 0;
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.InsertFruit);
            }
            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                noodlesPlate.rotation = Quaternion.Lerp(noodlesPlate.rotation, Quaternion.identity, pom);
                noodlesPlate.position = Vector3.Lerp(smStartPos, smEndPos, pom * .9f);

                noodlesPlate.localScale = Vector3.Lerp(new Vector3(1, .5f, 1), new Vector3(1, .35f, 1), pom);
                yield return(new WaitForFixedUpdate());
            }
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.FryingSound2);
            }
            noodlesPlate.SetParent(MixHolder);
            noodlesPlate.SetAsFirstSibling();
            pom = .9f;
            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                noodlesPlate.rotation = Quaternion.Lerp(noodlesPlate.rotation, Quaternion.identity, pom);
                noodlesPlate.position = Vector3.Lerp(smStartPos, smEndPos, pom);
                yield return(new WaitForFixedUpdate());
            }
            pom = 0;

            while (pom < 1)
            {
                pom           += Time.fixedDeltaTime;
                Plate.rotation = Quaternion.Lerp(Plate.rotation, Quaternion.identity, pom);
                yield return(new WaitForFixedUpdate());
            }

            pom        = 0;
            smStartPos = Plate.position;
            smEndPos   = smStartPos + new Vector3(-5, 0, 0);
            arcMax     = new Vector3(0, 2, 0);

            while (pom < 1)
            {
                pom           += Time.fixedDeltaTime;
                Plate.position = Vector3.Lerp(smStartPos, smEndPos, pom) + pom * (1 - pom) * arcMax;
                yield return(new WaitForFixedUpdate());
            }
            Plate.gameObject.SetActive(false);

            pom = 0;

            smokeParticles.SetActive(true);

            yield return(new WaitForSeconds(1));

            scrollMenu.gameObject.SetActive(true);
            scrollMenu.ShowMenu(0);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }

            phase = 3;

            Tutorial.Instance.ShowTutorial(3);
        }

        else if (phase == 4)        //dodavanje mesa u tiganj
        {
            //BlockClicks.Instance.SetBlockAll(true);


            imgMeat.gameObject.SetActive(true);
            imgMeat.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgMeat.transform.position = Vector3.Lerp(MeatStartPos.position, MeatEndPos.position, pom);
                imgMeat.color = new Color(1, 1, 1, pom);
                yield return(new WaitForFixedUpdate());
            }
            imgMeat.color = Color.white;

            scrollMenu.ChangeMenu(1);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            yield return(new WaitForSeconds(1));

            //BlockClicks.Instance.SetBlockAll(false);
            phase = 5;
            Tutorial.Instance.ShowTutorial(3);
        }

        else if (phase == 6)        //dodavanje povrca u tiganj 1.
        {
            //BlockClicks.Instance.SetBlockAll(true);


            imgVegetables1.gameObject.SetActive(true);
            imgVegetables1.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgVegetables1.transform.position = Vector3.Lerp(Vegetables1StartPos.position, Vegetables1EndPos.position, pom);
                imgVegetables1.color = new Color(1, 1, 1, pom);
                yield return(new WaitForFixedUpdate());
            }
            imgVegetables1.color = Color.white;

            yield return(new WaitForSeconds(.5f));

            //BlockClicks.Instance.SetBlockAll(false);
            phase = 7;
            Tutorial.Instance.ShowTutorial(3);
        }

        else if (phase == 8)        //dodavanje povrca u tiganj 2.
        {
            //BlockClicks.Instance.SetBlockAll(true);


            imgVegetables2.gameObject.SetActive(true);
            imgVegetables2.color = Color.clear;
            float pom = 0;

            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgVegetables2.transform.position = Vector3.Lerp(Vegetables2StartPos.position, Vegetables2EndPos.position, pom);
                imgVegetables2.color = new Color(1, 1, 1, pom);
                yield return(new WaitForFixedUpdate());
            }
            imgVegetables2.color = Color.white;

            scrollMenu.HideMenu();

            yield return(new WaitForSeconds(1));

            //BlockClicks.Instance.SetBlockAll(false);
            phase = 9;
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            animIngredients.gameObject.SetActive(true);
            animIngredients.Play("ShowMenu");

            DragItem.OneItemEnabledNo = 2;
            Tutorial.Instance.ShowTutorial(4);
        }
        else if (phase == 9)        //salt
        {
            Tutorial.Instance.ShowTutorial(5);
            DragItem.OneItemEnabledNo = 3;
            phase = 10;
        }
        else if (phase == 10)        //pepper
        {
            Tutorial.Instance.ShowTutorial(6);
            DragItem.OneItemEnabledNo = 4;
            phase = 11;
        }
        else if (phase == 11)        //soja sos
        {
            DragItem.OneItemEnabledNo = 0;
            phase = 12;

            //prikazivanje soja sosa
            imgSoySauce.gameObject.SetActive(true);
            imgSoySauce.color = Color.clear;
            float pom = 0;
            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                imgSoySauce.color = new Color(1, 1, 1, pom);
                yield return(new WaitForFixedUpdate());
            }

            imgSoySauce.color = Color.white;
            yield return(new WaitForSeconds(3));


            //Prikazivanje kasike za mesanje
            Spatula.gameObject.SetActive(true);
            pom = 0;
            Vector3 arcMax = new Vector3(0, 2, 0);
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ShowItemSound);
            }
            while (pom < 1)
            {
                pom += Time.fixedDeltaTime;
                Spatula.transform.position = Vector3.Lerp(SpatulaStartPos.position, SpatulaEndPos.position, pom) + pom * (1 - pom) * arcMax;
                yield return(new WaitForFixedUpdate());
            }


            mixingPhase = 1;
            mixingTime  = 0;
            Spatula.GetComponent <Mixer>().Init();
            Mixer.bEnabled = true;

            progressBar.SetProgress(0, false);
            progressBar.gameObject.SetActive(true);


            //sakrivanje zacina
            yield return(new WaitForSeconds(1));

            animIngredients.gameObject.SetActive(false);

            phase = 13;
            Tutorial.Instance.ShowTutorial(7);
        }

        else if (phase == 14)        //EndMixing
        {
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Stop_Sound(SoundManager.Instance.FryingSound);
            }
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Stop_Sound(SoundManager.Instance.FryingSound2);
            }
            //kraj
            phase          = 15;
            Mixer.bMixBowl = false;
            Mixer.bEnabled = false;


            Spatula.GetComponent <Mixer>().enabled = false;

            float pom = 0;

            SpatulaEndPos.position = Spatula.transform.position;

            while (pom < 1)
            {
                pom += 3 * Time.fixedDeltaTime;
                Spatula.transform.position = Vector3.Lerp(SpatulaEndPos.position, SpatulaEndAnimPos.position, pom);
                yield return(new WaitForFixedUpdate());
            }

            Spatula.parent.SetSiblingIndex(2);
            Plate.gameObject.SetActive(true);
            Plate.SetAsFirstSibling();
            MixHolder.parent.parent.parent.SetAsLastSibling();

            EndGameAnim.enabled = true;
            EndGameAnim.Play("endAnim");

            yield return(new WaitForSeconds(4.2f));

            MixHolder.SetParent(Plate);
            smokeParticles.transform.SetParent(Plate);
            Plate.SetParent(GameObject.Find("ActiveItemHolder").transform);
            //povecavanje tanjira
            pom = 0;

            EndGameAnim.enabled    = false;
            SpatulaEndPos.position = Spatula.transform.position;
            Vector3 platePos = Plate.position;
            Vector3 plateSc1 = Plate.localScale;
            Vector3 plateSc2 = Plate.localScale * 1.5f;
            while (pom < 1)
            {
                pom             += Time.fixedDeltaTime;
                Plate.position   = Vector3.Lerp(Plate.position, Vector3.zero, pom);
                Plate.localScale = Vector3.Lerp(plateSc1, plateSc2, pom);
                yield return(new WaitForFixedUpdate());
            }


            psLevelCompleted.gameObject.SetActive(true);
            psLevelCompleted.Play();
            if (SoundManager.Instance != null)
            {
                SoundManager.Instance.Play_Sound(SoundManager.Instance.ActionCompleted);
            }
            animButtonNext.gameObject.SetActive(true);

            imgVegetablesSC.sprite  = imgVegetables1.sprite;
            imgVegetables2SC.sprite = imgVegetables2.sprite;
            imgMeatSC.sprite        = imgMeat.sprite;
            transform.GetComponent <CaptureImage>().ScreenshotMeal();
        }


        yield return(new WaitForEndOfFrame());
    }