/// <summary> /// Provides the <paramref name="source"/> a clip from either Cavern or Unity. /// </summary> public static void TunnelClips(ref Clip source, AudioClip unity, Clip cavern, ref int lastClipHash) { if (cavern) { if (!source || lastClipHash != cavern.GetHashCode()) { source = cavern; lastClipHash = cavern.GetHashCode(); } } else if (unity) { if (!source || lastClipHash != unity.GetHashCode()) { float[] AllData = new float[unity.channels * unity.samples]; unity.GetData(AllData, 0); source = new Clip(AllData, unity.channels, unity.frequency); lastClipHash = unity.GetHashCode(); } } else if (source && lastClipHash != 0) { source = null; lastClipHash = 0; } }
public override int GetHashCode() { unchecked { return(((Clip != null ? Clip.GetHashCode() : 0) * 397) ^ Qualification.GetHashCode()); } }
public override int GetHashCode() { unchecked { var hashCode = Bounds.GetHashCode(); hashCode = (hashCode * 397) ^ Clip.GetHashCode(); hashCode = (hashCode * 397) ^ Transform.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { var hashCode = clipBehavior?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ color?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ shadowColor?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ elevation?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ margin?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ shape?.GetHashCode() ?? 0; return(hashCode); }