Example #1
0
 public void ShopItemButtonLeftClick()
 {
     if (Affordable)
     {
         AudioManager.Instance.SoundPlay("sfx/OnBuyShopItem");
         ShopPanel sp = UIManager.Instance.GetBaseUIForm <ShopPanel>();
         sp.SetAllButtonLock(true);
         sp.Cur_BoughtShopItem.Add(Cur_ShopItem);
         StoryManager.Instance.GetStory().Crystal -= Cur_ShopItem.Price;
         IsSold = true;
         SetButtonLocked(true);
         UIManager.Instance.GetBaseUIForm <StoryPlayerInformationPanel>().SetCrystal(StoryManager.Instance.GetStory().Crystal);
         sp.RefreshAllShopItemAffordable();
     }
     else
     {
         NoticeManager.Instance.ShowInfoPanelCenter(LanguageManager.Instance.GetText("ShopPanel_CannotAffordShopItem"), 0f, 1f);
     }
 }