Im making an RPG game which requires there to be lots of different items in the game. Each item has its own individual properties and i was wondering whats the best way to store them all.
Heres my idea at the moment
public class ItemStorage {
public static Item nullItem = new Item(-1,"",""); //-1
public static Item weaponTest = new ItemWeapon(0,"WeaponTest","Weapon"); //0
}
However that would require lots of code to put in all the items.
I thought about using a list or an array but that would be hard to reference in other areas of my code as i would need to knoew the index of each item. Is this the best way of doing it, or am i missing something?
-Many Thanks