Ejemplo n.º 1
0
            public NavigableUIList(ITypedDataCursor <UIListState> state, Camera camera, Action <int> selectItem)
            {
                _isInteractable = state.To(s => s.IsInteractable);
                _selectItem     = selectItem;

                _highlightedIndex = state.To(s => s.HighlightedIndex);
                MouseHighlight.Initialize(state);
                MouseInteraction.LeftMouseClick(state.To(s => s.Items).Get(), selectItem);

                _controllerHighlight = ControllerHighlight.CreateControllerIndexUpdater(
                    cursor: state,
                    itemSelector: (items, currentIndex, inputDirection) => {
                    return(ControllerHighlight.MoveControllerIndex(camera.WorldToScreenPoint, items, currentIndex, inputDirection));
                });

                Highlighter.Initialize(state);
            }
Ejemplo n.º 2
0
 void Awake()
 {
     instance = this;
 }