示例#1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="obj"></param>
            /// <returns></returns>
            public override bool Equals(object obj)
            {
                var other = obj as TextureKunPacket;

                if (other == null)
                {
                    return(false);
                }
                if (!m_isResources.Equals(other.m_isResources))
                {
                    return(false);
                }
                if (!m_isScene.Equals(other.m_isScene))
                {
                    return(false);
                }
                if (m_textureKuns != null)
                {
                    if (other.m_textureKuns == null)
                    {
                        return(false);
                    }
                    if (m_textureKuns.Length != other.m_textureKuns.Length)
                    {
                        return(false);
                    }
                    for (var i = 0; i < m_textureKuns.Length; i++)
                    {
                        if (!TextureKun.Equals(m_textureKuns[i], other.m_textureKuns[i]))
                        {
                            return(false);
                        }
                    }
                }
                else if (other.m_textureKuns != null)
                {
                    return(false);
                }
                return(true);
            }
示例#2
0
            public override bool Equals(object obj)
            {
                var other = obj as Property;

                if (other == null)
                {
                    return(false);
                }
#if UNITY_2019_1_OR_NEWER
                if (flags.Equals(other.flags) == false)
                {
                    return(false);
                }
                if (type.Equals(other.type) == false)
                {
                    return(false);
                }
#endif
                if (dirty.Equals(other.dirty) == false)
                {
                    return(false);
                }

                if (!ColorKun.Equals(m_colorValue, other.m_colorValue))
                {
                    return(false);
                }

                if (!string.Equals(displayName, other.displayName))
                {
                    return(false);
                }

                if (floatValue.Equals(other.floatValue) == false)
                {
                    return(false);
                }

                if (!string.Equals(name, other.name))
                {
                    return(false);
                }
                if (nameId.Equals(other.nameId) == false)
                {
                    return(false);
                }

                if (!Vector2Kun.Equals(m_rangeLimits, other.m_rangeLimits))
                {
                    return(false);
                }

                if (textureDimension.Equals(other.textureDimension) == false)
                {
                    return(false);
                }

                if (!TextureKun.Equals(m_textureValue, other.m_textureValue))
                {
                    return(false);
                }

                if (!Vector4Kun.Equals(m_vectorValue, other.m_vectorValue))
                {
                    return(false);
                }

                if (!Vector2Kun.Equals(m_scale, other.m_scale))
                {
                    return(false);
                }

                if (!Vector2Kun.Equals(m_offset, other.m_offset))
                {
                    return(false);
                }
                return(true);
            }