Exemplo n.º 1
0
 public void ReadyToPlay(CustomController.VideoCtrl videoCtrl, UniRx.ReactiveCommand onReadyTo)
 {
     videoCtrl.OnReadyToPlay = () =>
     {
         onReadyTo.Execute();
     };
 }
Exemplo n.º 2
0
 public void OnChanged(UniRx.ReactiveCommand cmd)
 {
     gObject.onChanged.Add(() =>
     {
         cmd.Execute();
     });
 }
Exemplo n.º 3
0
        //public void State(UniRx.IObservable<int> State)
        //{
        //    var g = gObject;
        //    var sub = State.Subscribe((s) =>
        //    {
        //        var ctrl = g.GetController("button");
        //        UnityEngine.Assertions.Assert.IsNotNull(ctrl);
        //        if (ctrl != null && ctrl.pageCount > s)
        //        {
        //            ctrl.SetSelectedIndex(s);
        //        }
        //    });
        //    uiBase.AddDisposable(sub);
        //}

        public void OnClick(UniRx.ReactiveCommand cmd)
        {
            gObject.displayObject.onClick.Add(
                () => {
                cmd.Execute();
            }
                );
        }
Exemplo n.º 4
0
        public void OnClick(UniRx.ReactiveCommand cmd)
        {
            var g   = gObject;
            var sub = cmd.Subscribe((u) =>
            {
                g.onClick.Add(() => cmd.Execute());
            });

            uiBase.AddDisposable(sub);
        }
Exemplo n.º 5
0
        public static void SubScribe(this IUnirxBind gobjectSub, UniRx.ReactiveCommand cmd, System.Action <UniRx.Unit> onCmd)
        {
            var sub = cmd.Subscribe(onCmd);

            gobjectSub.GetUIBase().AddDisposable(sub);
        }
Exemplo n.º 6
0
 public void OnTouchEnd(UniRx.ReactiveCommand cmd)
 {
     gObject.displayObject.onTouchEnd.Add(() => { cmd.Execute(); });
 }