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

            if (otherKun == null)
            {
                return(false);
            }
#if UNITY_2019_1_OR_NEWER
            if (lightShape != otherKun.lightShape)
            {
                return(false);
            }
            if (colorTemperature.Equals(otherKun.colorTemperature) == false)
            {
                return(false);
            }
            if (useColorTemperature.Equals(otherKun.useColorTemperature) == false)
            {
                return(false);
            }
            if (renderingLayerMask.Equals(otherKun.renderingLayerMask) == false)
            {
                return(false);
            }
#endif
            if (lightType.Equals(otherKun.lightType) == false)
            {
                return(false);
            }
            if (range.Equals(otherKun.range) == false)
            {
                return(false);
            }
            if (spotAngle.Equals(otherKun.spotAngle) == false)
            {
                return(false);
            }
            if (innerSpotAngle.Equals(otherKun.innerSpotAngle) == false)
            {
                return(false);
            }
            if (cookieSize.Equals(otherKun.cookieSize) == false)
            {
                return(false);
            }


            if (!ColorKun.Equals(m_colorKun, otherKun.m_colorKun))
            {
                return(false);
            }

            if (intensity.Equals(otherKun.intensity) == false)
            {
                return(false);
            }
            if (bounceIntensity.Equals(otherKun.bounceIntensity) == false)
            {
                return(false);
            }
            if (cookie.Equals(otherKun.cookie) == false)
            {
                return(false);
            }
            if (shadowsType.Equals(otherKun.shadowsType) == false)
            {
                return(false);
            }
            if (shadowsStrength.Equals(otherKun.shadowsStrength) == false)
            {
                return(false);
            }
            if (shadowsResolution.Equals(otherKun.shadowsResolution) == false)
            {
                return(false);
            }
            if (shadowsBias.Equals(otherKun.shadowsBias) == false)
            {
                return(false);
            }
            if (shadowsNormalBias.Equals(otherKun.shadowsNormalBias) == false)
            {
                return(false);
            }
            if (shadowsNearPlane.Equals(otherKun.shadowsNearPlane) == false)
            {
                return(false);
            }
            if (halo.Equals(otherKun.halo) == false)
            {
                return(false);
            }
            if (flare.Equals(otherKun.flare) == false)
            {
                return(false);
            }
            if (renderMode.Equals(otherKun.renderMode) == false)
            {
                return(false);
            }
            if (cullingMask.Equals(otherKun.cullingMask) == false)
            {
                return(false);
            }
            return(true);
        }