Thanks for anyone who tried to help. I actually got a nice explanation from Jamora, at the same link I posted above [link]. But I never got the time to share it again.
However, I discovered that you can't make everything a component, for example, a Reloadable
or a Shooter
component. Unless all your weapons reload/shoot the same way, you can't create such components and attach it to them, cause if weapons reload/shoot differently, this means that this information should be in the weapon itself (ie an abstract Weapon
with maybe an abstract Reload
and Shoot
methods) so the component doesn't know that info.
Another example, making a Usable
script component to attach to your items. You can't do that, that doesn't make sense. Using a health item, is different from using a key to open a door. The using information is stored in the items themselves. Attaching Usable
to an item, means that all items are used the same way.
I've also discovered that, inheritance is a must, even in Unity. But the bad thing is to just depend on pure object-hierarchy trees for all your designs. Instead, create mixes of small trees, implementing interfaces for different behaviors and create script components whenever you can.