// Token: 0x0600042E RID: 1070 RVA: 0x0001CA3C File Offset: 0x0001AE3C public ShopDataFormat(ShopDataFormat original) { this.itemId = original.itemId; this.fixY = original.fixY; this.info = original.info; this.id = original.id; }
// Token: 0x06000313 RID: 787 RVA: 0x0000EC7C File Offset: 0x0000D07C public void SetInfoPanel(int index) { this.setShopIndex = index; if (this.setShopIndex != -1) { ShopDataFormat shopDataFormat = SuperGameMaster.sDataBase.get_ShopDB(this.setShopIndex); this.InfoText.GetComponent <Text>().text = shopDataFormat.info; } else { this.InfoText.GetComponent <Text>().text = string.Empty; } }
// Token: 0x060002DA RID: 730 RVA: 0x0000C7D4 File Offset: 0x0000ABD4 public void CreateItemButton() { this.unsetCursor(); for (int i = -1; i <= 1; i++) { for (int j = 0; j < this.pageDisplayMax; j++) { int num = j + (this.nowPage + i) * this.pageDisplayMax; if (num < 0) { break; } if (num > this.shopItemMax - 1) { break; } Vector3 position = new Vector3(this.btnPref.transform.localPosition.x, this.btnPref.transform.localPosition.y, 0f); position.x += (float)(j % this.column) * this.btnPadding.x + (float)(this.pageWidth * i); position.y += (float)(j / this.column) * this.btnPadding.y; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.btnPref, position, Quaternion.identity); gameObject.transform.SetParent(base.transform, false); ShopDataFormat shopData = SuperGameMaster.sDataBase.get_ShopDB(num); ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(shopData.itemId); gameObject.GetComponent <DisplayItemButton>().setShopIndex(num); gameObject.GetComponent <DisplayItemButton>().CngDisplayName(itemDataFormat.name); gameObject.GetComponent <DisplayItemButton>().CngDisplayImage(itemDataFormat.img, shopData.fixY); gameObject.GetComponent <DisplayItemButton>().CngBackImage(this.ItemBackSprite[j % 4]); if (num == this.selectShopIndex) { this.setCursor(gameObject.transform.localPosition); } if (itemDataFormat.type != Item.Type.LunchBox) { if (SuperGameMaster.saveData.ItemList.FindIndex((ItemListFormat item) => item.id.Equals(shopData.itemId)) != -1) { gameObject.GetComponent <DisplayItemButton>().SetSoldOut(); } else { gameObject.GetComponent <DisplayItemButton>().CngPriceNum(itemDataFormat.price); } } else { gameObject.GetComponent <DisplayItemButton>().CngPriceNum(itemDataFormat.price); } } } }
// Token: 0x060002E0 RID: 736 RVA: 0x0000D180 File Offset: 0x0000B580 public void BuyItem() { ShopDataFormat shopDataFormat = SuperGameMaster.sDataBase.get_ShopDB(this.selectShopIndex); ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(shopDataFormat.itemId); SuperGameMaster.getCloverPoint(-itemDataFormat.price); SuperGameMaster.GetItem(shopDataFormat.itemId, 1); base.GetComponentInParent <UIMaster>().OnSave(); if (itemDataFormat.type != Item.Type.LunchBox) { IEnumerator enumerator = base.transform.GetEnumerator(); try { while (enumerator.MoveNext()) { object obj = enumerator.Current; Transform transform = (Transform)obj; if (transform.name.Equals("DisplayItemButton(Clone)") && transform.GetComponent <DisplayItemButton>().shopIndex == this.selectShopIndex) { transform.GetComponent <DisplayItemButton>().SetSoldOut(); transform.GetComponent <DisplayItemButton>().NumDelete(); } } } finally { IDisposable disposable; if ((disposable = (enumerator as IDisposable)) != null) { disposable.Dispose(); } } this.selectShopIndex = -1; this.SetInfoPanelData(-1, Vector3.zero); base.GetComponent <FlickCheaker>().stopFlick(true); ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>(); confilm.OpenPanel(itemDataFormat.name + "\nを買いました"); confilm.ResetOnClick_Screen(); confilm.SetOnClick_Screen(delegate { confilm.ClosePanel(); }); confilm.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); } if (SuperGameMaster.tutorial.TutorialComplete() && (itemDataFormat.type != Item.Type.Tool || SuperGameMaster.GetFirstFlag(Flag.FIRST_BUY_TOOL)) && UnityEngine.Random.Range(0, 100) < 15) { SuperGameMaster.GetTicket(1); base.GetComponentInParent <UIMaster>().OnSave(); if (itemDataFormat.type != Item.Type.LunchBox) { ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>(); confilm.SetOnClick_Screen(delegate { confilm.OpenPanel(string.Empty); }); confilm.SetOnClick_Screen(delegate { confilm.AddContents(UnityEngine.Object.Instantiate <GameObject>(this.AddConfirm_pref)); }); confilm.SetOnClick_Screen(delegate { confilm.ResetOnClick_Screen(); }); confilm.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(true); }); confilm.SetOnClick_Screen(delegate { confilm.SetOnClick_Screen(delegate { confilm.ClosePanel(); }); }); confilm.SetOnClick_Screen(delegate { confilm.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); }); } else { base.GetComponent <FlickCheaker>().stopFlick(true); ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>(); confilm.OpenPanel(string.Empty); confilm.AddContents(UnityEngine.Object.Instantiate <GameObject>(this.AddConfirm_pref)); confilm.ResetOnClick_Screen(); confilm.SetOnClick_Screen(delegate { confilm.ClosePanel(); }); confilm.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); } } if (itemDataFormat.type == Item.Type.Tool && !SuperGameMaster.GetFirstFlag(Flag.FIRST_BUY_TOOL)) { SuperGameMaster.SetFirstFlag(Flag.FIRST_BUY_TOOL); base.GetComponent <FlickCheaker>().stopFlick(true); HelpPanel help = base.GetComponentInParent <UIMaster_Shop>().HelpUI.GetComponent <HelpPanel>(); help.OpenPanel(string.Concat(new string[] { "<color=#61a8c7><b>どうぐ</b></color>をしたくしてあげると\n", SuperGameMaster.GetFrogName(), "の行き先に影響をあたえます\n色んな<color=#61a8c7><b>どうぐ</b></color>を用意して", SuperGameMaster.GetFrogName(), "に\n旅の提案をしてあげましょう" })); help.ResetOnClick_Screen(); help.SetOnClick_Screen(delegate { help.ClosePanel(); }); help.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); help.gameObject.SetActive(false); ConfilmPanel component = this.ConfilmUI.GetComponent <ConfilmPanel>(); component.SetOnClick_Screen(delegate { help.gameObject.SetActive(true); }); component.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(true); }); } SuperGameMaster.audioMgr.StopSE(); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Buy"]); }
// Token: 0x060002DF RID: 735 RVA: 0x0000CE54 File Offset: 0x0000B254 public void SetInfoPanelData(int shopIndex, Vector3 pos) { if (shopIndex == -1) { this.unsetCursor(); this.InfoPanel.GetComponent <InfoPanel>().SetInfoPanel(-1); return; } if (Mathf.Abs(this.flickMove) > this.S_FlickChecker.flickMin / 3f) { return; } if (this.selectShopIndex != shopIndex) { this.InfoPanel.GetComponent <InfoPanel>().SetInfoPanel(shopIndex); this.selectShopIndex = shopIndex; this.setCursor(pos); SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cursor"]); } else { ShopDataFormat shopDataFormat = SuperGameMaster.sDataBase.get_ShopDB(shopIndex); ItemDataFormat itemDataFormat = SuperGameMaster.sDataBase.get_ItemDB_forId(shopDataFormat.itemId); if (itemDataFormat == null) { return; } if (!itemDataFormat.spend && SuperGameMaster.FindItemStock(itemDataFormat.id) != 0) { SuperGameMaster.audioMgr.PlaySE(Define.SEDict["SE_Cancel"]); return; } if (SuperGameMaster.CloverPointStock() >= itemDataFormat.price) { if (SuperGameMaster.FindItemStock(shopDataFormat.itemId) < 99) { base.GetComponent <FlickCheaker>().stopFlick(true); ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>(); if (itemDataFormat.type == Item.Type.LunchBox) { confilm.OpenPanel_YesNo(string.Concat(new object[] { itemDataFormat.name, "\nを買いますか?\n(所持数\u3000", SuperGameMaster.FindItemStock(shopDataFormat.itemId), ")" })); } else { confilm.OpenPanel_YesNo(itemDataFormat.name + "\nを買いますか?"); } confilm.ResetOnClick_Yes(); confilm.SetOnClick_Yes(delegate { confilm.ClosePanel(); }); confilm.SetOnClick_Yes(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); confilm.SetOnClick_Yes(delegate { this.BuyItem(); }); confilm.ResetOnClick_No(); confilm.SetOnClick_No(delegate { confilm.ClosePanel(); }); confilm.SetOnClick_No(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); } else { base.GetComponent <FlickCheaker>().stopFlick(true); ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>(); confilm.OpenPanel("もちものがいっぱいです"); confilm.ResetOnClick_Screen(); confilm.SetOnClick_Screen(delegate { confilm.ClosePanel(); }); confilm.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); } } else { base.GetComponent <FlickCheaker>().stopFlick(true); ConfilmPanel confilm = this.ConfilmUI.GetComponent <ConfilmPanel>(); confilm.OpenPanel("みつ葉が足りません"); confilm.ResetOnClick_Screen(); confilm.SetOnClick_Screen(delegate { confilm.ClosePanel(); }); confilm.SetOnClick_Screen(delegate { this.GetComponent <FlickCheaker>().stopFlick(false); }); } } }