Would it be better to have one script that switches or have multiple scripts with each with their own function?
In example, Lets say I am making a powerup script.
Option 1: Create a single powerup script that switches the effects
switch (/*Enum of effects*/)
{
case Effect.IncreaseHealth:
health += amount;
}
Option 2: Create multiple scripts that each does its individual function
Class IncreaseHealthPowerup
{
protected void Start()
{
health += amount
}
}
This is different from the question of Multiple Script versus Single Script as it is already in component form. The question is whether to further segregate down to the types of component.
I would also like to ask the Pros and Cons of each option with regards to potential development issues, or lack of, as well as the overhead caused in either cases.