I have a game in which there are different kinds of garbage.
They have fields like:
- type (as an indicator that indicates which parameters will be next)
- speed (depends on type)
- damage (depending on type)
- skin (depending on the type)
I created a prefab with a script that selects the necessary skin and sets all the parameters, but I think how beautiful and understandable is it to organize everything? It is possible to create types in the enum list, and in the class script to define a field with a specific type and method that set the parameters depending on the type? But then what to do with the coders? They also dynamically substitute? Where to store information about all types and characteristics?
Or is it easier to make different prefabs with different characteristics but with a single script?
Tell me how to choose the right structure for this class of objects? :)