Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (!DialogPanel.activeSelf)
        {
            if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= EventExecuteVisit && !IsAlreadyShow)
            {
                IsAlreadyShow = true;
                SceneManager.LoadScene("Owl Event");
            }

            if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount)
            {
                ShopItem.GetComponent <Button> ().enabled  = true;
                buyButton.GetComponent <Button> ().enabled = true;
                QuestionBox.SetActive(false);
                if (!IsAlreadyOpen)
                {
                    PopUpText.text = "이제 상점에서 <빨래건조대>를 구입할 수 있습니다!";
                    PopUpClose.SetActive(true);
                    PopUp.SetActive(true);
                    IsAlreadyOpen = true;
                }
            }
        }
        save();
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        // ammonite event
        if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= eventVisitCount && VisitFriend.GetComponent <Image>().enabled&& !IsAlreadyShow)
        {
            IsAlreadyShow = true;
            SceneManager.LoadScene("Ammonite Event");
        }


        if (!DialogPanel.activeSelf)
        {
            if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount)
            {
                buyButton.GetComponent <Button> ().enabled = true;
                ShopItem.GetComponent <Button> ().enabled  = true;
                QuestionBox.SetActive(false);
                if (!IsAlreadyOpen)
                {
                    PopUpText.text = "이제 상점에서 <쿠션>을 구입할 수 있습니다!";
                    PopUpClose.SetActive(true);
                    PopUp.SetActive(true);
                    IsAlreadyOpen = true;
                }
            }
        }
        save();
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (!DialogPanel.activeSelf)
        {
            //event
            if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= lionEventVisitNumber && !IsAlreadyShow)
            {
                IsAlreadyShow = true;
                SceneManager.LoadScene("Lion Event");
                PlayerPrefs.SetString("LionEvent", IsAlreadyShow.ToString());
            }

            //event2 - sheep&lion
            else if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= lionEventVisitNumber2 && !IsAlreadyShow2)
            {
                IsAlreadyShow2 = true;
                SceneManager.LoadScene("Sheep Event2");
            }

            if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount)
            {
                ShopItem.GetComponent <Button> ().enabled  = true;
                buyButton.GetComponent <Button> ().enabled = true;
                QuestionBox.SetActive(false);
                if (!IsAlreadyOpen)
                {
                    PopUpText.text = "이제 상점에서 <접시 세트>를 구입할 수 있습니다!";
                    PopUpClose.SetActive(true);
                    PopUp.SetActive(true);
                    IsAlreadyOpen = true;
                }
            }
        }
        save();
    }
Exemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        // ShopItem3 = banana (crocodile banana event)
        ShopItem3.GetComponent <Item> ().load();
        if (ShopItem3.GetComponent <Item> ().haveItem() && VisitFriend.GetComponent <Image>().enabled&& !IsAlreadyShow)
        {
            IsAlreadyShow = true;
            SceneManager.LoadScene("Crocodile Event");
        }

        // crocodile event2
        if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= eventVisitCount && VisitFriend.GetComponent <Image>().enabled&& !IsAlreadyShow2)
        {
            IsAlreadyShow2 = true;
            SceneManager.LoadScene("Crocodile Event2");
        }


        if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount && !DialogPanel.activeSelf)
        {
//			ShopItem1.GetComponent<Button> ().enabled = true;
            ShopItem2.GetComponent <Button> ().enabled = true;
            ShopItem3.GetComponent <Button> ().enabled = true;
//			buyButton1.GetComponent<Button> ().enabled = true;
            buyButton2.GetComponent <Button> ().enabled = true;
            buyButton3.GetComponent <Button> ().enabled = true;
//			QuestionBox1.SetActive (false);
            QuestionBox2.SetActive(false);
            QuestionBox3.SetActive(false);
            if (!IsAlreadyOpen)
            {
                PopUpText.text = text;
                //				PopUpText.text = "이제 상점에서 <하겐다즈 망고라즈베리 파인트>와 <접이식 테이블>을 구입할 수 있습니다!";
                PopUpClose.SetActive(true);
                PopUp.SetActive(true);
                IsAlreadyOpen = true;
            }
        }

        if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount2 && !DialogPanel.activeSelf)
        {
            ShopItem1.GetComponent <Button> ().enabled  = true;
            buyButton1.GetComponent <Button> ().enabled = true;
            QuestionBox1.SetActive(false);

            if (!IsAlreadyOpen2)
            {
                PopUpText.text = text2;
                //				PopUpText.text = "이제 상점에서 <하겐다즈 망고라즈베리 파인트>와 <접이식 테이블>을 구입할 수 있습니다!";
                PopUpClose.SetActive(true);
                PopUp.SetActive(true);
                IsAlreadyOpen2 = true;
            }
        }

        save();
    }
Exemplo n.º 5
0
    // Update is called once per frame
    void Update()
    {
        if (!DialogPanel.activeSelf)
        {
            //soda event
            ShopItem.GetComponent <Item> ().load();
            if (ShopItem.GetComponent <Item> ().haveItem() && Penguin.enabled && sodaBoughtTimes < 1)
            {
                ShopItem.GetComponent <Item> ().decreaseItem();
                sodaBoughtTimes++;
                PlayerPrefs.SetString("SodaEventShow", "True");                                 // show event save.
                SceneManager.LoadScene("Penguin Event");
            }

            //soda
            if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount)
            {
                buyButton.GetComponent <Button> ().enabled = true;
                ShopItem.GetComponent <Button> ().enabled  = true;
                QuestionBox.SetActive(false);
                if (!IsAlreadyOpen)
                {
                    PopUpText.text = "이제 상점에서 <형제소다>를 구입할 수 있습니다!";
                    PopUpClose.SetActive(true);
                    PopUp.SetActive(true);
                    IsAlreadyOpen = true;
                }
            }

            //Episode
            if (TalkBalloon_2.GetComponent <TalkBalloon> ().NumberOfTalk() == 20)
            {
                if (!IsAlreadyOpen2)
                {
                    SceneManager.LoadScene("PenguinEp");
                    IsAlreadyOpen2 = true;
                }
            }
        }
        save();
    }
Exemplo n.º 6
0
    // Update is called once per frame
    void Update()
    {
        if (VisitFriend.GetComponent <VisitFriend> ().VisitNumber >= openVisitCount && !DialogPanel.activeSelf)
        {
            ShopItem1.GetComponent <Button> ().enabled  = true;
            ShopItem2.GetComponent <Button> ().enabled  = true;
            buyButton1.GetComponent <Button> ().enabled = true;
            buyButton2.GetComponent <Button> ().enabled = true;
            QuestionBox1.SetActive(false);
            QuestionBox2.SetActive(false);
            if (!IsAlreadyOpen)
            {
                PopUpText.text = text;
//				PopUpText.text = "이제 상점에서 <하겐다즈 망고라즈베리 파인트>와 <접이식 테이블>을 구입할 수 있습니다!";
                PopUpClose.SetActive(true);
                PopUp.SetActive(true);
                IsAlreadyOpen = true;
            }
        }
        save();
    }