Example #1
0
        public EnhancedScrollerCellView GetCellView(EnhancedScroller scroller, int dataIndex, int cellIndex)
        {
            CellView cv = (CellView)scroller.GetCellView(cellView);

            cv.SetData(mDataLst[dataIndex], dataIndex);
            return(cv);
        }
Example #2
0
        // UI 处理
        public void OnBtnItem(CellView cv, Data data)
        {
            sclRoot.SetActive(false);
            backBtn.SetActive(true);

            SceneManager.LoadScene(data.name);
        }
Example #3
0
        void Start()
        {
            GameObject.DontDestroyOnLoad(canvasRoot);
            OnBtnShowScroller();

            scroller.Delegate             = this;
            scroller.cellViewInstantiated = (scl, cv) => {
                CellView mycv = (CellView)cv;
                mycv.gameObject.SetActive(true);
                mycv.onClickFn = OnBtnItem;
            };

            InitData();
        }