ShopUI

ShopUIinherits from TradeUI

ShopUI displays all available items to purchase. ShopUI is enabled on interacting with the Shop, and it´s disabled when leaving the Shop.

CRAFTING UI

  • shopButton: Buttons to instantiate in the Shop.

  • slidersContainer: When purchasing Weapons, slidersContainer is enabled to display Weapons Statistics.

  • damageSlider: Contained in slidersContainer, when purchasing weapons this slider gets filled to represent its damage statistics.

  • fireRateSlider: Contained in slidersContainer, when purchasing weapons this slider gets filled to represent its fire rate statistics.

  • magazineSlider: Contained in slidersContainer, when purchasing weapons this slider gets filled to represent its magazine statistics.

  • speedModifierSlider: Contained in slidersContainer, when purchasing weapons this slider gets filled to represent its speed modification statistics.

The rest of properties are part of TradeUI.

Functions | CraftingUI.cs

UpdateHighlightedItemUI(Item_SO item)

Highlights the Item and displays its information in the shop.

  • item: Item to highlight.

UpdateIngredientDisplay(Recipe_SO, int amountToCraft)

Updates the Ingredient Displays of a highlighted Recipe based on the desired amount of items to craft.

  • recipe: Recipe_SO to display all information about.

  • amountToCraft: Amount to display on the UI. This needs to match the real amount to craft to Crafting Processes and UI are up-to-date.

RefreshShopItems(ShopButton purchasedShopButton)

Re-initializes all shop items. This is generally called after a purchase has occured so the shop displays if the Player has enough resources or not after the purchase.

  • purchasedShopButton: Reference to the ShopButton that contains the Item that has been purchased.

Last updated