提交 | 用户 | age
|
5200b4
|
1 |
using System.Collections; |
H |
2 |
using System.Collections.Generic; |
|
3 |
using UnityEngine; |
4465b6
|
4 |
namespace vnxbqy.UI |
5200b4
|
5 |
{ |
H |
6 |
public class DayPackageItemCell : CellView |
|
7 |
{ |
cebc1d
|
8 |
[SerializeField] DayGoods[] goods; |
5200b4
|
9 |
|
cebc1d
|
10 |
DayPackageItemClassModel dayPackageItemModel { get { return ModelCenter.Instance.GetModel<DayPackageItemClassModel>(); } } |
5200b4
|
11 |
public void Display(int index) |
cebc1d
|
12 |
{
|
H |
13 |
List<int> showIDs = new List<int>(); |
|
14 |
if (dayPackageItemModel.selectIndex == 0) |
|
15 |
{ |
|
16 |
showIDs = dayPackageItemModel.recordIDs; |
|
17 |
} |
|
18 |
else if (dayPackageItemModel.selectIndex == 1) |
|
19 |
{ |
|
20 |
showIDs = dayPackageItemModel.weekStoreListSort; |
|
21 |
} |
|
22 |
else if (dayPackageItemModel.selectIndex == 2) |
|
23 |
{ |
|
24 |
showIDs = dayPackageItemModel.monthStoreListSort; |
|
25 |
} |
|
26 |
|
|
27 |
foreach (var goods in goods) |
|
28 |
{ |
|
29 |
if (index >= showIDs.Count) |
|
30 |
{ |
|
31 |
goods.SetActive(false); |
|
32 |
continue; |
|
33 |
} |
|
34 |
goods.SetActive(true); |
|
35 |
goods.Display(showIDs[index]); |
|
36 |
index++; |
|
37 |
} |
5200b4
|
38 |
} |
H |
39 |
} |
|
40 |
|
|
41 |
} |
|
42 |
|