Class Product
Represents a product that can be sold in the market.
Namespace: Backend
Assembly: cs.temp.dll.dll
Syntax
public class Product
Properties
Buyable
Whether the product is purchasable from the market.
Declaration
public bool Buyable { get; set; }
Property Value
Type | Description |
---|---|
bool | Whether it's purchasable. |
BuyAction
Some products have a special action that must be performed upon purchase.
Declaration
public Action<Household> BuyAction { get; set; }
Property Value
Type | Description |
---|---|
Action<><Household> | A function that takes in a buyer and returns void. |
Description
The product's description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string | The description. |
Name
The product's name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | The name. |
Price
The product's base price.
Declaration
public int Price { get; set; }
Property Value
Type | Description |
---|---|
int | The base price. |
PriceMultiplier
A multiplier for the price.
Declaration
public float PriceMultiplier { get; set; }
Property Value
Type | Description |
---|---|
float | The price multiplier. |
PurchaseCondition
Some products have extra conditions that must be met aside from price before they can be bought.
Declaration
public Func<Household, bool> PurchaseCondition { get; set; }
Property Value
Type | Description |
---|---|
Func<, ><Household, bool> | A function that takes in a buyer and returns whether the condition is met. |