// 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(); }
// 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(); }
// 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(); }
// 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(); }
// 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(); }
// 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(); }
//Popup close public void ClosePopUp() { if (PopUpClose.Displayed) { PopUpClose.Click(); } }
// 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(); }
/// <summary> /// Child menu item has closed it's popup. /// </summary> /// <param name="sender">Menu item closing it's popup.</param> protected void OnPopUpClosed(object sender) { this.isPopUpShown = false; RemoveHighlight(); if (PopUpClose != null) { PopUpClose.Invoke(this); } }
// 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(); }
// Update is called once per frame void Update() { if ((Balloon.GetComponent <TalkBalloon> ().NumberOfTalk() >= NeedTalkCount)) { ShopItem1.GetComponent <Button> ().enabled = true; buyButton1.GetComponent <Button> ().enabled = true; QuestionBox1.SetActive(false); if (!IsAlreadyOpen) { PopUpText.text = "이제 상점에서 " + ItemName1 + " 구입할 수 있습니다!"; PopUpClose.SetActive(true); PopUp.SetActive(true); IsAlreadyOpen = true; } } save(); }
// 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(); }
// 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(); }
// 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(); }
// 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(); }
// 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(); }
public void PlayPopUpCloseAudio() { PopUpClose.Play(); }