コード例 #1
0
            protected override CellView CreateViewsHolder(int itemIndex)
            {
                var      data = _Params.rowData[itemIndex];
                CellView instance;

                if (data is GuestHeadData)
                {
                    instance = new GuestHeader();
                    instance.Init(_Params.GuestHeaderPrefab, itemIndex);
                }
                else if (data is ScoreHeaderData)
                {
                    instance = new ScoreHeader();
                    instance.Init(_Params.ScoreHeaderPrefab, itemIndex);
                }
                else if (data is MTTRankRowData)
                {
                    instance = new MTTRankRow();
                    instance.Init(_Params.RankPrefab, itemIndex);
                }
                else if (data is MTTTabData)
                {
                    instance = new MTTTabRow();
                    instance.Init(_Params.TabPrefab, itemIndex);
                }
                else
                {
                    instance = new GuestRow();
                    instance.Init(_Params.GuestPrefab, itemIndex);
                }

                return(instance);
            }
コード例 #2
0
            protected override CellView CreateViewsHolder(int itemIndex)
            {
                var      data = _Params.rowData[itemIndex];
                CellView instance;

                if (data is InsuranceRowData)
                {
                    instance = new InsuranceRow();
                    instance.Init(_Params.InsurancePrefab, itemIndex);
                }
                else if (data is PlayerRowData)
                {
                    instance = new PlayerRow();
                    instance.Init(_Params.PlayerPrefab, itemIndex);
                }
                else if (data is GuestHeadData)
                {
                    instance = new GuestHeader();
                    instance.Init(_Params.GuestHeaderPrefab, itemIndex);
                }
                else if (data is LeaveIconData)
                {
                    instance = new LeaveIcon();
                    instance.Init(_Params.LeaveIconPrefab, itemIndex);
                }
                else if (data is Data27)
                {
                    instance = new Award27Row();
                    instance.Init(_Params.Award27Prefab, itemIndex);
                }
                else if (data is ScoreHeaderData)
                {
                    instance = new ScoreHeader();
                    instance.Init(_Params.ScoreHeaderPrefab, itemIndex);
                }
                else if (data is RankRowData)
                {
                    instance = new RankRow();
                    instance.Init(_Params.RankPrefab, itemIndex);
                }
                else
                {
                    instance = new GuestRow();
                    instance.Init(_Params.GuestPrefab, itemIndex);
                }

                return(instance);
            }