コード例 #1
0
 /// <summary>Removes the item.</summary>
 /// <param name="name">The name.</param>
 public void RemoveItem(string name)
 {
     items.ToObservable()
     .Where(x => x.Name == name)
     .Subscribe(x =>
     {
         var posInInventoryGrid        = x.Position;
         var emptyGrid                 = new InventoryGridData(posInInventoryGrid, "", 0, true);
         model.set[posInInventoryGrid] = emptyGrid;
     });
 }
コード例 #2
0
        public void Init()
        {
            //创建核心数据

            //断言


            //初始创建9个数据格
            for (int i = 0; i < gridCapacity; i++)
            {
                var _gridData = new InventoryGridData(i, "", 0, true);
                model.set.Add(_gridData);
            }
        }