示例#1
0
    public void ShopItemButtonRightClick()
    {
        ShopPanel sp = UIManager.Instance.GetBaseUIForm <ShopPanel>();

        if (sp.Cur_BoughtShopItem.Contains(Cur_ShopItem))
        {
            sp.Cur_BoughtShopItem.Remove(Cur_ShopItem);
            StoryManager.Instance.GetStory().Crystal += Cur_ShopItem.Price;
            UIManager.Instance.GetBaseUIForm <StoryPlayerInformationPanel>().SetCrystal(StoryManager.Instance.GetStory().Crystal);
            IsSold = false;
            SetButtonLocked(false);
            sp.RefreshAllShopItemAffordable();
        }
    }
示例#2
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);
     }
 }