Example #1
0
 /// <summary>
 /// 移除物品 用于编辑器窗口
 /// </summary>
 /// <param name="id">目标id</param>
 public void RemoveGoods(int id)
 {
     if (PrototypeGoodsMenu.ContainsKey(id))
     {
         PrototypeGoodsMenu.Remove(id);
         Save2JSON();
     }
 }
Example #2
0
 /// <summary>
 /// 将物品添加于管理器 用于编辑器窗口
 /// </summary>
 /// <param name="data">物品</param>
 public void Add2GoodMenu(RookiesGoods_GoodsBase data)
 {
     if (PrototypeGoodsMenu.ContainsKey(data.Id))
     {
         throw new ArgumentException(string.Format("id {0}重复添加", data.Id));
     }
     PrototypeGoodsMenu.Add(data.Id, data);
 }
Example #3
0
 public bool ContainsGoodsKey(int id)
 {
     return(PrototypeGoodsMenu.ContainsKey(id));
 }