暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

PlayRange.cs 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. namespace UnityEditor.Timeline
  3. {
  4. [Serializable]
  5. struct PlayRange : IEquatable<PlayRange>
  6. {
  7. public bool Equals(PlayRange other)
  8. {
  9. return other != null && start.Equals(other.start) && end.Equals(other.end);
  10. }
  11. public override bool Equals(object obj)
  12. {
  13. return obj is PlayRange other && Equals(other);
  14. }
  15. public static bool operator ==(PlayRange left, PlayRange right)
  16. {
  17. return left.Equals(right);
  18. }
  19. public static bool operator !=(PlayRange left, PlayRange right)
  20. {
  21. return !left.Equals(right);
  22. }
  23. public override int GetHashCode()
  24. {
  25. unchecked
  26. {
  27. return (start.GetHashCode() * 397) ^ end.GetHashCode();
  28. }
  29. }
  30. public PlayRange(double a, double b)
  31. {
  32. start = a;
  33. end = b;
  34. }
  35. public double start;
  36. public double end;
  37. }
  38. }