ComponentType.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. namespace MonoGame.Extended.ECS
  3. {
  4. //public class ComponentType : IEquatable<ComponentType>
  5. //{
  6. // public ComponentType(Type type, int id)
  7. // {
  8. // Type = type;
  9. // Id = id;
  10. // }
  11. // public Type Type { get; }
  12. // public int Id { get; }
  13. // public bool Equals(ComponentType other)
  14. // {
  15. // if (ReferenceEquals(null, other)) return false;
  16. // if (ReferenceEquals(this, other)) return true;
  17. // return Id == other.Id;
  18. // }
  19. // public override bool Equals(object obj)
  20. // {
  21. // if (ReferenceEquals(null, obj)) return false;
  22. // if (ReferenceEquals(this, obj)) return true;
  23. // if (obj.GetType() != GetType()) return false;
  24. // return Equals((ComponentType) obj);
  25. // }
  26. // public override int GetHashCode()
  27. // {
  28. // return Id;
  29. // }
  30. // public static bool operator ==(ComponentType left, ComponentType right)
  31. // {
  32. // return Equals(left, right);
  33. // }
  34. // public static bool operator !=(ComponentType left, ComponentType right)
  35. // {
  36. // return !Equals(left, right);
  37. // }
  38. //}
  39. }