Skip to content

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:

Game Offer Popup Screenshot

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:
    1. UIStore Slot Data: Defines the offer's shop display.
    2. 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.

Game Sections Screenshot

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

Game Section Template Screenshot

❤ī¸ Badge Info

  • BalancyShop.BadgeInfo: Details the badge displayed in store slots and above section buttons.

Badge Example Screenshot Badge Info Screenshot

Badge type can be set for each Store Slot, here:

Badge Store Slot Screenshot

And in the Game Offer here:

Badge Offer Screenshot

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'.

UIStore Item Screenshot

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 Item Screenshot

💰 My Store Item

  • BalancyShop.MyStoreItem: Inherits '💰 Store Item' and adds Description and Badge Priority.

My Store Item Screenshot

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.

Tabs Controller Screenshot

BuyButton

  • Universal button class for pricing, availability, timers, and purchase logic.

Buy Button Screenshot

ContentHolder

  • Facilitates shop view arrangement of reward items.

Reward View Screenshot

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 of StoreItems.Reward.

Launcher

  • Initiates the demo.

MyButton

  • Extends UnityEngine.UI.Button for click animations.

OfferPopup

  • Script for displaying offers in a popup.

PageView

PageViewOffers

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.

Slot View Screenshot

TakeSizeFromContent

  • Adjusts content size dynamically, e.g., expanding a page based on the number of Slots.