Hi, Justin, I'm having little hard time understanding how Item systems works. Having understanding why you designed it this way will help set my mind around it.
First of all, the term Item is both used as Inventory Items and general English terms in the Class name. This creates big confusion that Item is not really an Inventory Items and what does what. I'll have to go back to the code remind myself. I hope you use Item as just Inventory Items when naming Classes. Yeah, good naming is one of the most difficult tasks in programming. ^^
And second of all, Item.cs itself does quite a lot of things, handing pickups, drops, store information about UI, handing animations and audio, having direct access to players and so on. It seems like a required component for all Items. If it's a required component, shouldn't it be part of all Items by making a parent Class? (I'm the using Items to mean Inventory Items here, e.g., Shootable Weapon. I can't help but it sounds bit strange.) And it looks like some of Item.cs can be abstracted as Abilities to make it simpler.
I think the whole confusion started because the name Item and overall, naming are too general. I would get rid of Item class by folding into UsableItem or something and save the term Item to mean Inventory Item. Right now, the functionalities are split into Item.cs and other Inventory Items classes and make it little confusing what does what.
Maybe there is something I don't understand why you designed it that way, hence I make this post.
I hope it will be clear for the many other users who are looking into extending the code.
Thank you very much for your answer.
Cheers!
First of all, the term Item is both used as Inventory Items and general English terms in the Class name. This creates big confusion that Item is not really an Inventory Items and what does what. I'll have to go back to the code remind myself. I hope you use Item as just Inventory Items when naming Classes. Yeah, good naming is one of the most difficult tasks in programming. ^^
And second of all, Item.cs itself does quite a lot of things, handing pickups, drops, store information about UI, handing animations and audio, having direct access to players and so on. It seems like a required component for all Items. If it's a required component, shouldn't it be part of all Items by making a parent Class? (I'm the using Items to mean Inventory Items here, e.g., Shootable Weapon. I can't help but it sounds bit strange.) And it looks like some of Item.cs can be abstracted as Abilities to make it simpler.
I think the whole confusion started because the name Item and overall, naming are too general. I would get rid of Item class by folding into UsableItem or something and save the term Item to mean Inventory Item. Right now, the functionalities are split into Item.cs and other Inventory Items classes and make it little confusing what does what.
Maybe there is something I don't understand why you designed it that way, hence I make this post.
I hope it will be clear for the many other users who are looking into extending the code.
Thank you very much for your answer.
Cheers!