public int CompareTo(BProtoObjectDamageType other) { if (DamageType != other.DamageType) { DamageType.CompareTo(other.DamageType); } if (Direction != other.Direction) { Direction.CompareTo(other.Direction); } return(Mode.CompareTo(other.Mode)); }