You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
namespace ProjetBlazor.Models
|
|
{
|
|
public class ItemInInventory
|
|
{
|
|
public Item item;
|
|
int stack;
|
|
|
|
/// <summary>
|
|
/// The number of items in the stack.
|
|
/// </summary>
|
|
public int Stack { get; set; }
|
|
|
|
/// <summary>
|
|
/// Constructor for InventoryItem with no parameters.
|
|
/// </summary>
|
|
public ItemInInventory()
|
|
{
|
|
item = new Item();
|
|
Stack = 64;
|
|
}
|
|
/// <summary>
|
|
/// Constructor for InventoryItem with a single item.
|
|
/// </summary>
|
|
/// <param name="item">The item.</param>
|
|
public ItemInInventory(Item item)
|
|
{
|
|
this.item = item;
|
|
Stack = 1;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Constructor for InventoryItem with a stack of items.
|
|
/// </summary>
|
|
/// <param name="item">The item</param>
|
|
/// <param name="stock">The number of items in the stack.</param>
|
|
public ItemInInventory(Item item, int stock)
|
|
{
|
|
this.item = item;
|
|
Stack = stock;
|
|
}
|
|
}
|
|
}
|