private void SetShopMode(ItemShopMode shopMode) { this.shopMode = shopMode; itemShopView.SetShopMode(shopMode); itemShopView.ToggleShopModeView(false); SetTargetItems(); SetPageCount(); ViewTargetItems(); itemShopView.ClearItemInfoView(); }
public void SetShopMode(ItemShopMode shopMode) { foreach (var itemView in itemViews.ItemViews) { ItemAmountView amountView = itemView.GetComponent <ItemAmountView>(); if (amountView != null) { amountView.clampToItemAmount = shopMode == ItemShopMode.Selling; } } actionText.text = shopMode == ItemShopMode.Buying ? "Buy" : "Sell"; }