Exemplo n.º 1
0
 public static DemoStore Get(IFluxDispatcher dispatcher)
 {
     if (instance == null)
     {
         UnityEngine.Debug.Log("create");
         instance = new DemoStore(dispatcher);
     }
     return(instance);
 }
Exemplo n.º 2
0
        public void Awake()
        {
            dispatcher = App.Instance.Make <IFluxDispatcher>();
            store      = DemoStore.Get(dispatcher);

            button.onClick.AddListener(() =>
            {
                DemoAction.AddCount();
            });
            Refresh();
        }