Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
425B

  1. using System;
  2. namespace Svelto.ECS
  3. {
  4. public class DispatchOnChange<T> : DispatchOnSet<T> where T:IEquatable<T>
  5. {
  6. public DispatchOnChange(EGID senderID) : base(senderID)
  7. { }
  8. public new T value
  9. {
  10. set
  11. {
  12. if (value.Equals(_value) == false)
  13. base.value = value;
  14. }
  15. get => _value;
  16. }
  17. }
  18. }