public override int GetHashCode() { unchecked { int hashCode = PlayerName != null?PlayerName.GetHashCode() : 0; hashCode = (hashCode * 397) ^ RedAdditive.GetHashCode(); hashCode = (hashCode * 397) ^ GreenAdditive.GetHashCode(); hashCode = (hashCode * 397) ^ BlueAdditive.GetHashCode(); return(hashCode); } }
public bool Equals(PlayerPreference other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(string.Equals(PlayerName, other.PlayerName) && RedAdditive.Equals(other.RedAdditive) && GreenAdditive.Equals(other.GreenAdditive) && BlueAdditive.Equals(other.BlueAdditive)); }