Esempio n. 1
0
        public override int GetHashCode()
        {
            if (IsEmpty)
            {
                return(0);
            }

            return(State.GetHashCode()
                   ^ PosX.GetHashCode() ^ PosY.GetHashCode()
                   ^ Width.GetHashCode() ^ Height.GetHashCode());
        }
Esempio n. 2
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (Name.Length != 0)
        {
            hash ^= Name.GetHashCode();
        }
        if (PosX != 0F)
        {
            hash ^= PosX.GetHashCode();
        }
        if (PosY != 0F)
        {
            hash ^= PosY.GetHashCode();
        }
        if (PosZ != 0F)
        {
            hash ^= PosZ.GetHashCode();
        }
        if (RotX != 0F)
        {
            hash ^= RotX.GetHashCode();
        }
        if (RotY != 0F)
        {
            hash ^= RotY.GetHashCode();
        }
        if (RotZ != 0F)
        {
            hash ^= RotZ.GetHashCode();
        }
        if (Hp != 0)
        {
            hash ^= Hp.GetHashCode();
        }
        if (BossHp != 0)
        {
            hash ^= BossHp.GetHashCode();
        }
        if (Target != 0)
        {
            hash ^= Target.GetHashCode();
        }
        return(hash);
    }
Esempio n. 3
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (Name.Length != 0)
        {
            hash ^= Name.GetHashCode();
        }
        if (PosX != 0F)
        {
            hash ^= PosX.GetHashCode();
        }
        if (PosY != 0F)
        {
            hash ^= PosY.GetHashCode();
        }
        if (PosZ != 0F)
        {
            hash ^= PosZ.GetHashCode();
        }
        if (RotX != 0F)
        {
            hash ^= RotX.GetHashCode();
        }
        if (RotY != 0F)
        {
            hash ^= RotY.GetHashCode();
        }
        if (RotZ != 0F)
        {
            hash ^= RotZ.GetHashCode();
        }
        if (Hp != 0)
        {
            hash ^= Hp.GetHashCode();
        }
        if (IsHit != false)
        {
            hash ^= IsHit.GetHashCode();
        }
        return(hash);
    }
Esempio n. 4
0
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         int hashCode = 41;
         if (PosX != null)
         {
             hashCode = hashCode * 59 + PosX.GetHashCode();
         }
         if (PosY != null)
         {
             hashCode = hashCode * 59 + PosY.GetHashCode();
         }
         if (ItemId != null)
         {
             hashCode = hashCode * 59 + ItemId.GetHashCode();
         }
         return(hashCode);
     }
 }