Esempio n. 1
0
        public void PlayVideo(UniRx.ReactiveCommand <bool> playCmd)
        {
            var g   = gObject;
            var sub = playCmd.Subscribe((play) =>
            {
                g.playing = play;
            });

            uiBase.AddDisposable(sub);
        }
Esempio n. 2
0
 public void Awake()
 {
     TestCommand = IntProp.Select(x => x > 0).ToReactiveCommand <int>();
     TestCommand.Subscribe(val =>
     {
         Debug.unityLogger.Log($"val = {val} IntProp.Value = {IntProp.Value}");
         IntProp.Value -= 1;
     });
     ChangeColor = Flagger.ToMVVMReactiveCommand();
     ChangeColor.Subscribe(_ => Color.Value = Random.ColorHSV());
 }