Class Shop
- Namespace
- AO
- Assembly
- CoreAssembly.dll
public class Shop
- Inheritance
-
Shop
- Inherited Members
- Extension Methods
Properties
Icon
public string Icon { get; set; }
Property Value
Id
public string Id { get; set; }
Property Value
Methods
AddCategory(string)
public ShopCategory AddCategory(string id)
Parameters
id
string
Returns
Draw(Rect)
public bool Draw(Rect rect)
Parameters
rect
Rect
Returns
Purchase(Player, GameProduct)
public void Purchase(Player player, GameProduct product)
Parameters
player
Playerproduct
GameProduct
SetCustomDisplay(Action<GameProduct, Rect>)
Set the "Custom Display" for this shop. The custom display can only be set on the client, and is used to display whatever information you would like
public void SetCustomDisplay(Action<GameProduct, Rect> handler)
Parameters
handler
Action<GameProduct, Rect>
SetPurchaseHandler(Func<Player, GameProduct, bool>)
Set a custom purchase handler for this shop. This must be set for the shop to function. The purchase handler can only be set on the server. The handler should return weather or not the purchase has been successful.
public void SetPurchaseHandler(Func<Player, GameProduct, bool> handler)
Parameters
handler
Func<Player, GameProduct, bool>
SetPurchaseModifier(Func<Player, GameProduct, PurchaseModification>)
Set the "Purchase Modifier" for this shop. The purchase modifier is used during the purchase flow to determine pricing, how to display the product and what to do when the buy button is pressed.
public void SetPurchaseModifier(Func<Player, GameProduct, PurchaseModification> handler)
Parameters
handler
Func<Player, GameProduct, PurchaseModification>