Ejemplo n.º 1
0
        public static IObservable <Unit> FromAtion(DoActionDelegate actionDelegate)
        {
            return(Observable.Create <Unit>((observer) =>
            {
                actionDelegate(() =>
                {
                    observer.OnNext(Unit.Default);
                    observer.OnComplete();
                });

                //not support cancel
                return Disposable.Empty;
            }));
        }
Ejemplo n.º 2
0
 public static IObservable <Unit> ContinueWithAction(this IObservable <Unit> source, DoActionDelegate actionDelegate)
 {
     return(source.ContinueWith <Unit, Unit>((v) => { return Observable.FromAtion(actionDelegate); }));
 }
Ejemplo n.º 3
0
 public void AddActionDelegate(DoActionDelegate del)
 {
     onDoAction += del;
 }
Ejemplo n.º 4
0
 public void RemoveActionDelegate(DoActionDelegate del)
 {
     onDoAction -= del;
 }
Ejemplo n.º 5
0
 void OnDestroy()
 {
     onDoAction  = null;
     onSkillOver = null;
 }