// override object.Equals public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } TWObserve tmp = obj as TWObserve; return(this.Observe.Equals(tmp.Observe) && this.NoticeName.Equals(tmp.NoticeName) && this.MethodHandle.Equals(tmp.MethodHandle)); }
public void AddObserve(UnityEngine.Object obj, string noticeName, string methodHandle) { TWObserve obv = new TWObserve(obj, noticeName, methodHandle); triggers.Add(obv); }