Esempio n. 1
0
        public float    GapWidth(BiomeSwitchCell c2)
        {
            float gap = 0;

            int length = c2.switchParams.switchParams.Length;

            for (int i = 0; i < length; i++)
            {
                if (switchParams.switchParams[i].enabled)
                {
                    var s1 = switchParams.switchParams[i];
                    var s2 = c2.switchParams.switchParams[i];
                    gap += PWUtils.GapWidth(s1.min, s1.max, s2.min, s2.max);
                }
            }

            return(gap);
        }
Esempio n. 2
0
        public float                            GapWidth(BiomeSurfaceSwitch b2)
        {
            float gap = 0;

            if (heightEnabled)
            {
                gap += PWUtils.GapWidth(minHeight, maxHeight, b2.minHeight, b2.maxHeight);
            }
            if (slopeEnabled)
            {
                gap += PWUtils.GapWidth(minSlope, maxSlope, b2.minSlope, b2.maxSlope);
            }
            if (paramEnabled)
            {
                gap += PWUtils.GapWidth(minParam, maxParam, b2.minParam, b2.maxParam);
            }

            return(gap);
        }