float maxRadiusOffset 3f float radiusOffsetFactor 20f var weaponCount

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
float maxRadiusOffset = 3f;
float radiusOffsetFactor = 20f;
var weaponCount = GetWeaponsCount();
var offset = weaponCount / radiusOffsetFactor;
offset = offset > maxRadiusOffset ? maxRadiusOffset : offset;
float width = unityRenderer.bounds.size.x;
float radius = width * 3.5f;
return radius + offset;