Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        month = PlayerPrefs.GetInt("Month");
        day   = PlayerPrefs.GetInt("Day");

        if (!DialogPanel.activeSelf)
        {
            if (((StartMonth1 <= month) && (StartDay1 <= day) && (month <= EndMonth1) && (day <= EndDay1)) || ((StartMonth2 <= month) && (StartDay2 <= day) && (month <= EndMonth2) && (day <= EndDay2)))
            {
                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;
                }
            }
            else
            {
                buyButton.GetComponent <Button> ().enabled = false;
                if (IsAlreadyOpen)
                {
                    ShopItem.GetComponent <Button> ().enabled = true;
                    QuestionBox.SetActive(false);
                }
            }
        }
        save();
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        hour = PlayerPrefs.GetInt("Hour");
        //	hour = PlayerPrefs.GetInt("Min");

        if (!DialogPanel.activeSelf && (Ammonite.GetComponent <Friend>().HowFriendly() >= 1))
        {
            if (!IsAlreadyOpen)
            {
                PopUpText.text = "이제 상점에서 <버드미사일>을 구입할 수 있습니다!";
                PopUpClose.SetActive(true);
                PopUp.SetActive(true);
                IsAlreadyOpen = true;
            }

            if ((StartHour <= hour) || (hour < EndHour))
            {
                buyButton.GetComponent <Button> ().enabled = true;
                ShopItem.GetComponent <Button> ().enabled  = true;
                QuestionBox.SetActive(false);
            }
            else
            {
                buyButton.GetComponent <Button> ().enabled = false;
                if (IsAlreadyOpen)
                {
                    ShopItem.GetComponent <Button> ().enabled = true;
                    QuestionBox.SetActive(false);
                }
            }
        }
        save();
    }
Ejemplo n.º 3
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();
    }
Ejemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        //soda event
        ShopItem.GetComponent <Item> ().load();
        if (ShopItem.GetComponent <Item> ().haveItem() && Croco.enabled && !IsAlreadyShow)
        {
            IsAlreadyShow = true;
            SceneManager.LoadScene("Crocodile 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();
    }
Ejemplo n.º 5
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();
    }
Ejemplo n.º 6
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();
    }
Ejemplo n.º 7
0
 // Update is called once per frame
 void Update()
 {
     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();
 }
Ejemplo n.º 8
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();
    }
Ejemplo n.º 9
0
    // Update is called once per frame
    void Update()
    {
        day   = PlayerPrefs.GetInt("Day");
        month = PlayerPrefs.GetInt("Month");
        if (!DialogPanel.activeSelf)
        {
            CameleonEventShow = (PlayerPrefs.GetString("CameleonEventShow") == "True");
            if ((ShopItem.GetComponent <Item> ().haveItem()) && !CameleonEventShow)
            {
                Wall_gompang.GetComponent <Image> ().enabled  = true;
                Wall_gompang.GetComponent <Button> ().enabled = true;
            }

            //	hour = PlayerPrefs.GetInt("Min");
            if (((StartMonth == month) && (day >= Startday)) || ((month > StartMonth) && (month < EndMonth)))
            {
                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;
                }
            }
            else
            {
                buyButton.GetComponent <Button> ().enabled = false;
                if (IsAlreadyOpen)
                {
                    ShopItem.GetComponent <Button> ().enabled = true;
                    QuestionBox.SetActive(false);
                }
            }
        }
        save();
    }