예제 #1
0
        void OnStart()
        {
            var model = MVCWithCommandConfig.GetModel <MVCWithCommandModel>();

            model.Count.BindWithInitialValue(count => Text.text = count.ToString()).AddTo(gameObject);

            Button.OnClickAsObservable().Subscribe(_ =>
            {
                MVCWithCommandConfig.SendCommand <IncreaseCountCommand>();
            });
        }
예제 #2
0
            public void Execute()
            {
                var model = MVCWithCommandConfig.GetModel <MVCWithCommandModel>();

                model.Count.Value++;
            }