using ET; using Cal.DataTable; using System; using System.Collections.Generic; namespace ET { public class ShopComponentAwakeSystem : AwakeSystem { public override void Awake(ShopComponent self) { self.Init(); } } public class ShopComponent:Entity { public UnOrderMultiMap ShopBasePageDic = new UnOrderMultiMap(); private bool isInit; public void Init() { if (isInit) return; isInit = true; var dic = ShopBasePageDic; dic.Clear(); foreach (ShopBase item in DataTableHelper.GetAll()) { dic.Add(item.Page, item); } } public static List GetShopBase(Scene scene,int pageIndex) { var dic = scene.GetComponent().ShopBasePageDic; return dic[pageIndex]; } } }