public override int GetHashCode() { //unchecked { int hashCode = DropPieceSimple.GetHashCode(); hashCode = (hashCode * 397) ^ (Positions?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PositionLerp?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)CurrentState; hashCode = (hashCode * 397) ^ HoldTimer.GetHashCode(); return(hashCode); } }
public bool Equals(DropPiece other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (Positions.SequenceEqual(other.Positions) && PositionLerp.SequenceEqual(other.PositionLerp) && CurrentState == other.CurrentState && HoldTimer.Equals(other.HoldTimer)) { return(this.DropPieceSimple.Equals(other.DropPieceSimple)); } else { return(false); } }