Sorry if the question is weird, I just began to use Unity & started to code.
I'm using a XML Serialization system to create a savestate. Here is my savestate content :
public int item1_owned;
public int item1_price;
public int item2_owned;
public int item2_price;
item1_owned
is the amount of item1
the player actually have. The item1_price
define the price of the item1
(stored here because it rise after each buy, like a Cookie Clicker system)
I tried to put it more simply, to avoid creating a new int itemX each time I create a new item. So I tried to put a dictionary but it seems like it need changes for the XML Serialization and I'm not experimented enough to try this. What I would like is to put my Item in a sort of class with a price, a name... But I don't know how to create an infinite number of class and how to works with it.
Thanks for the help, and please don't be mean, I really tried :(