you can now sell Items with Right Mouse Click on an InventorySlot for the Item.SellPrice

and it gets put into the Shop for full price

renamed Item.cost to Item.price
This commit is contained in:
d-hain 2022-06-08 22:52:28 +02:00
parent 64b25a2029
commit ba9be3d96b
7 changed files with 50 additions and 13 deletions

View file

@ -8,8 +8,8 @@ public class Item : ScriptableObject, IComparable<Item> {
public int id; //TODO: create an actual ID System that makes snens
public Sprite selectedSprite;
public Sprite defaultSprite;
public int cost;
public int SellPrice => Convert.ToInt32(cost * 0.8);
public int price;
public int SellPrice => Convert.ToInt32(price * 0.8);
public Item(string displayName, string description, int id) {
this.displayName = displayName;