At the moment i work on a Terraria liked game (Terraria is a 2d sandbox game), my problem is that i don't know how to create the inventory, i need much items with their own use function witch the player can store and use from his inventory.
The only idea i had is a switch statement to call the right function for every item, but i think thats not very preferment when i have about 50-100 items.
thanks for answers!
↧