public static DemoStore Get(IFluxDispatcher dispatcher) { if (instance == null) { UnityEngine.Debug.Log("create"); instance = new DemoStore(dispatcher); } return(instance); }
public void Awake() { dispatcher = App.Instance.Make <IFluxDispatcher>(); store = DemoStore.Get(dispatcher); button.onClick.AddListener(() => { DemoAction.AddCount(); }); Refresh(); }