public void UEventTileClicked() { if (store !.Select(SelectorFor.GridLoc(location)) == PlayerTag.None) { store.Dispatch(new TileClickedAction(location)); } }
private void Awake() { // the component gets an observable for its corresponding location in the grid, and reacts to any changes // to that location's state. // ObserveOnMainThread is required to be able to modify Unity GameObjects in the handler. store !.ObservableFor(SelectorFor.GridLoc(location)).ObserveOnMainThread().Subscribe(HandleStateChange, Debug.LogError); }