com.hashbang.monarch.beamable.economy
v1.0.2
Published
Hashbang Beamable Economy package for working with Stores
Downloads
1
Readme
Monarch Beamable Economy Package
The Economy Service is a class in the Monarch game framework that provides functionality for working with Stores. Stores are used for linking Items to Listings for displaying in game shops and purchasing.
Adding Economy to StartupApp
To use the Monarch Beamable EconomyLoader, you need to add it to the list of loaders in your StartupApp.
// Add EconomyLoader to LoaderService
_loader.RegisterLoader(new EconomyLoader());
Usage
To use the Economy Service, its Load() caches the stores, listings, skus for use.
Call Purchase(string storeId, string listingId) to attempt to purchase an item. you will get back a result.
public Dictionary<string, StoreContent> Stores
public Dictionary<string, ListingContent> Listings
public Dictionary<string, SKUContent> Skus
Summary, the Economy Service gets and subscribes to Beamables ContentService to keep a up to date cache of stores, listings, and skus for use. It is used to purchase items and will call the reward service upon successful purchase.