public static void SetUpgrade(FishingRod rod, Types type, int index) { switch (type) { case Types.MaxCastStrength: rod.SetMaxCastStrength(maxCastStrength[index].value); break; case Types.LineStrength: rod.SetLineStrength(lineStrength[index].value); break; case Types.MaxFish: rod.SetMaxFishOnHook(maxFish[index].value); break; case Types.LureRadius: rod.SetLureRadius(lureRadius[index].value); break; } }