private static float GetSkinColorFactor(float?childMelanin, float?fatherMelanin, float?motherMelanin, bool fatherIsNew, bool motherIsNew)
        {
            if (childMelanin != null && fatherMelanin != null && motherMelanin != null)
            {
                float num  = Mathf.Min(fatherMelanin.Value, motherMelanin.Value);
                float num2 = Mathf.Max(fatherMelanin.Value, motherMelanin.Value);
                if (childMelanin < num - 0.05f)
                {
                    return(0f);
                }
                if (childMelanin > num2 + 0.05f)
                {
                    return(0f);
                }
            }
            float num3 = 1f;

            if (fatherIsNew)
            {
                num3 *= ChildRelationUtility.GetNewParentSkinColorFactor(fatherMelanin, motherMelanin, childMelanin);
            }
            if (motherIsNew)
            {
                num3 *= ChildRelationUtility.GetNewParentSkinColorFactor(motherMelanin, fatherMelanin, childMelanin);
            }
            return(num3);
        }
        private static float GetSkinColorFactor(float?childMelanin, float?fatherMelanin, float?motherMelanin, bool fatherIsNew, bool motherIsNew)
        {
            if (childMelanin.HasValue && fatherMelanin.HasValue && motherMelanin.HasValue)
            {
                float num  = Mathf.Min(fatherMelanin.Value, motherMelanin.Value);
                float num2 = Mathf.Max(fatherMelanin.Value, motherMelanin.Value);
                if (childMelanin.HasValue && childMelanin.GetValueOrDefault() < num - 0.05000000074505806)
                {
                    return(0f);
                }
                if (childMelanin.HasValue && childMelanin.GetValueOrDefault() > num2 + 0.05000000074505806)
                {
                    return(0f);
                }
            }
            float num3 = 1f;

            if (fatherIsNew)
            {
                num3 *= ChildRelationUtility.GetNewParentSkinColorFactor(fatherMelanin, motherMelanin, childMelanin);
            }
            if (motherIsNew)
            {
                num3 *= ChildRelationUtility.GetNewParentSkinColorFactor(motherMelanin, fatherMelanin, childMelanin);
            }
            return(num3);
        }