Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            var other = obj as ScreenKun;

            if (other == null)
            {
                return(false);
            }
            if (!m_currentResolutionWidth.Equals(other.m_currentResolutionWidth))
            {
                return(false);
            }
            if (!m_currentResolutionHeight.Equals(other.m_currentResolutionHeight))
            {
                return(false);
            }
            if (!m_currentResolutionRefreshRate.Equals(other.m_currentResolutionRefreshRate))
            {
                return(false);
            }
            if (!m_width.Equals(other.m_width))
            {
                return(false);
            }
            if (!m_height.Equals(other.m_height))
            {
                return(false);
            }
            if (!m_sleepTimeout.Equals(other.m_sleepTimeout))
            {
                return(false);
            }
            if (!m_preferredRefreshRate.Equals(other.m_preferredRefreshRate))
            {
                return(false);
            }
            if (!m_autorotateToLandscapeLeft.Equals(other.m_autorotateToLandscapeLeft))
            {
                return(false);
            }
            if (!m_autorotateToLandscapeRight.Equals(other.m_autorotateToLandscapeRight))
            {
                return(false);
            }
            if (!m_autorotateToPortrait.Equals(other.m_autorotateToPortrait))
            {
                return(false);
            }
            if (!m_autorotateToPortraitUpsideDown.Equals(other.m_autorotateToPortraitUpsideDown))
            {
                return(false);
            }
            if (!m_fullScreen.Equals(other.m_fullScreen))
            {
                return(false);
            }
#if UNITY_2019_1_OR_NEWER
            if (!m_brightness.Equals(other.m_brightness))
            {
                return(false);
            }
#endif
            if (!m_dpi.Equals(other.m_dpi))
            {
                return(false);
            }
            if (!m_fullScreenMode.Equals(other.m_fullScreenMode))
            {
                return(false);
            }
            if (!m_orientation.Equals(other.m_orientation))
            {
                return(false);
            }
            if (!RectKun.Equals(m_safeArea, other.m_safeArea))
            {
                return(false);
            }
#if UNITY_2019_1_OR_NEWER
            if (m_cutouts != null)
            {
                if (other.m_cutouts == null)
                {
                    return(false);
                }
                if (m_cutouts.Length != other.m_cutouts.Length)
                {
                    return(false);
                }
                for (var i = 0; i < m_cutouts.Length; i++)
                {
                    if (!RectKun.Equals(m_cutouts[i], other.m_cutouts[i]))
                    {
                        return(false);
                    }
                }
            }
#endif
            if (m_resolutions != null)
            {
                if (other.m_resolutions == null)
                {
                    return(false);
                }
                if (m_resolutions.Length != other.m_resolutions.Length)
                {
                    return(false);
                }
                for (var i = 0; i < m_resolutions.Length; i++)
                {
                    if (!ResolutionKun.Equals(m_resolutions[i], other.m_resolutions[i]))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            var other = obj as CameraKun;

            if (other == null)
            {
                return(false);
            }
            if (clearFlags != other.clearFlags)
            {
                return(false);
            }
            if (m_backgroundColor.Equals(other.m_backgroundColor) == false)
            {
                return(false);
            }
            if (cullingMask.Equals(other.cullingMask) == false)
            {
                return(false);
            }
            if (orthographic.Equals(other.orthographic) == false)
            {
                return(false);
            }
            if (orthographicSize.Equals(other.orthographicSize) == false)
            {
                return(false);
            }
            if (fieldOfView.Equals(other.fieldOfView) == false)
            {
                return(false);
            }
            if (usePhysicalProperties.Equals(other.usePhysicalProperties) == false)
            {
                return(false);
            }
            if (focalLength.Equals(other.focalLength) == false)
            {
                return(false);
            }
            if (sensorType.Equals(other.sensorType) == false)
            {
                return(false);
            }
            if (m_lensShift.Equals(other.m_lensShift) == false)
            {
                return(false);
            }
            if (gateFit.Equals(other.gateFit) == false)
            {
                return(false);
            }
            if (nearClipPlane.Equals(other.nearClipPlane) == false)
            {
                return(false);
            }
            if (farClipPlane.Equals(other.farClipPlane) == false)
            {
                return(false);
            }
            if (m_rect.Equals(other.m_rect) == false)
            {
                return(false);
            }
            if (depth.Equals(other.depth) == false)
            {
                return(false);
            }
            if (renderingPath.Equals(other.renderingPath) == false)
            {
                return(false);
            }
            if (useOcclusionCulling.Equals(other.useOcclusionCulling) == false)
            {
                return(false);
            }
            if (allowHDR.Equals(other.allowHDR) == false)
            {
                return(false);
            }
            if (allowMSAA.Equals(other.allowMSAA) == false)
            {
                return(false);
            }
            if (allowDynamicResolution.Equals(other.allowDynamicResolution) == false)
            {
                return(false);
            }
            if (targetEye.Equals(other.targetEye) == false)
            {
                return(false);
            }
            return(base.Equals(obj));
        }