Question by
Linus333 · Sep 05, 2017 at 03:11 PM ·
inventoryinventory systemitem
inventory and item system where every item need its own use function
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!
Comment
Your answer
Follow this Question
Related Questions
IPointerExitHandler while holding click 0 Answers
Change the dropping prefab for each in-game drop 1 Answer
Canvas Inventory closing 0 Answers
Why is drag and drop not working? 1 Answer
Get object to check list for number of specific items 0 Answers