public void MergeFrom(AgentInfoProto other) { if (other == null) { return; } stackedVectorObservation_.Add(other.stackedVectorObservation_); if (other.TextObservation.Length != 0) { TextObservation = other.TextObservation; } storedVectorActions_.Add(other.storedVectorActions_); if (other.StoredTextActions.Length != 0) { StoredTextActions = other.StoredTextActions; } memories_.Add(other.memories_); if (other.Reward != 0F) { Reward = other.Reward; } if (other.Done != false) { Done = other.Done; } if (other.MaxStepReached != false) { MaxStepReached = other.MaxStepReached; } if (other.Id != 0) { Id = other.Id; } actionMask_.Add(other.actionMask_); if (other.customObservation_ != null) { if (customObservation_ == null) { customObservation_ = new global::MLAgents.CommunicatorObjects.CustomObservationProto(); } CustomObservation.MergeFrom(other.CustomObservation); } compressedObservations_.Add(other.compressedObservations_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; hash ^= stackedVectorObservation_.GetHashCode(); if (TextObservation.Length != 0) { hash ^= TextObservation.GetHashCode(); } hash ^= storedVectorActions_.GetHashCode(); if (StoredTextActions.Length != 0) { hash ^= StoredTextActions.GetHashCode(); } hash ^= memories_.GetHashCode(); if (Reward != 0F) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Reward); } if (Done != false) { hash ^= Done.GetHashCode(); } if (MaxStepReached != false) { hash ^= MaxStepReached.GetHashCode(); } if (Id != 0) { hash ^= Id.GetHashCode(); } hash ^= actionMask_.GetHashCode(); if (customObservation_ != null) { hash ^= CustomObservation.GetHashCode(); } hash ^= compressedObservations_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }