/// <summary>
        /// Calculates a hash code for this object.
        /// </summary>
        /// <returns>The hash code for this instance of <see cref="RandomParticleProperties"/>.</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hash = 23;

                if (Speed != null)
                {
                    hash = hash * 31 + Speed.GetHashCode();
                }
                if (Tint != null)
                {
                    hash = hash * 31 + Tint.GetHashCode();
                }
                if (Scale != null)
                {
                    hash = hash * 31 + Scale.GetHashCode();
                }
                if (TimeToLive != null)
                {
                    hash = hash * 31 + TimeToLive.GetHashCode();
                }
                if (ColorFactor != null)
                {
                    hash = hash * 31 + ColorFactor.GetHashCode();
                }
                if (RotationChange != null)
                {
                    hash = hash * 31 + RotationChange.GetHashCode();
                }
                return(hash);
            }
        }
示例#2
0
        public override int GetHashCode()
        {
            var hashCode = -1876634251;

            hashCode = hashCode * -1521134295 + Tint.GetHashCode();
            hashCode = hashCode * -1521134295 + BorderTint.GetHashCode();
            hashCode = hashCode * -1521134295 + BorderSize;
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Path);

            return(hashCode);
        }
示例#3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Exists.GetHashCode();
         hashCode = (hashCode * 397) ^ BlockId;
         hashCode = (hashCode * 397) ^ TextureIndex;
         hashCode = (hashCode * 397) ^ Tint.GetHashCode();
         hashCode = (hashCode * 397) ^ LightTopLeft.GetHashCode();
         hashCode = (hashCode * 397) ^ LightTopRight.GetHashCode();
         hashCode = (hashCode * 397) ^ LightBottomLeft.GetHashCode();
         hashCode = (hashCode * 397) ^ LightBottomRight.GetHashCode();
         return(hashCode);
     }
 }
示例#4
0
 public override int GetHashCode()
 {
     return(Temperature.GetHashCode() ^ Tint.GetHashCode());
 }