Exemple #1
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();
    }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     if ((Balloon.GetComponent <TalkBalloon> ().NumberOfTalk() >= NeedTalkCount) && !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 = "이제 상점에서 <" + ItemName1 + ">와 <" + ItemName2 + ">을 구입할 수 있습니다!";
             PopUpClose.SetActive(true);
             PopUp.SetActive(true);
             IsAlreadyOpen = true;
         }
     }
     save();
 }
Exemple #3
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();
    }
Exemple #4
0
 // Update is called once per frame
 void Update()
 {
     if (!DialogPanel.activeSelf)
     {
         if ((SheepBalloon.GetComponent <TalkBalloon> ().NumberOfTalk() >= SheepTalkCount) && (BearBalloon.GetComponent <TalkBalloon> ().NumberOfTalk() >= BearTalkCount))
         {
             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 = "이제 상점에서 <탄산수>와 <킨더초콜렛>을 구입할 수 있습니다!";
                 PopUpClose.SetActive(true);
                 PopUp.SetActive(true);
                 IsAlreadyOpen = true;
             }
         }
     }
     save();
 }
Exemple #5
0
    // Update is called once per frame
    void Update()
    {
        if ((Balloon.GetComponent <TalkBalloon> ().NumberOfTalk() >= NeedTalkCount) && !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;
                PopUpClose.SetActive(true);
                PopUp.SetActive(true);
                IsAlreadyOpen = true;
            }
        }

        if ((Balloon.GetComponent <TalkBalloon> ().NumberOfTalk() >= NeedTalkCount2) && !DialogPanel.activeSelf)
        {
            ShopItem3.GetComponent <Button> ().enabled  = true;
            buyButton3.GetComponent <Button> ().enabled = true;
            QuestionBox3.SetActive(false);
            if (!IsAlreadyOpen2)
            {
                PopUpText.text = text2;
                PopUpClose.SetActive(true);
                PopUp.SetActive(true);
                IsAlreadyOpen2 = true;
            }
        }
        save();
    }