List <MapInfo_Npc> mNpcCreatingQueue = new List <MapInfo_Npc>(); //npc准备创建队列 /// <summary> /// 需求排队创建的npc进入队列 /// </summary> public void PushCreatingNpc(eNpcType type, MapInfo_Npc npcData) { if (mNpcCreatingQueue.Count < mLimitCount) { mNpcCreatingQueue.Add(npcData); } else { mNpcCreatingPool.Add(npcData); } }
/// <summary> /// 通过类型获取地图路线模板表 /// </summary> public static CSTable.MapWayData GetMapWayDataByType(eCamp camp, eNpcType type) { var tplMapWays = CSTable.StaticDataManager.MapWay.Dict; foreach (var tpl in tplMapWays.Values) { eCarType carType = eCarType.None; switch (type) { case eNpcType.FoodCar: carType = eCarType.FoodCar; break; case eNpcType.MoneyCar: carType = eCarType.MoneyCar; break; } if (tpl.camp == (int)camp && tpl.cartype == (int)carType) { return(tpl); } } return(null); }