Game Shop: Prefabs and Classes Overview¶
Explore the pre-built components and classes in Balancy's game shop, designed for optimal integration and customization.
Balancy Templates¶
Badge¶
- BalancyShop.Badge: Contains Sprite and Text information for badges.
The Badge is used as a parameter in UIStoreItem The badge can be displayed in the SlotView or OfferPopup:
My Custom Slot¶
- BalancyShop.MyCustomSlot: Inherits 'Store Slot' and adds UIData to link 'đ UIStore Item' with the slot.
My Offer¶
- BalancyShop.MyOffer: Inherits 'đ Game Offer' and adds badge type plus two 'đ UIStore Item' parameters:
- UIStore Slot Data: Defines the offer's shop display.
- UIPopup Data: Describes the offer's popup window appearance.
UIItem¶
- BalancyShop.UIItem: Alters the default reward element rendering.
Parameter | Description |
---|---|
Asset | Prefab used for the reward |
Text | Overrides default text |
Icon | Replaces the reward item icon |
Background | Prefab background Sprite |
âšī¸ Game Section¶
- BalancyShop.GameSection: Outlines all game sections in the bottom controller.
Parameter | Description |
---|---|
Icon | Main icon |
Text | Icon label |
Order | Display sequence (left to right) |
Default Back | Non-selected state background sprite |
Selected Back | Selected state background sprite |
Type | Window type shown on selection |
Badge | Button's Badge data |
â¤ī¸ Badge Info¶
- BalancyShop.BadgeInfo: Details the badge displayed in store slots and above section buttons.
Badge type can be set for each Store Slot, here:
And in the Game Offer here:
We collect all the Store Slots and Offer, that have non Default badges, pick the one with the highest priority and display this badge above the shop button at the bottom navigation section. Badge priorities are in the My Store Item.
đ UIStore Item¶
- BalancyShop.UIStoreItem: Visual data used by 'My Custom Slot' and 'My Offer'.
Parameter | Description |
---|---|
Name | UI object name for design navigation |
Asset | Prefab for the UI object |
Background | Background sprite for the prefab |
Content | List of UIItem for StoreItem.Reward display |
Button | Button sprite |
Badge | Badge data for Offer or Store slot |
đ My Item¶
- BalancyShop.MyItem: Inherits 'đ¨ Item' and adds an Icon.
đ° My Store Item¶
- BalancyShop.MyStoreItem: Inherits 'đ° Store Item' and adds Description and Badge Priority.
Unity Prefabs¶
Unity C# Classes¶
BalancyShopSmartObjectsEvents¶
- Implements Balancy's ISmartObjectsEvents for tracking offer activations and deactivations.
BaseWindow¶
- Base class for all in-game windows.
BottomController¶
- Manages navigation between in-game windows.
BuyButton¶
- Universal button class for pricing, availability, timers, and purchase logic.
ContentHolder¶
- Facilitates shop view arrangement of reward items.
ControlButton¶
- Button component for switching active demo windows.
DemoUI¶
- Root class preparing all windows.
GameUtils¶
- Contains various utility functions for streamlined development.
InventoryWindow¶
- Basic inventory window allowing user level changes and progress resets.
ItemView¶
- Displays
ItemWithAmount
structure, part ofStoreItems.Reward
.
Launcher¶
- Initiates the demo.
MyButton¶
- Extends UnityEngine.UI.Button for click animations.
OfferPopup¶
- Script for displaying offers in a popup.
PageView¶
- Displays all ActiveSlots in each ActivePage.
PageViewOffers¶
- Shows all ActiveOffers.
SaleView¶
- Utilized for displaying badges in SlotViews and OfferPopup.
ShopWindow¶
- Main demo window handling all logic for Balancy's in-game shop.
SlotView¶
- Manages the visual representation of StoreItems and Offers.
TakeSizeFromContent¶
- Adjusts content size dynamically, e.g., expanding a page based on the number of Slots.