public override int GetHashCode()
    {
        //2021-12-03: copied from https://stackoverflow.com/a/1646913/2336212
        int hash = 17;

        hash = hash * 31 + movement.x.GetHashCode();
        hash = hash * 31 + movement.y.GetHashCode();
        hash = hash * 31 + ability1.GetHashCode();
        hash = hash * 31 + ability2.GetHashCode();
        hash = hash * 31 + ability3.GetHashCode();
        hash = hash * 31 + reload.GetHashCode();
        hash = hash * 31 + moveTowardsCursor.GetHashCode();
        return(hash);
    }
 public override int GetHashCode()
 {
     // TODO: Is this even worth doing? They're just bools...
     return(a.GetHashCode()
            ^ b.GetHashCode()
            ^ back.GetHashCode()
            ^ leftShoulder.GetHashCode()
            ^ leftStick.GetHashCode()
            ^ rightShoulder.GetHashCode()
            ^ rightStick.GetHashCode()
            ^ start.GetHashCode()
            ^ x.GetHashCode()
            ^ y.GetHashCode());
 }
Пример #3
0
 /// <summary>
 /// Gets the hash code for this instance.
 /// </summary>
 public override int GetHashCode()
 {
     return(x.GetHashCode() ^ y.GetHashCode() ^ leftButton.GetHashCode() ^ rightButton.GetHashCode() ^ middleButton.GetHashCode() ^ xb1.GetHashCode() ^ xb2.GetHashCode() ^ wheel.GetHashCode());
 }