public void PlayVideo(UniRx.ReactiveCommand <bool> playCmd) { var g = gObject; var sub = playCmd.Subscribe((play) => { g.playing = play; }); uiBase.AddDisposable(sub); }
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()); }