using System; using DjRedo.Core.Trees; using JD.Serialization; namespace DjRedo.Core { internal struct AudioNodeInfos : IEquatable { public AudioNode AudioNode { get; set; } public LuaSerializer Serializer { get; set; } public Actor_Template Tpl { get; set; } public static AudioNodeInfos Empty=>new AudioNodeInfos(); /// public bool Equals(AudioNodeInfos other) { return Equals(AudioNode, other.AudioNode) && Equals(Serializer, other.Serializer) && Equals(Tpl, other.Tpl); } /// public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; return obj is AudioNodeInfos && Equals((AudioNodeInfos) obj); } /// public override int GetHashCode() { unchecked { var hashCode = (AudioNode != null ? AudioNode.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Serializer != null ? Serializer.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Tpl != null ? Tpl.GetHashCode() : 0); return hashCode; } } } }