Simple IAP System  4.3
Public Member Functions | Public Attributes | List of all members
IAPItem

Shop item properties: this class basically stores all necessary variables for visualizing a product in the shop UI. More...

Inheritance diagram for IAPItem:

Public Member Functions

void Init (IAPObject obj)
 Initialize virtual or real item properties based on IAPObject set in IAP Settings editor. Called by ShopManager. More...
 
void Init (Product product)
 Overwrite real money item properties with online data received from the billing plugin initialization callback. Called by ShopManager. More...
 
void Unlock ()
 Unlocks this item by hiding the 'locked' gameobject and setting up the default state. Called by ShopManager. More...
 
void ConfirmPurchase (bool selected)
 Show the buy button based on the bool passed in. This simulates 'double tap to purchase' behavior, and only works when setting a buyTrigger button. More...
 
void Purchase ()
 When the buy button has been clicked, here we try to purchase this item. This calls into the corresponding billing workflow of the IAPManager. More...
 
void Purchased (bool state)
 Set this item to 'purchased' state (true), or unpurchased state (false) for fake purchases. More...
 
void IsSelected (bool thisSelect)
 Handles selection state for this item, but this method gets called on other radio buttons within the same group too. Called by selectButton's Toggle component. More...
 
void Deselect ()
 Called when deselecting this item via the deselectButton. More...
 

Public Attributes

string productId
 ID of the product. Do not enter if you are letting the ShopManager instantiate your shop items More...
 
Text title
 Product name or title. More...
 
Text description
 Product description. More...
 
bool uppercase = false
 Boolean for setting all labels to uppercase. More...
 
Image icon
 Icon sprite for better visualization. More...
 
Text[] price
 Array of price labels, as there could be more than one currency for virtual game purchases. More...
 
GameObject buyButton
 Buy button that invokes the actual purchase. More...
 
GameObject buyTrigger
 Buy trigger, used for making the buy button visible. (optional - could be used for 'double tap to purchase') More...
 
Text lockedLabel
 Label that displays text while this item is locked. More...
 
GameObject[] hideOnUnlock
 UI elements that will be de-activated when unlocking this item. More...
 
GameObject[] showOnUnlock
 UI elements that will be activated when unlocking this item. More...
 
GameObject sold
 Additional UI elements that will be activated on sold items. More...
 
GameObject selected
 Additional UI elements that will be activated on selected items. More...
 
GameObject selectButton
 Button for selecting this item. More...
 
GameObject deselectButton
 Button for deselecting this item. More...
 

Detailed Description

Shop item properties: this class basically stores all necessary variables for visualizing a product in the shop UI.

Member Function Documentation

void ConfirmPurchase ( bool  selected)

Show the buy button based on the bool passed in. This simulates 'double tap to purchase' behavior, and only works when setting a buyTrigger button.

void Deselect ( )

Called when deselecting this item via the deselectButton.

void Init ( IAPObject  obj)

Initialize virtual or real item properties based on IAPObject set in IAP Settings editor. Called by ShopManager.

void Init ( Product  product)

Overwrite real money item properties with online data received from the billing plugin initialization callback. Called by ShopManager.

void IsSelected ( bool  thisSelect)

Handles selection state for this item, but this method gets called on other radio buttons within the same group too. Called by selectButton's Toggle component.

void Purchase ( )

When the buy button has been clicked, here we try to purchase this item. This calls into the corresponding billing workflow of the IAPManager.

void Purchased ( bool  state)

Set this item to 'purchased' state (true), or unpurchased state (false) for fake purchases.

void Unlock ( )

Unlocks this item by hiding the 'locked' gameobject and setting up the default state. Called by ShopManager.

Member Data Documentation

GameObject buyButton

Buy button that invokes the actual purchase.

GameObject buyTrigger

Buy trigger, used for making the buy button visible. (optional - could be used for 'double tap to purchase')

Text description

Product description.

GameObject deselectButton

Button for deselecting this item.

GameObject [] hideOnUnlock

UI elements that will be de-activated when unlocking this item.

Image icon

Icon sprite for better visualization.

Text lockedLabel

Label that displays text while this item is locked.

Text [] price

Array of price labels, as there could be more than one currency for virtual game purchases.

string productId

ID of the product. Do not enter if you are letting the ShopManager instantiate your shop items

GameObject selectButton

Button for selecting this item.

GameObject selected

Additional UI elements that will be activated on selected items.

GameObject [] showOnUnlock

UI elements that will be activated when unlocking this item.

GameObject sold

Additional UI elements that will be activated on sold items.

Text title

Product name or title.

bool uppercase = false

Boolean for setting all labels to uppercase.


The documentation for this class was generated from the following file: